use of org.openkilda.messaging.model.SwapFlowDto in project open-kilda by telstra.
the class RequestedFlowMapperTest method mapSwapDtoToRequesterFlowTest.
@Test
public void mapSwapDtoToRequesterFlowTest() {
SwapFlowDto swapFlowDto = SwapFlowDto.builder().flowId(FLOW_ID).sourceSwitch(SRC_SWITCH_ID).sourcePort(SRC_PORT).sourceVlan(SRC_VLAN).destinationSwitch(DST_SWITCH_ID).destinationPort(DST_PORT).destinationVlan(DST_VLAN).build();
RequestedFlow requestedFlow = RequestedFlowMapper.INSTANCE.toRequestedFlow(swapFlowDto);
assertEquals(FLOW_ID, requestedFlow.getFlowId());
assertEquals(SRC_SWITCH_ID, requestedFlow.getSrcSwitch());
assertEquals(SRC_PORT, requestedFlow.getSrcPort());
assertEquals(SRC_VLAN, requestedFlow.getSrcVlan());
assertEquals(DST_SWITCH_ID, requestedFlow.getDestSwitch());
assertEquals(DST_PORT, requestedFlow.getDestPort());
assertEquals(DST_VLAN, requestedFlow.getDestVlan());
}
Aggregations