Search in sources :

Example 6 with CodecManager

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());
}
Also used : LispSrcDstAddress(org.onosproject.drivers.lisp.extensions.LispSrcDstAddress) CodecManager(org.onosproject.codec.impl.CodecManager) LispMappingExtensionCodecRegistrator(org.onosproject.drivers.lisp.extensions.LispMappingExtensionCodecRegistrator) Before(org.junit.Before)

Example 7 with CodecManager

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);
}
Also used : ServiceDirectory(org.onlab.osgi.ServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) VirtualNetworkAdminService(org.onosproject.incubator.net.virtual.VirtualNetworkAdminService) Before(org.junit.Before)

Example 8 with CodecManager

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);
}
Also used : ServiceDirectory(org.onlab.osgi.ServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) VirtualNetworkService(org.onosproject.incubator.net.virtual.VirtualNetworkService) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) Before(org.junit.Before)

Example 9 with CodecManager

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);
}
Also used : ServiceDirectory(org.onlab.osgi.ServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) MulticastRouteService(org.onosproject.net.mcast.MulticastRouteService) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) Before(org.junit.Before)

Example 10 with CodecManager

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);
}
Also used : PathService(org.onosproject.net.topology.PathService) ServiceDirectory(org.onlab.osgi.ServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) Before(org.junit.Before)

Aggregations

CodecManager (org.onosproject.codec.impl.CodecManager)53 Before (org.junit.Before)48 TestServiceDirectory (org.onlab.osgi.TestServiceDirectory)35 ServiceDirectory (org.onlab.osgi.ServiceDirectory)30 LispMappingExtensionCodecRegistrator (org.onosproject.drivers.lisp.extensions.LispMappingExtensionCodecRegistrator)10 MappingCodecRegistrator (org.onosproject.mapping.MappingCodecRegistrator)7 BeforeClass (org.junit.BeforeClass)5 CodecService (org.onosproject.codec.CodecService)5 BaseConfig (org.onosproject.net.config.BaseConfig)5 DeviceService (org.onosproject.net.device.DeviceService)5 CoreService (org.onosproject.core.CoreService)2 K8sNetworkAdminService (org.onosproject.k8snetworking.api.K8sNetworkAdminService)2 MetricsService (org.onlab.metrics.MetricsService)1 ApplicationAdminService (org.onosproject.app.ApplicationAdminService)1 ClusterService (org.onosproject.cluster.ClusterService)1 ControllerNode (org.onosproject.cluster.ControllerNode)1 NodeId (org.onosproject.cluster.NodeId)1 ControlLoadSnapshotCodec (org.onosproject.cpman.codec.ControlLoadSnapshotCodec)1 LispAppDataAddress (org.onosproject.drivers.lisp.extensions.LispAppDataAddress)1 LispAsAddress (org.onosproject.drivers.lisp.extensions.LispAsAddress)1