mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 20:25:50 +00:00
test: simplify code
This commit is contained in:
parent
9ed20bf999
commit
dea3432a6d
1 changed files with 3 additions and 6 deletions
|
@ -84,7 +84,7 @@ class OwnerControllerTests {
|
||||||
george.addPet(max);
|
george.addPet(max);
|
||||||
max.setId(1);
|
max.setId(1);
|
||||||
return george;
|
return george;
|
||||||
};
|
}
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setup() {
|
void setup() {
|
||||||
|
@ -231,11 +231,8 @@ class OwnerControllerTests {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<Pet> pets = (List<Pet>) item;
|
List<Pet> pets = (List<Pet>) item;
|
||||||
Pet pet = pets.get(0);
|
Pet pet = pets.get(0);
|
||||||
if (pet.getVisits().isEmpty()) {
|
return !pet.getVisits().isEmpty();
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void describeTo(Description description) {
|
public void describeTo(Description description) {
|
||||||
|
|
Loading…
Reference in a new issue