use of org.openkilda.model.LagLogicalPort in project open-kilda by telstra.
the class FermaLagLogicalPortTest method createLogicalPortWithPhysicalPortsTest.
@Test
public void createLogicalPortWithPhysicalPortsTest() {
LagLogicalPort logicalPort = createLogicalPort(SWITCH_ID_1, LOGICAL_PORT_NUMBER_1, PHYSICAL_PORT_NUMBER_1, PHYSICAL_PORT_NUMBER_2);
List<LagLogicalPort> ports = new ArrayList<>(lagLogicalPortRepository.findAll());
assertEquals(1, ports.size());
assertEquals(2, ports.get(0).getPhysicalPorts().size());
assertEquals(PHYSICAL_PORT_NUMBER_1, ports.get(0).getPhysicalPorts().get(0).getPortNumber());
assertEquals(PHYSICAL_PORT_NUMBER_2, ports.get(0).getPhysicalPorts().get(1).getPortNumber());
assertEquals(SWITCH_ID_1, ports.get(0).getPhysicalPorts().get(0).getSwitchId());
assertEquals(SWITCH_ID_1, ports.get(0).getPhysicalPorts().get(1).getSwitchId());
assertEquals(logicalPort, ports.get(0).getPhysicalPorts().get(0).getLagLogicalPort());
assertEquals(logicalPort, ports.get(0).getPhysicalPorts().get(1).getLagLogicalPort());
}
Aggregations