use of org.openkilda.messaging.info.event.ArpInfoData in project open-kilda by telstra.
the class PacketServiceTest method testHandleArpDataDifferentSwitchId.
@Test
public void testHandleArpDataDifferentSwitchId() {
ArpInfoData updatedData = createArpInfoData();
updatedData.setSwitchId(SWITCH_ID_2);
runHandleArpDataWithAddedDevice(updatedData);
}
use of org.openkilda.messaging.info.event.ArpInfoData in project open-kilda by telstra.
the class PacketServiceTest method testHandleArpDataDifferentMac.
@Test
public void testHandleArpDataDifferentMac() {
ArpInfoData updatedData = createArpInfoData();
updatedData.setMacAddress(MAC_ADDRESS_2);
runHandleArpDataWithAddedDevice(updatedData);
}
use of org.openkilda.messaging.info.event.ArpInfoData in project open-kilda by telstra.
the class PacketServiceTest method testHandleArpDataDifferentVlan.
@Test
public void testHandleArpDataDifferentVlan() {
ArpInfoData updatedData = createArpInfoData();
updatedData.setVlans(Collections.singletonList(VLAN_2));
runHandleArpDataWithAddedDevice(updatedData);
}
use of org.openkilda.messaging.info.event.ArpInfoData in project open-kilda by telstra.
the class PacketServiceTest method runHandleArpDataWithAddedDevice.
private void runHandleArpDataWithAddedDevice(ArpInfoData updatedData) {
ArpInfoData data = createArpInfoData();
packetService.handleArpData(data);
assertEquals(1, switchConnectedDeviceRepository.findAll().size());
assertArpConnectedDeviceExistInDatabase(data);
// we must add second device
packetService.handleArpData(updatedData);
assertEquals(2, switchConnectedDeviceRepository.findAll().size());
assertArpConnectedDeviceExistInDatabase(data);
assertArpConnectedDeviceExistInDatabase(updatedData);
}
use of org.openkilda.messaging.info.event.ArpInfoData in project open-kilda by telstra.
the class PacketServiceTest method testHandleArpDataNonExistentSwitch.
@Test
public void testHandleArpDataNonExistentSwitch() {
ArpInfoData data = createArpInfoData();
data.setSwitchId(new SwitchId("12345"));
packetService.handleArpData(data);
assertTrue(switchConnectedDeviceRepository.findAll().isEmpty());
}
Aggregations