Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
684 B
1
Indexable
Never
Mockito.when driverRepository.findmyId(Mackito.anyInt().thenketurn(Optional.empty());

250

CobBookingExceptione Assertions.assertThrous (CabllookingException.class, () cahilookingservice.bookCab(new Rooking010(), 13);

Assertions.assertEquals("Service. DVALID_DRIVER_ID", e.getMessage());

Test public void getDriversyRatingDriverstotFoundTest() throws Exception (

41

Mockito.when driverkepository.getDriversyRating lockito, anybouble())). thenieturn(List.of());

45

CobBookingException e Assertions.usert Throws (CabBookingException.class,

() cabllookingservice.getDriversyllating(Hockito.anyouble()));

47

Assertions.assertEquals("Service. DRIVERS NOT FOUnt", e.getMessage());