github.com/Tri-stone/burrow@v0.25.0/tests/jobs_fixtures/app54-static-call/AdoptionTest.sol (about) 1 pragma solidity ^0.5.4; 2 interface AdoptionInterface{ 3 function adopt(uint petId) external returns (uint); 4 function getAdopters() external view returns (address[16] memory); 5 function adopters(uint) external view returns (address); 6 } 7 8 contract TestAdoption { 9 10 event TestEvent(bool indexed name, string message); 11 12 AdoptionInterface adoption; 13 14 constructor(AdoptionInterface _adoption) public { 15 adoption = _adoption; 16 17 } 18 // Testing the adopt() function 19 function testGetAdopterAddressByPetId() public returns (address result) { 20 adoption.adopt(expectedPetId); 21 return adoption.adopters(expectedPetId); 22 } 23 24 // The id of the pet that will be used for testing 25 uint expectedPetId = 8; 26 27 //The expected owner of adopted pet is this contract 28 address expectedAdopter = address(this); 29 30 } 31