Search in sources :

Example 41 with TestEventDispatcher

use of org.onosproject.common.event.impl.TestEventDispatcher in project onos by opennetworkinglab.

the class AlarmManagerTest method setUp.

@Before
public void setUp() throws Exception {
    alarmStore = new DistributedAlarmStore();
    TestUtils.setField(alarmStore, "storageService", new TestStorageService());
    alarmStore.activate();
    manager = new AlarmManager();
    registry = manager;
    manager.addListener(listener);
    NetTestTools.injectEventDispatcher(manager, new TestEventDispatcher());
    manager.deviceService = deviceService;
    manager.mastershipService = mastershipService;
    manager.store = alarmStore;
    manager.activate();
    provider = new TestProvider();
    providerService = registry.register(provider);
}
Also used : TestEventDispatcher(org.onosproject.common.event.impl.TestEventDispatcher) TestStorageService(org.onosproject.store.service.TestStorageService) Before(org.junit.Before)

Aggregations

TestEventDispatcher (org.onosproject.common.event.impl.TestEventDispatcher)41 Before (org.junit.Before)39 TestStorageService (org.onosproject.store.service.TestStorageService)18 TestServiceDirectory (org.onlab.osgi.TestServiceDirectory)13 DistributedVirtualNetworkStore (org.onosproject.incubator.net.virtual.store.impl.DistributedVirtualNetworkStore)13 CoreService (org.onosproject.core.CoreService)8 ComponentConfigAdapter (org.onosproject.cfg.ComponentConfigAdapter)6 VirtualProviderManager (org.onosproject.incubator.net.virtual.impl.provider.VirtualProviderManager)6 DefaultDriver (org.onosproject.net.driver.DefaultDriver)6 TestApplicationId (org.onosproject.TestApplicationId)4 ClusterServiceAdapter (org.onosproject.cluster.ClusterServiceAdapter)4 VirtualProviderRegistryService (org.onosproject.incubator.net.virtual.provider.VirtualProviderRegistryService)4 SimpleVirtualFlowRuleStore (org.onosproject.incubator.net.virtual.store.impl.SimpleVirtualFlowRuleStore)4 DriverRegistryManager (org.onosproject.net.driver.impl.DriverRegistryManager)4 ClusterService (org.onosproject.cluster.ClusterService)3 VirtualNetworkStore (org.onosproject.incubator.net.virtual.VirtualNetworkStore)3 SimpleVirtualFlowObjectiveStore (org.onosproject.incubator.net.virtual.store.impl.SimpleVirtualFlowObjectiveStore)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 Semaphore (java.util.concurrent.Semaphore)2