39404142434445464748495051525354555657
public Animal animal; @Before public void Init() { da = new DataAccessController(); Dog dog1 = new Dog(); dog1.setDogName("Rambo"); dog1.setId("123ABC"); Dog dog2 = new Dog(); dog2.setDogName("Trosky"); dog2.setId("123ABCD"); Dog dog3 = new Dog(); dog3.setDogName("Malu"); dog3.setId("123A"); Cat cat1 = new Cat(); cat1.setId("666321"); Cat cat2 = new Cat(); cat2.setId("ABC321");
121122123124125126127128
} @Test public void testGetDogByDogName() { Dog result = da.getDogByDogName("Trosky"); Assert.assertEquals(result, dogToValiate); }