mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:55:49 +00:00
Fixed indentation from copy/paste
This commit is contained in:
parent
bc81a84e48
commit
9657254791
1 changed files with 17 additions and 17 deletions
|
@ -17,22 +17,22 @@ public class VisitControllerTest
|
|||
@Test
|
||||
public void testPetVisitDate()
|
||||
{
|
||||
// Define random pet ID
|
||||
final Integer PET_ID = 7;
|
||||
Pet pet7 = new Pet();
|
||||
|
||||
// Mock dependencies
|
||||
VisitRepository mockVisitRepo = mock(VisitRepository.class);
|
||||
PetRepository mockPetRepo = mock(PetRepository.class);
|
||||
VisitController visitController = new VisitController(mockVisitRepo, mockPetRepo);
|
||||
|
||||
// Define mock behaviour
|
||||
when(mockPetRepo.findById(PET_ID)).thenReturn(pet7);
|
||||
|
||||
// Call method under inspection
|
||||
Visit visit = visitController.loadPetWithVisit(PET_ID, new HashMap<>());
|
||||
|
||||
// Confirm that the same visit date was assigned to the pet
|
||||
assertEquals(visit.getDate(), pet7.getVisits().get(0).getDate());
|
||||
// Define random pet ID
|
||||
final Integer PET_ID = 7;
|
||||
Pet pet7 = new Pet();
|
||||
|
||||
// Mock dependencies
|
||||
VisitRepository mockVisitRepo = mock(VisitRepository.class);
|
||||
PetRepository mockPetRepo = mock(PetRepository.class);
|
||||
VisitController visitController = new VisitController(mockVisitRepo, mockPetRepo);
|
||||
|
||||
// Define mock behaviour
|
||||
when(mockPetRepo.findById(PET_ID)).thenReturn(pet7);
|
||||
|
||||
// Call method under inspection
|
||||
Visit visit = visitController.loadPetWithVisit(PET_ID, new HashMap<>());
|
||||
|
||||
// Confirm that the same visit date was assigned to the pet
|
||||
assertEquals(visit.getDate(), pet7.getVisits().get(0).getDate());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue