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()));
}
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);
}
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);
}
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);
}
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);
}
Aggregations