mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 00:05:50 +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");
|
walrus.setName("Alex Garland");
|
||||||
pet.setType(walrus);
|
pet.setType(walrus);
|
||||||
PetType resultOfGetType = pet.getType();
|
PetType resultOfGetType = pet.getType();
|
||||||
assertEquals(walrus, resultOfGetType);
|
assertEquals(walrus.getName(), resultOfGetType.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -56,7 +56,7 @@ public class PetTests {
|
||||||
Owner amandeepBhandal = new Owner();
|
Owner amandeepBhandal = new Owner();
|
||||||
pet.setOwner(amandeepBhandal);
|
pet.setOwner(amandeepBhandal);
|
||||||
Owner resultOfGetOwner = pet.getOwner();
|
Owner resultOfGetOwner = pet.getOwner();
|
||||||
assertEquals(amandeepBhandal, resultOfGetOwner);
|
assertEquals(amandeepBhandal.getAddress(), resultOfGetOwner.getAddress());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -65,7 +65,7 @@ public class PetTests {
|
||||||
Set<Visit> visitsForTesting = new LinkedHashSet<>();
|
Set<Visit> visitsForTesting = new LinkedHashSet<>();
|
||||||
pet.setVisitsInternal(visitsForTesting);
|
pet.setVisitsInternal(visitsForTesting);
|
||||||
Set<Visit> resultOfGetVisitsInternal = pet.getVisitsInternal();
|
Set<Visit> resultOfGetVisitsInternal = pet.getVisitsInternal();
|
||||||
assertEquals(visitsForTesting, resultOfGetVisitsInternal);
|
assertEquals(visitsForTesting.size(), resultOfGetVisitsInternal.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in a new issue