TestSimpleStorage.sol 434 B

1234567891011121314151617181920
  1. pragma solidity ^0.4.2;
  2. import "truffle/Assert.sol";
  3. import "truffle/DeployedAddresses.sol";
  4. import "../contracts/SimpleStorage.sol";
  5. contract TestSimpleStorage {
  6. function testItStoresAValue() public {
  7. SimpleStorage simpleStorage = SimpleStorage(DeployedAddresses.SimpleStorage());
  8. simpleStorage.set(89);
  9. uint expected = 89;
  10. Assert.equal(simpleStorage.get(), expected, "It should store the value 89.");
  11. }
  12. }