I'm trying to write a test suite in Solidity for a few contracts contained in a single script. I can't alter the code in the contracts - they're not written by me, and I don't have the rights. I would like to be able to simulate a transaction between two contracts, but I can't figure out if there's a way for me to fund a contract from thin air (for testing) using Solidity. I'm assuming it would look something like:
contract testUser {
constructor () {
address(this).balance = 1 ether;
}
Right now this is giving me an error in Remix (Expression has to be an lvalue), which I think is because this needs to be a storage thing, and this is trying to write it in memory, but adding storage
to the line where I'm trying to fund the contract yields a syntax error. Is there a way to do this?