use of org.onosproject.codec.impl.CodecManager in project onos by opennetworkinglab.
the class LispExtensionMappingAddressInterpreterTest method setUp.
@Before
public void setUp() {
interpreter = new LispExtensionMappingAddressInterpreter();
initExtAddresses();
initLcafAddresses();
CodecManager manager = new CodecManager();
registrator = new LispMappingExtensionCodecRegistrator();
registrator.codecService = manager;
registrator.activate();
context = new LispMappingExtensionCodecContextAdapter(registrator.codecService);
}
use of org.onosproject.codec.impl.CodecManager in project onos by opennetworkinglab.
the class PortAnnotationConfigTest method setUpClass.
// TODO consolidate code-clone in ProtectionConfigTest, and define constants for field name
@BeforeClass
public static void setUpClass() throws TestUtilsException {
directory = new TestServiceDirectory();
CodecManager codecService = new CodecManager();
codecService.activate();
directory.add(CodecService.class, codecService);
// replace service directory used by BaseConfig
original = TestUtils.getField(BaseConfig.class, "services");
TestUtils.setField(BaseConfig.class, "services", directory);
}
use of org.onosproject.codec.impl.CodecManager in project onos by opennetworkinglab.
the class DeviceAnnotationConfigTest method setUpClass.
// TODO consolidate code-clone in ProtectionConfigTest, and define constants for field name
@BeforeClass
public static void setUpClass() throws TestUtilsException {
directory = new TestServiceDirectory();
CodecManager codecService = new CodecManager();
codecService.activate();
directory.add(CodecService.class, codecService);
// replace service directory used by BaseConfig
original = TestUtils.getField(BaseConfig.class, "services");
TestUtils.setField(BaseConfig.class, "services", directory);
}
use of org.onosproject.codec.impl.CodecManager in project onos by opennetworkinglab.
the class ProtectionEndpointIntentInstallerTest method setUpClass.
@BeforeClass
public static void setUpClass() throws TestUtils.TestUtilsException {
directory = new TestServiceDirectory();
CodecManager codecService = new CodecManager();
codecService.activate();
directory.add(CodecService.class, codecService);
// replace service directory used by BaseConfig
original = TestUtils.getField(BaseConfig.class, "services");
TestUtils.setField(BaseConfig.class, "services", directory);
}
use of org.onosproject.codec.impl.CodecManager in project onos by opennetworkinglab.
the class LinksResourceTest method setUpTest.
/**
* Initializes test mocks and environment.
*/
@Before
public void setUpTest() {
mockLinkService = createMock(LinkService.class);
// Register the services needed for the test
CodecManager codecService = new CodecManager();
codecService.activate();
ServiceDirectory testDirectory = new TestServiceDirectory().add(LinkService.class, mockLinkService).add(CodecService.class, codecService);
setServiceDirectory(testDirectory);
}
Aggregations