Search in sources :

Example 1 with SimpleHostStore

use of org.onosproject.store.trivial.SimpleHostStore 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)

Aggregations

Before (org.junit.Before)1 ComponentConfigAdapter (org.onosproject.cfg.ComponentConfigAdapter)1 TestEventDispatcher (org.onosproject.common.event.impl.TestEventDispatcher)1 SimpleHostStore (org.onosproject.store.trivial.SimpleHostStore)1