use of org.openkilda.messaging.payload.flow.FlowResponsePayload in project open-kilda by telstra.
the class FlowControllerTest method updateFlow.
@Test
@WithMockUser(username = USERNAME, password = PASSWORD, roles = ROLE)
public void updateFlow() throws Exception {
MvcResult mvcResult = mockMvc.perform(put("/v1/flows/{flow-id}", TestMessageMock.FLOW_ID).header(CORRELATION_ID, testCorrelationId()).contentType(APPLICATION_JSON_VALUE).content(MAPPER.writeValueAsString(TestMessageMock.flow))).andReturn();
MvcResult result = mockMvc.perform(asyncDispatch(mvcResult)).andExpect(status().isOk()).andExpect(content().contentType(APPLICATION_JSON_VALUE)).andReturn();
FlowResponsePayload response = MAPPER.readValue(result.getResponse().getContentAsString(), FlowResponsePayload.class);
assertEquals(TestMessageMock.flowResponsePayload, response);
}
use of org.openkilda.messaging.payload.flow.FlowResponsePayload in project open-kilda by telstra.
the class FlowMapper method toFlowResponseOutput.
/**
* Map {@link FlowDto} into {@link FlowResponsePayload}.
*/
public FlowResponsePayload toFlowResponseOutput(FlowDto f) {
FlowResponsePayload result = new FlowResponsePayload();
generatedMap(result, f);
generatedFlowResponsePayloadMap(result, f);
mapFlowResponseEndpoints(result, f);
return result;
}
Aggregations