Search in sources :

Example 1 with SimpleDeviceStore

use of org.onosproject.store.trivial.SimpleDeviceStore in project onos by opennetworkinglab.

the class DeviceManagerTest method setUp.

@Before
public void setUp() {
    mgr = new DeviceManager();
    service = mgr;
    admin = mgr;
    registry = mgr;
    mgr.store = new SimpleDeviceStore();
    injectEventDispatcher(mgr, new TestEventDispatcher());
    TestMastershipManager mastershipManager = new TestMastershipManager();
    mgr.mastershipService = mastershipManager;
    mgr.termService = mastershipManager;
    mgr.clusterService = new TestClusterService();
    mgr.networkConfigService = new TestNetworkConfigService();
    mgr.communicationService = new TestClusterCommunicationService();
    mgr.activate();
    service.addListener(listener);
    provider = new TestProvider();
    providerService = registry.register(provider);
    assertTrue("provider should be registered", registry.getProviders().contains(provider.id()));
}
Also used : TestEventDispatcher(org.onosproject.common.event.impl.TestEventDispatcher) SimpleDeviceStore(org.onosproject.store.trivial.SimpleDeviceStore) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 TestEventDispatcher (org.onosproject.common.event.impl.TestEventDispatcher)1 SimpleDeviceStore (org.onosproject.store.trivial.SimpleDeviceStore)1