use of org.onosproject.codec.impl.CodecManager in project onos by opennetworkinglab.
the class LispSrcDstAddressCodecTest method setUp.
/**
* Sets up for each test.
* Creates a context and fetches the LispSrcDstAddress codec.
*/
@Before
public void setUp() {
CodecManager manager = new CodecManager();
registrator = new LispMappingExtensionCodecRegistrator();
registrator.codecService = manager;
registrator.activate();
context = new LispMappingExtensionCodecContextAdapter(registrator.codecService);
srcDstAddressCodec = context.codec(LispSrcDstAddress.class);
assertThat("Source and Destination address codec should not be null", srcDstAddressCodec, notNullValue());
}
use of org.onosproject.codec.impl.CodecManager in project onos by opennetworkinglab.
the class TenantWebResourceTest method setUpTest.
/**
* Sets up the global values for all the tests.
*/
@Before
public void setUpTest() {
// Register the services needed for the test
CodecManager codecService = new CodecManager();
codecService.activate();
ServiceDirectory testDirectory = new TestServiceDirectory().add(VirtualNetworkAdminService.class, mockVnetAdminService).add(CodecService.class, codecService);
setServiceDirectory(testDirectory);
}
use of org.onosproject.codec.impl.CodecManager in project onos by opennetworkinglab.
the class VirtualNetworkWebResourceTest method setUpTest.
/**
* Sets up the global values for all the tests.
*/
@Before
public void setUpTest() {
// Register the services needed for the test
codecService = new CodecManager();
codecService.activate();
ServiceDirectory testDirectory = new TestServiceDirectory().add(VirtualNetworkAdminService.class, mockVnetAdminService).add(VirtualNetworkService.class, mockVnetService).add(CodecService.class, codecService);
setServiceDirectory(testDirectory);
}
use of org.onosproject.codec.impl.CodecManager in project onos by opennetworkinglab.
the class MulticastRouteResourceTest method setupTest.
@Before
public void setupTest() {
final CodecManager codecService = new CodecManager();
codecService.activate();
ServiceDirectory testDirectory = new TestServiceDirectory().add(MulticastRouteService.class, mockMulticastRouteService).add(CodecService.class, codecService);
setServiceDirectory(testDirectory);
}
use of org.onosproject.codec.impl.CodecManager in project onos by opennetworkinglab.
the class PathsResourceTest method setUpTest.
/**
* Initializes test mocks and environment.
*/
@Before
public void setUpTest() {
// Register the services needed for the test
CodecManager codecService = new CodecManager();
codecService.activate();
ServiceDirectory testDirectory = new TestServiceDirectory().add(PathService.class, mockPathService).add(CodecService.class, codecService);
setServiceDirectory(testDirectory);
}
Aggregations