Skip to content
Snippets Groups Projects
Commit 5b0ab6da authored by rokibulislam's avatar rokibulislam
Browse files

update testcase

parent cd449218
No related branches found
No related tags found
1 merge request!13Flights tests
......@@ -51,7 +51,7 @@ public class FlightControllerTest {
// UUID id = UUID.fromString("00000000-0000-0001-0000-00000000000f");
Mockito.when(flightFacade.getFlight(id)).thenReturn(TestApiFactory.getFlightEntity());
RequestBuilder request = MockMvcRequestBuilders.get("/flights/{id}", id).accept(MediaType.APPLICATION_JSON);
RequestBuilder request = MockMvcRequestBuilders.get("/flights/{id}", id).accept(MediaType.APPLICATION_JSON_VALUE);
String responseJson = mockMvc.perform(request)
.andExpect(status().isOk())
.andReturn()
......
......@@ -47,10 +47,6 @@ public class FlightRealizationControllerTest {
@Test
void findById_flightRelizationFound_returnsflightRelization() throws Exception {
UUID id = new UUID(0x1, 0xf);
cz.muni.fi.pa165.api.flight.FlightRealization flightRealization = new cz.muni.fi.pa165.api.flight.FlightRealization();
flightRealization.setKilometersFlown(850);
flightRealization.setId(id);
Mockito.when(flightRealizationFacade.getFlightRealization(id)).thenReturn(TestApiFactory.getFlightRealizationEntity());
RequestBuilder request = MockMvcRequestBuilders.get("/flightrelization/{id}", id).accept(MediaType.APPLICATION_JSON);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment