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