mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:55:49 +00:00
[FIX] Further adjusted the assertEquals in PetTests to better compare the two parameters (as pointed out by @amawai)
This commit is contained in:
parent
36d98e5949
commit
b6d3dd1c11
1 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ public class PetTests {
|
|||
walrus.setName("Alex Garland");
|
||||
pet.setType(walrus);
|
||||
PetType resultOfGetType = pet.getType();
|
||||
assertEquals(walrus, resultOfGetType);
|
||||
assertEquals(walrus.getName(), resultOfGetType.getName());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -56,7 +56,7 @@ public class PetTests {
|
|||
Owner amandeepBhandal = new Owner();
|
||||
pet.setOwner(amandeepBhandal);
|
||||
Owner resultOfGetOwner = pet.getOwner();
|
||||
assertEquals(amandeepBhandal, resultOfGetOwner);
|
||||
assertEquals(amandeepBhandal.getAddress(), resultOfGetOwner.getAddress());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -65,7 +65,7 @@ public class PetTests {
|
|||
Set<Visit> visitsForTesting = new LinkedHashSet<>();
|
||||
pet.setVisitsInternal(visitsForTesting);
|
||||
Set<Visit> resultOfGetVisitsInternal = pet.getVisitsInternal();
|
||||
assertEquals(visitsForTesting, resultOfGetVisitsInternal);
|
||||
assertEquals(visitsForTesting.size(), resultOfGetVisitsInternal.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in a new issue