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());
}
Aggregations