use of org.onlab.osgi.ServiceDirectory in project onos by opennetworkinglab.
the class ControlMetricsResourceTest method setUpTest.
/**
* Sets up the global values for all the tests.
*/
@Before
public void setUpTest() {
final CodecManager codecService = new CodecManager();
codecService.activate();
codecService.registerCodec(ControlLoadSnapshot.class, new ControlLoadSnapshotCodec());
ServiceDirectory testDirectory = new TestServiceDirectory().add(ControlPlaneMonitorService.class, mockControlPlaneMonitorService).add(ClusterService.class, mockClusterService).add(CodecService.class, codecService);
setServiceDirectory(testDirectory);
nodeId = new NodeId("1");
mockControlLoad = new MockControlLoad();
ControllerNode mockControllerNode = new MockControllerNode(nodeId);
expect(mockClusterService.getLocalNode()).andReturn(mockControllerNode).anyTimes();
replay(mockClusterService);
}
use of org.onlab.osgi.ServiceDirectory in project onos by opennetworkinglab.
the class AlarmsWebResourceTest method setUpMock.
@Before
public void setUpMock() {
CodecManager codecService = new CodecManager();
codecService.activate();
ServiceDirectory testDirectory = new TestServiceDirectory().add(CodecService.class, codecService);
setServiceDirectory(testDirectory);
}
use of org.onlab.osgi.ServiceDirectory in project onos by opennetworkinglab.
the class OpenstackFloatingIpWebResourceTest method setUpTest.
/**
* Sets up the global values for all tests.
*/
@Before
public void setUpTest() {
ServiceDirectory testDirectory = new TestServiceDirectory().add(OpenstackRouterAdminService.class, mockOpenstackRouterAdminService).add(OpenstackHaService.class, mockOpenstackHaService);
setServiceDirectory(testDirectory);
}
use of org.onlab.osgi.ServiceDirectory in project onos by opennetworkinglab.
the class OpenstackNetworkWebResourceTest method setUpTest.
/**
* Sets up the global values for all tests.
*/
@Before
public void setUpTest() {
ServiceDirectory testDirectory = new TestServiceDirectory().add(OpenstackNetworkAdminService.class, mockOpenstackNetworkAdminService).add(OpenstackHaService.class, mockOpenstackHaService);
setServiceDirectory(testDirectory);
}
use of org.onlab.osgi.ServiceDirectory in project onos by opennetworkinglab.
the class OpenstackPortWebResourceTest method setUpTest.
/**
* Sets up the global values for all tests.
*/
@Before
public void setUpTest() {
ServiceDirectory testDirectory = new TestServiceDirectory().add(OpenstackNetworkAdminService.class, mockOpenstackNetworkAdminService).add(OpenstackNodeService.class, mockOpenstackNodeService).add(OpenstackHaService.class, mockOpenstackHaService);
setServiceDirectory(testDirectory);
}
Aggregations