Search in sources :

Example 1 with SimpleGroupStore

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

the class GroupManagerTest method setUp.

@Before
public void setUp() {
    mgr = new GroupManager();
    groupService = mgr;
    // mgr.deviceService = new DeviceManager();
    mgr.deviceService = new TestDeviceService();
    mgr.cfgService = new ComponentConfigAdapter();
    mgr.store = new SimpleGroupStore();
    mgr.mastershipService = new TestMastershipService();
    injectEventDispatcher(mgr, new TestEventDispatcher());
    providerRegistry = mgr;
    mgr.activate(null);
    mgr.addListener(listener);
    DriverRegistryManager driverRegistry = new DriverRegistryManager();
    driverService = new TestDriverManager(driverRegistry);
    driverRegistry.addDriver(new DefaultDriver("foo", ImmutableList.of(), "", "", "", ImmutableMap.of(GroupProgrammable.class, TestGroupProgrammable.class), ImmutableMap.of()));
    internalProvider = new TestGroupProvider(PID);
    provider = internalProvider;
    providerService = providerRegistry.register(provider);
    appId = new DefaultApplicationId(2, "org.groupmanager.test");
    assertTrue("provider should be registered", providerRegistry.getProviders().contains(provider.id()));
}
Also used : ComponentConfigAdapter(org.onosproject.cfg.ComponentConfigAdapter) TestEventDispatcher(org.onosproject.common.event.impl.TestEventDispatcher) SimpleGroupStore(org.onosproject.store.trivial.SimpleGroupStore) DefaultDriver(org.onosproject.net.driver.DefaultDriver) DriverRegistryManager(org.onosproject.net.driver.impl.DriverRegistryManager) DefaultApplicationId(org.onosproject.core.DefaultApplicationId) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 ComponentConfigAdapter (org.onosproject.cfg.ComponentConfigAdapter)1 TestEventDispatcher (org.onosproject.common.event.impl.TestEventDispatcher)1 DefaultApplicationId (org.onosproject.core.DefaultApplicationId)1 DefaultDriver (org.onosproject.net.driver.DefaultDriver)1 DriverRegistryManager (org.onosproject.net.driver.impl.DriverRegistryManager)1 SimpleGroupStore (org.onosproject.store.trivial.SimpleGroupStore)1