Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @isTest
- public class AnimalLocatorTest {
- @isTest public static void AnimalLocatorMock() {
- Test.setMock(HttpCalloutMock.class, new AnimalLocatorMock());
- string result = AnimalLocator.getAnimalNameById(1);
- system.debug(result);
- String expectedResult = 'chicken';
- System.assertEquals(result,expectedResult );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement