use of org.openkilda.messaging.nbtopology.response.LagPortDto in project open-kilda by telstra.
the class LagPortMapperTest method mapLagPortToDtoTest.
@Test
public void mapLagPortToDtoTest() {
LagLogicalPort lagLogicalPort = new LagLogicalPort(SWITCH_ID, LAG_PORT, Lists.newArrayList(PHYSICAL_PORT_1, PHYSICAL_PORT_2));
LagPortDto dto = LagPortMapper.INSTANCE.map(lagLogicalPort);
assertEquals(LAG_PORT, dto.getLogicalPortNumber());
assertEquals(PHYSICAL_PORT_1, dto.getPortNumbers().get(0).intValue());
assertEquals(PHYSICAL_PORT_2, dto.getPortNumbers().get(1).intValue());
}
use of org.openkilda.messaging.nbtopology.response.LagPortDto in project open-kilda by telstra.
the class LagPortMapperTest method mapLagPortDtoTest.
@Test
public void mapLagPortDtoTest() {
LagPortDto response = new LagPortDto(LOGICAL_PORT_NUMBER_1, Lists.newArrayList(PHYSICAL_PORT_NUMBER_1, PHYSICAL_PORT_NUMBER_2));
org.openkilda.northbound.dto.v2.switches.LagPortDto dto = lagMapper.map(response);
assertEquals(LOGICAL_PORT_NUMBER_1, dto.getLogicalPortNumber());
assertEquals(PHYSICAL_PORT_NUMBER_1, dto.getPortNumbers().get(0).intValue());
assertEquals(PHYSICAL_PORT_NUMBER_2, dto.getPortNumbers().get(1).intValue());
}
Aggregations