123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- import static org.junit.Assert.*;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
- import org.junit.Assert;
-
- public class PetTest
- {
-
- Pet petCaller = new Pet();
-
- @Test
- public void dogTypeTest(){
- //when
- petCaller.setType("Dog");
-
- //expected
- String expected = "Dog";
-
- //actual
- String actual = petCaller.getType();
-
- Assert.assertEquals(expected, actual);
- }
-
- @Test
- public void catTypeTest(){
- //when
- petCaller.setType("Cat");
-
- //expected
- String expected = "Cat";
-
- //actual
- String actual = petCaller.getType();
-
- Assert.assertEquals(expected, actual);
- }
-
- @Test
- public void fishTypeTest(){
- //when
- petCaller.setType("Fish");
-
- //expected
- String expected = "Fish";
-
- //actual
- String actual = petCaller.getType();
-
- Assert.assertEquals(expected, actual);
- }
- }
|