use of org.onosproject.net.flowobjective.FlowObjectiveServiceAdapter in project onos by opennetworkinglab.
the class LinkCollectionIntentFlowObjectiveCompilerTest method setUp.
@Before
public void setUp() {
compiler = new LinkCollectionIntentFlowObjectiveCompiler();
coreService = createMock(CoreService.class);
expect(coreService.registerApplication("org.onosproject.net.intent")).andReturn(appId);
flowObjectiveService = new FlowObjectiveServiceAdapter();
resourceService = new MockResourceService();
compiler.coreService = coreService;
compiler.flowObjectiveService = flowObjectiveService;
domainService = createMock(DomainService.class);
expect(domainService.getDomain(anyObject(DeviceId.class))).andReturn(LOCAL).anyTimes();
compiler.domainService = domainService;
super.setUp();
intentExtensionService = createMock(IntentExtensionService.class);
intentExtensionService.registerCompiler(LinkCollectionIntent.class, compiler);
intentExtensionService.unregisterCompiler(LinkCollectionIntent.class);
registrator = new IntentConfigurableRegistrator();
registrator.extensionService = intentExtensionService;
registrator.cfgService = new ComponentConfigAdapter();
registrator.activate();
compiler.registrator = registrator;
compiler.resourceService = resourceService;
LinkCollectionCompiler.optimizeInstructions = false;
LinkCollectionCompiler.copyTtl = false;
replay(coreService, domainService, intentExtensionService);
compiler.activate();
}
Aggregations