use of org.onosproject.store.trivial.SimpleIntentStore in project onos by opennetworkinglab.
the class FlowRuleIntentInstallerTest method setup.
@Before
public void setup() {
super.setup();
flowRuleService = new TestFlowRuleService();
installer = new FlowRuleIntentInstaller();
installer.flowRuleService = flowRuleService;
installer.store = new SimpleIntentStore();
installer.intentExtensionService = intentExtensionService;
installer.intentInstallCoordinator = intentInstallCoordinator;
installer.trackerService = trackerService;
installer.configService = mock(ComponentConfigService.class);
installer.activate();
}
use of org.onosproject.store.trivial.SimpleIntentStore in project onos by opennetworkinglab.
the class IntentCleanupTest method setUp.
@Before
public void setUp() {
service = new MockIntentService();
store = new SimpleIntentStore();
cleanup = new IntentCleanup();
super.setUp();
cleanup.cfgService = new ComponentConfigAdapter();
cleanup.service = service;
cleanup.store = store;
cleanup.period = 10;
cleanup.retryThreshold = 3;
cleanup.activate();
assertTrue("store should be empty", Sets.newHashSet(cleanup.store.getIntents()).isEmpty());
}
use of org.onosproject.store.trivial.SimpleIntentStore 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());
}
use of org.onosproject.store.trivial.SimpleIntentStore in project onos by opennetworkinglab.
the class IntentCleanupTestMock method setUp.
@Before
public void setUp() {
service = createMock(IntentService.class);
store = new SimpleIntentStore();
cleanup = new IntentCleanup();
cleanup.cfgService = new ComponentConfigAdapter();
cleanup.service = service;
cleanup.store = store;
cleanup.period = 1000;
cleanup.retryThreshold = 3;
assertTrue("store should be empty", Sets.newHashSet(cleanup.store.getIntents()).isEmpty());
super.setUp();
}
Aggregations