Search in sources :

Example 1 with SwapFlowDto

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());
}
Also used : SwapFlowDto(org.openkilda.messaging.model.SwapFlowDto) RequestedFlow(org.openkilda.wfm.topology.flowhs.model.RequestedFlow) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 SwapFlowDto (org.openkilda.messaging.model.SwapFlowDto)1 RequestedFlow (org.openkilda.wfm.topology.flowhs.model.RequestedFlow)1