Search in sources :

Example 6 with TestData

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

the class MeterStatNotificationSupplierImplTest method testCreateChangeEvent.

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

Example 7 with TestData

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

the class NodeConnectorNotificationSupplierImplTest method testCreateChangeEvent.

@Test
public void testCreateChangeEvent() {
    final TestData testData = new TestData(createTestFlowCapableConnectorNodePath(), null, createTestFlowCapableNodeConnecor(), DataObjectModification.ModificationType.WRITE);
    Collection<DataTreeModification<FlowCapableNodeConnector>> collection = new ArrayList<>();
    collection.add(testData);
    notifSupplierImpl.onDataTreeChanged(collection);
    verify(notifProviderService, times(1)).publish(Matchers.any(NodeConnectorUpdated.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) NodeConnectorUpdated(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorUpdated) Test(org.junit.Test)

Example 8 with TestData

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

the class QueueStatNotificationSupplierImplTest method testCreateChangeEvent.

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

Example 9 with TestData

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

the class FlowNotificationSupplierImplTest method testUpdateChangeEvent.

@Test
public void testUpdateChangeEvent() {
    final TestData testData = new TestData(createTestFlowPath(), createTestFlow(), createUpdatedTestFlow(), DataObjectModification.ModificationType.SUBTREE_MODIFIED);
    Collection<DataTreeModification<Flow>> collection = new ArrayList<>();
    collection.add(testData);
    notifSupplierImpl.onDataTreeChanged(collection);
    verify(notifProviderService, times(1)).publish(Matchers.any(FlowUpdated.class));
}
Also used : DataTreeModification(org.opendaylight.controller.md.sal.binding.api.DataTreeModification) FlowUpdated(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowUpdated) TestData(org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestData) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 10 with TestData

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

the class FlowNotificationSupplierImplTest method testDeleteChangeEvent.

@Test
public void testDeleteChangeEvent() {
    final TestData testData = new TestData(createTestFlowPath(), createTestFlow(), null, DataObjectModification.ModificationType.DELETE);
    Collection<DataTreeModification<Flow>> collection = new ArrayList<>();
    collection.add(testData);
    notifSupplierImpl.onDataTreeChanged(collection);
    verify(notifProviderService, times(1)).publish(Matchers.any(FlowRemoved.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) FlowRemoved(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowRemoved) 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