Search in sources :

Example 16 with TestData

use of org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestData in project openflowplugin by opendaylight.

the class GroupStatNotificationSupplierImplTest method testCreateChangeEvent.

@Test
public void testCreateChangeEvent() {
    final TestData testData = new TestData(createTestGroupStatPath(), null, createTestGroupStat(), DataObjectModification.ModificationType.WRITE);
    Collection<DataTreeModification<GroupStatistics>> collection = new ArrayList<>();
    collection.add(testData);
    notifSupplierImpl.onDataTreeChanged(collection);
    verify(notifProviderService, times(1)).publish(Matchers.any(GroupStatisticsUpdated.class));
}
Also used : DataTreeModification(org.opendaylight.controller.md.sal.binding.api.DataTreeModification) GroupStatisticsUpdated(org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GroupStatisticsUpdated) TestData(org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestData) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 17 with TestData

use of org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestData in project openflowplugin by opendaylight.

the class NodeConnectorStatNotificationSupplierImplTest method testCreateChangeEvent.

@Test
public void testCreateChangeEvent() {
    final TestData testData = new TestData(createTestConnectorStatPath(), null, createTestConnectorStat(), DataObjectModification.ModificationType.WRITE);
    Collection<DataTreeModification<FlowCapableNodeConnectorStatistics>> collection = new ArrayList<>();
    collection.add(testData);
    notifSupplierImpl.onDataTreeChanged(collection);
    verify(notifProviderService, times(1)).publish(Matchers.any(NodeConnectorStatisticsUpdate.class));
}
Also used : DataTreeModification(org.opendaylight.controller.md.sal.binding.api.DataTreeModification) TestData(org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestData) ArrayList(java.util.ArrayList) NodeConnectorStatisticsUpdate(org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.NodeConnectorStatisticsUpdate) Test(org.junit.Test)

Example 18 with TestData

use of org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestData in project openflowplugin by opendaylight.

the class NodeConnectorNotificationSupplierImplTest method testDeleteChangeEvent.

@Test
public void testDeleteChangeEvent() {
    final TestData testData = new TestData(createTestFlowCapableConnectorNodePath(), createTestFlowCapableNodeConnecor(), null, DataObjectModification.ModificationType.DELETE);
    Collection<DataTreeModification<FlowCapableNodeConnector>> collection = new ArrayList<>();
    collection.add(testData);
    notifSupplierImpl.onDataTreeChanged(collection);
    verify(notifProviderService, times(1)).publish(Matchers.any(NodeConnectorRemoved.class));
}
Also used : DataTreeModification(org.opendaylight.controller.md.sal.binding.api.DataTreeModification) NodeConnectorRemoved(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorRemoved) TestData(org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestData) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 19 with TestData

use of org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestData in project openflowplugin by opendaylight.

the class NodeNotificationSupplierImplTest method testDeleteChangeEvent.

@Test
public void testDeleteChangeEvent() {
    final TestData testData = new TestData(createTestFlowCapableNodePath(), createTestFlowCapableNode(), null, DataObjectModification.ModificationType.DELETE);
    Collection<DataTreeModification<FlowCapableNode>> collection = new ArrayList<>();
    collection.add(testData);
    notifSupplierImpl.onDataTreeChanged(collection);
    verify(notifProviderService, times(1)).publish(Matchers.any(NodeRemoved.class));
}
Also used : DataTreeModification(org.opendaylight.controller.md.sal.binding.api.DataTreeModification) TestData(org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestData) ArrayList(java.util.ArrayList) NodeRemoved(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRemoved) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)19 Test (org.junit.Test)19 DataTreeModification (org.opendaylight.controller.md.sal.binding.api.DataTreeModification)19 TestData (org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestData)19 FlowAdded (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowAdded)1 FlowRemoved (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowRemoved)1 FlowUpdated (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowUpdated)1 FlowsStatisticsUpdate (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowsStatisticsUpdate)1 FlowTableStatisticsUpdate (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.FlowTableStatisticsUpdate)1 GroupAdded (org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupAdded)1 GroupRemoved (org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupRemoved)1 GroupUpdated (org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupUpdated)1 GroupStatisticsUpdated (org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GroupStatisticsUpdated)1 NodeConnectorRemoved (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorRemoved)1 NodeConnectorUpdated (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorUpdated)1 NodeRemoved (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRemoved)1 NodeUpdated (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeUpdated)1 MeterAdded (org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.MeterAdded)1 MeterRemoved (org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.MeterRemoved)1 MeterUpdated (org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.MeterUpdated)1