Search in sources :

Example 1 with BaseConfig

use of org.onosproject.net.config.BaseConfig in project onos by opennetworkinglab.

the class ProtectionConfigTest method setUpClass.

@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);
}
Also used : TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) BaseConfig(org.onosproject.net.config.BaseConfig) BeforeClass(org.junit.BeforeClass)

Example 2 with BaseConfig

use of org.onosproject.net.config.BaseConfig in project onos by opennetworkinglab.

the class BaseConfigTestHelper method setUpBaseConfigClass.

@BeforeClass
public static void setUpBaseConfigClass() 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);
}
Also used : TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) BaseConfig(org.onosproject.net.config.BaseConfig) BeforeClass(org.junit.BeforeClass)

Example 3 with BaseConfig

use of org.onosproject.net.config.BaseConfig 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);
}
Also used : TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) BaseConfig(org.onosproject.net.config.BaseConfig) BeforeClass(org.junit.BeforeClass)

Example 4 with BaseConfig

use of org.onosproject.net.config.BaseConfig 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);
}
Also used : TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) BaseConfig(org.onosproject.net.config.BaseConfig) BeforeClass(org.junit.BeforeClass)

Example 5 with BaseConfig

use of org.onosproject.net.config.BaseConfig 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);
}
Also used : TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) BaseConfig(org.onosproject.net.config.BaseConfig) BeforeClass(org.junit.BeforeClass)

Aggregations

BeforeClass (org.junit.BeforeClass)5 TestServiceDirectory (org.onlab.osgi.TestServiceDirectory)5 CodecManager (org.onosproject.codec.impl.CodecManager)5 BaseConfig (org.onosproject.net.config.BaseConfig)5