use of org.onosproject.core.impl.TestCoreManager in project onos by opennetworkinglab.
the class IntentManagerTest method setUp.
@Before
public void setUp() {
manager = new IntentManager();
flowRuleService = new MockFlowRuleService();
manager.store = new SimpleIntentStore();
injectEventDispatcher(manager, new TestEventDispatcher());
manager.trackerService = trackerService;
manager.flowRuleService = flowRuleService;
manager.coreService = new TestCoreManager();
manager.configService = mock(ComponentConfigService.class);
service = manager;
extensionService = manager;
intentInstallCoordinator = manager;
manager.activate();
service.addListener(listener);
extensionService.registerCompiler(MockIntent.class, compiler);
installer = new TestIntentInstaller(extensionService, trackerService, intentInstallCoordinator, flowRuleService);
extensionService.registerInstaller(MockInstallableIntent.class, installer);
assertTrue("store should be empty", Sets.newHashSet(service.getIntents()).isEmpty());
assertEquals(0L, flowRuleService.getFlowRuleCount());
}
Aggregations