use of org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestData in project openflowplugin by opendaylight.
the class NodeNotificationSupplierImplTest method testCreateChangeEvent.
@Test
public void testCreateChangeEvent() {
final TestData testData = new TestData(createTestFlowCapableNodePath(), null, createTestFlowCapableNode(), DataObjectModification.ModificationType.WRITE);
Collection<DataTreeModification<FlowCapableNode>> collection = new ArrayList<>();
collection.add(testData);
notifSupplierImpl.onDataTreeChanged(collection);
verify(notifProviderService, times(1)).publish(Matchers.any(NodeUpdated.class));
}
use of org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestData in project openflowplugin by opendaylight.
the class FlowNotificationSupplierImplTest method testCreateChangeEvent.
@Test
public void testCreateChangeEvent() {
final TestData testData = new TestData(createTestFlowPath(), null, createTestFlow(), DataObjectModification.ModificationType.WRITE);
Collection<DataTreeModification<Flow>> collection = new ArrayList<>();
collection.add(testData);
notifSupplierImpl.onDataTreeChanged(collection);
verify(notifProviderService, times(1)).publish(Matchers.any(FlowAdded.class));
}
use of org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestData in project openflowplugin by opendaylight.
the class MeterNotificationSupplierImplTest method testUdateChangeEvent.
@Test
public void testUdateChangeEvent() {
final TestData testData = new TestData(createTestMeterPath(), createTestMeter(), createUpdatedTestMeter(), DataObjectModification.ModificationType.SUBTREE_MODIFIED);
Collection<DataTreeModification<Meter>> collection = new ArrayList<>();
collection.add(testData);
notifSupplierImpl.onDataTreeChanged(collection);
verify(notifProviderService, times(1)).publish(Matchers.any(MeterUpdated.class));
}
use of org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestData in project openflowplugin by opendaylight.
the class MeterNotificationSupplierImplTest method testDeleteChangeEvent.
@Test
public void testDeleteChangeEvent() {
final TestData testData = new TestData(createTestMeterPath(), createTestMeter(), null, DataObjectModification.ModificationType.DELETE);
Collection<DataTreeModification<Meter>> collection = new ArrayList<>();
collection.add(testData);
notifSupplierImpl.onDataTreeChanged(collection);
verify(notifProviderService, times(1)).publish(Matchers.any(MeterRemoved.class));
}
use of org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestData in project openflowplugin by opendaylight.
the class FlowStatNotificationSupplierImplTest method testCreateChangeEvent.
@Test
public void testCreateChangeEvent() {
final TestData testData = new TestData(createTestFlowStatPath(), null, createTestFlowStat(), DataObjectModification.ModificationType.WRITE);
Collection<DataTreeModification<FlowStatistics>> collection = new ArrayList<>();
collection.add(testData);
notifSupplierImpl.onDataTreeChanged(collection);
verify(notifProviderService, times(1)).publish(Matchers.any(FlowsStatisticsUpdate.class));
}
Aggregations