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);
|
||||
max.setId(1);
|
||||
return george;
|
||||
};
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
void setup() {
|
||||
|
@ -231,11 +231,8 @@ class OwnerControllerTests {
|
|||
@SuppressWarnings("unchecked")
|
||||
List<Pet> pets = (List<Pet>) item;
|
||||
Pet pet = pets.get(0);
|
||||
if (pet.getVisits().isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return !pet.getVisits().isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void describeTo(Description description) {
|
||||
|
|
Loading…
Reference in a new issue