Created
March 21, 2020 17:11
-
-
Save alexroan/8a5015b0424d497317013660e7d27d4a to your computer and use it in GitHub Desktop.
truffle-tests/TestEntryPoint.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.5.0; | |
import "truffle/Assert.sol"; | |
import "truffle/DeployedAddresses.sol"; | |
import "../../../contracts/Background.sol"; | |
import "../../../contracts/EntryPoint.sol"; | |
contract TestEntryPoint { | |
// Ensure that dependency injection working correctly | |
function testItHasCorrectBackground() public { | |
Background backgroundTest = new Background(); | |
EntryPoint entryPoint = new EntryPoint(address(backgroundTest)); | |
address expected = address(backgroundTest); | |
address target = entryPoint.getBackgroundAddress(); | |
Assert.equal(target, expected, "It should set the correct background"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment