mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 08:15:49 +00:00
Merge branch 'master' into rogerDev
This commit is contained in:
commit
5fd342fcee
1 changed files with 3 additions and 0 deletions
|
@ -56,12 +56,15 @@ public class OwnerTest {
|
||||||
@Test
|
@Test
|
||||||
public void setPetgetPetsTest() {
|
public void setPetgetPetsTest() {
|
||||||
Pet pet = new Pet();
|
Pet pet = new Pet();
|
||||||
|
|
||||||
|
pet.setName("Pogo");
|
||||||
ownerInstance.addPet(pet);
|
ownerInstance.addPet(pet);
|
||||||
List<Pet> result = ownerInstance.getPets();
|
List<Pet> result = ownerInstance.getPets();
|
||||||
Pet onlyPet = result.iterator().next();
|
Pet onlyPet = result.iterator().next();
|
||||||
|
|
||||||
assertEquals(1, result.size()); // Make sure there's only one element in the Collection returned
|
assertEquals(1, result.size()); // Make sure there's only one element in the Collection returned
|
||||||
assertEquals(pet, onlyPet);
|
assertEquals(pet, onlyPet);
|
||||||
|
assertEquals(pet.getName(), onlyPet.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in a new issue