use of org.openkilda.northbound.dto.v2.yflows.YFlowPingResult in project open-kilda by telstra.
the class YFlowMapperTest method pingResultTest.
@Test
public void pingResultTest() {
YFlowPingResponse response = new YFlowPingResponse(Y_FLOW_ID, false, ERROR_MESSAGE, Lists.newArrayList(new SubFlowPingPayload(SUB_FLOW_1, new UniSubFlowPingPayload(true, null, 1), new UniSubFlowPingPayload(false, Errors.TIMEOUT, 2)), new SubFlowPingPayload(SUB_FLOW_2, new UniSubFlowPingPayload(false, Errors.DEST_NOT_AVAILABLE, 3), new UniSubFlowPingPayload(true, null, 4))));
YFlowPingResult result = mapper.toPingResult(response);
assertEquals(response.getYFlowId(), result.getYFlowId());
assertEquals(response.isPingSuccess(), result.isPingSuccess());
assertEquals(response.getError(), result.getError());
assertEquals(response.getSubFlows().size(), result.getSubFlows().size());
assertSubFlowPingPayload(response.getSubFlows().get(0), result.getSubFlows().get(0));
}
Aggregations