use of org.onosproject.net.packet.PacketProcessor in project onos by opennetworkinglab.
the class VirtualNetworkPacketManagerTest method removeProcessorTest.
/**
* Tests the correct usage of addProcessor() for a outbound packet.
*/
@Test
public void removeProcessorTest() {
PacketProcessor testProcessor = new TestProcessor();
packetManager1.addProcessor(testProcessor, PROCESSOR_PRIORITY);
assertEquals("1 processor expected", 1, packetManager1.getProcessors().size());
assertEquals("0 processor expected", 0, packetManager2.getProcessors().size());
packetManager1.removeProcessor(testProcessor);
assertEquals("0 processor expected", 0, packetManager1.getProcessors().size());
assertEquals("0 processor expected", 0, packetManager2.getProcessors().size());
}
use of org.onosproject.net.packet.PacketProcessor in project onos by opennetworkinglab.
the class VirtualNetworkPacketManagerTest method addProcessorTest.
/**
* Tests the correct usage of addProcessor() for a outbound packet.
*/
@Test
public void addProcessorTest() {
PacketProcessor testProcessor = new TestProcessor();
packetManager1.addProcessor(testProcessor, PROCESSOR_PRIORITY);
assertEquals("1 processor expected", 1, packetManager1.getProcessors().size());
assertEquals("0 processor expected", 0, packetManager2.getProcessors().size());
assertEquals("not equal packet processor", testProcessor, packetManager1.getProcessors().get(0).processor());
assertEquals("not equal packet processor priority", PROCESSOR_PRIORITY, packetManager1.getProcessors().get(0).priority());
}
Aggregations