Search in sources :

Example 16 with TestEventDispatcher

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

the class HostManagerTest method setUp.

@Before
public void setUp() {
    mgr = new HostManager();
    mgr.store = new SimpleHostStore();
    injectEventDispatcher(mgr, new TestEventDispatcher());
    registry = mgr;
    mgr.networkConfigService = new TestNetworkConfigService();
    mgr.cfgService = new ComponentConfigAdapter();
    mgr.activate(REMOVE_DUPS_MONITOR);
    mgr.addListener(listener);
    provider = new TestHostProvider(PID);
    provider2 = new TestHostProvider(PID2);
    providerService = registry.register(provider);
    providerService2 = registry.register(provider2);
    assertTrue("provider should be registered", registry.getProviders().contains(provider.id()));
    assertTrue("provider2 should be registered", registry.getProviders().contains(provider2.id()));
}
Also used : TestEventDispatcher(org.onosproject.common.event.impl.TestEventDispatcher) ComponentConfigAdapter(org.onosproject.cfg.ComponentConfigAdapter) SimpleHostStore(org.onosproject.store.trivial.SimpleHostStore) Before(org.junit.Before)

Example 17 with TestEventDispatcher

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

the class DriverRegistryManagerTest method setUp.

@Before
public void setUp() {
    mgr = new DriverRegistryManager();
    mgr.deviceService = new DeviceServiceAdapter();
    mgr.componentConfigService = new ComponentConfigAdapter();
    mgr.eventDispatcher = new TestEventDispatcher();
    mgr.componentService = componentService;
    mgr.activate(null);
}
Also used : ComponentConfigAdapter(org.onosproject.cfg.ComponentConfigAdapter) TestEventDispatcher(org.onosproject.common.event.impl.TestEventDispatcher) DeviceServiceAdapter(org.onosproject.net.device.DeviceServiceAdapter) Before(org.junit.Before)

Example 18 with TestEventDispatcher

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

the class EdgeManagerTest method setUp.

@Before
public void setUp() {
    mgr = new EdgeManager();
    injectEventDispatcher(mgr, new TestEventDispatcher());
    testDeviceManager = new TestDeviceManager(devices);
    mgr.deviceService = testDeviceManager;
    testLinkService = new TestLinkService();
    mgr.linkService = testLinkService;
    mgr.packetService = new TestPacketManager();
    mgr.activate();
    mgr.addListener(testListener);
}
Also used : TestEventDispatcher(org.onosproject.common.event.impl.TestEventDispatcher) Before(org.junit.Before)

Example 19 with TestEventDispatcher

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

the class ApplicationManagerTest method setUp.

@Before
public void setUp() {
    injectEventDispatcher(mgr, new TestEventDispatcher());
    mgr.featuresService = new TestFeaturesService();
    mgr.store = new TestStore();
    mgr.activate();
    mgr.addListener(listener);
}
Also used : TestEventDispatcher(org.onosproject.common.event.impl.TestEventDispatcher) Before(org.junit.Before)

Example 20 with TestEventDispatcher

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

the class RestSBControllerImplTest method setUpTest.

@Before
public void setUpTest() {
    controller = new RestSBControllerImpl();
    TestUtils.setField(controller, "eventDispatcher", new TestEventDispatcher());
    controller.activate();
    device1 = new DefaultRestSBDevice(IpAddress.valueOf("127.0.0.1"), 18080, "foo", "bar", "http", null, true);
    device2 = new DefaultRestSBDevice(IpAddress.valueOf("127.0.0.2"), 18080, "foo1", "bar2", "http", null, true);
    controller.addDevice(device1);
}
Also used : TestEventDispatcher(org.onosproject.common.event.impl.TestEventDispatcher) DefaultRestSBDevice(org.onosproject.protocol.rest.DefaultRestSBDevice) 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