Search in sources :

Example 1 with InterfaceListener

use of org.onosproject.net.intf.InterfaceListener in project onos by opennetworkinglab.

the class ControlPlaneRedirectManagerTest method setUp.

@Before
public void setUp() {
    networkConfigListener = createMock(NetworkConfigListener.class);
    deviceService = new TestDeviceService();
    deviceListener = createMock(DeviceListener.class);
    interfaceListener = createMock(InterfaceListener.class);
    deviceService.addListener(deviceListener);
    setUpInterfaceService();
    interfaceService = new InternalInterfaceService();
    interfaceService.addListener(interfaceListener);
    networkConfigService = new TestNetworkConfigService();
    networkConfigService.addListener(networkConfigListener);
    flowObjectiveService = createMock(FlowObjectiveService.class);
    applicationService = createNiceMock(ApplicationService.class);
    replay(applicationService);
    setUpFlowObjectiveService();
    controlPlaneRedirectManager.coreService = coreService;
    controlPlaneRedirectManager.flowObjectiveService = flowObjectiveService;
    controlPlaneRedirectManager.networkConfigService = networkConfigService;
    controlPlaneRedirectManager.interfaceService = interfaceService;
    controlPlaneRedirectManager.deviceService = deviceService;
    controlPlaneRedirectManager.hostService = createNiceMock(HostService.class);
    controlPlaneRedirectManager.mastershipService = mastershipService;
    controlPlaneRedirectManager.applicationService = applicationService;
    controlPlaneRedirectManager.activate(new ComponentContextAdapter());
    verify(flowObjectiveService);
}
Also used : HostService(org.onosproject.net.host.HostService) DeviceListener(org.onosproject.net.device.DeviceListener) ComponentContextAdapter(org.onlab.osgi.ComponentContextAdapter) FlowObjectiveService(org.onosproject.net.flowobjective.FlowObjectiveService) NetworkConfigListener(org.onosproject.net.config.NetworkConfigListener) InterfaceListener(org.onosproject.net.intf.InterfaceListener) ApplicationService(org.onosproject.app.ApplicationService) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 ComponentContextAdapter (org.onlab.osgi.ComponentContextAdapter)1 ApplicationService (org.onosproject.app.ApplicationService)1 NetworkConfigListener (org.onosproject.net.config.NetworkConfigListener)1 DeviceListener (org.onosproject.net.device.DeviceListener)1 FlowObjectiveService (org.onosproject.net.flowobjective.FlowObjectiveService)1 HostService (org.onosproject.net.host.HostService)1 InterfaceListener (org.onosproject.net.intf.InterfaceListener)1