Search in sources :

Example 1 with FlowPatchDto

use of org.openkilda.northbound.dto.v1.flows.FlowPatchDto in project open-kilda by telstra.

the class FlowMapperTest method testFlowPatchDtoToFlowDto.

@Test
public void testFlowPatchDtoToFlowDto() {
    FlowPatchDto flowPatchDto = new FlowPatchDto(LATENCY, PRIORITY, PERIODIC_PINGS, TARGET_PATH_COMPUTATION_STRATEGY);
    FlowPatch flowPatch = flowMapper.toFlowPatch(flowPatchDto);
    assertEquals(flowPatchDto.getMaxLatency() * MS_TO_NS_MULTIPLIER, (long) flowPatch.getMaxLatency());
    assertEquals(flowPatchDto.getPriority(), flowPatch.getPriority());
    assertEquals(flowPatchDto.getPeriodicPings(), flowPatch.getPeriodicPings());
    assertEquals(flowPatchDto.getTargetPathComputationStrategy(), flowPatch.getTargetPathComputationStrategy().name().toLowerCase());
}
Also used : FlowPatchDto(org.openkilda.northbound.dto.v1.flows.FlowPatchDto) FlowPatch(org.openkilda.messaging.model.FlowPatch) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 FlowPatch (org.openkilda.messaging.model.FlowPatch)1 FlowPatchDto (org.openkilda.northbound.dto.v1.flows.FlowPatchDto)1