Search in sources :

Example 1 with DefaultConfig

use of org.onosproject.yang.gen.v1.openconfigterminaldevice.rev20170708.openconfigterminaldevice.terminallogicalchanassignmenttop.logicalchannelassignments.assignment.DefaultConfig in project onos by opennetworkinglab.

the class OpenConfigComponentHandlerTest method testAddConfig.

/**
 * UnitTest method for addConfig.
 */
@Test
public void testAddConfig() {
    // test Handler
    OpenConfigComponentHandler component = new OpenConfigComponentHandler("name", parent);
    // call addConfig
    OpenConfigConfigOfComponentHandler config = new OpenConfigConfigOfComponentHandler(component);
    // expected ModelObject
    DefaultComponent modelObject = new DefaultComponent();
    modelObject.name("name");
    DefaultConfig con = new DefaultConfig();
    modelObject.config(con);
    assertEquals("[NG]addConfig:ModelObject(Config added) is not an expected one.\n", modelObject, component.getModelObject());
}
Also used : DefaultComponent(org.onosproject.yang.gen.v1.openconfigplatform.rev20180603.openconfigplatform.platformcomponenttop.components.DefaultComponent) DefaultConfig(org.onosproject.yang.gen.v1.openconfigplatform.rev20180603.openconfigplatform.platformcomponenttop.components.component.DefaultConfig) Test(org.junit.Test)

Example 2 with DefaultConfig

use of org.onosproject.yang.gen.v1.openconfigterminaldevice.rev20170708.openconfigterminaldevice.terminallogicalchanassignmenttop.logicalchannelassignments.assignment.DefaultConfig in project onos by opennetworkinglab.

the class OpenConfigConfigOfAssignmentHandlerTest method testAddLogicalChannel.

/**
 * UnitTest method for addLogicalChannel.
 */
@Test
public void testAddLogicalChannel() {
    // test Handler
    OpenConfigConfigOfAssignmentHandler config = new OpenConfigConfigOfAssignmentHandler(parent);
    // call addLogicalChannel
    config.addLogicalChannel("name");
    // expected ModelObject
    DefaultConfig modelObject = new DefaultConfig();
    modelObject.logicalChannel("name");
    assertEquals("[NG]addLogicalChannel:ModelObject(LogicalChannel added) is not an expected one.\n", modelObject, config.getModelObject());
}
Also used : DefaultConfig(org.onosproject.yang.gen.v1.openconfigterminaldevice.rev20170708.openconfigterminaldevice.terminallogicalchanassignmenttop.logicalchannelassignments.assignment.DefaultConfig) Test(org.junit.Test)

Example 3 with DefaultConfig

use of org.onosproject.yang.gen.v1.openconfigterminaldevice.rev20170708.openconfigterminaldevice.terminallogicalchanassignmenttop.logicalchannelassignments.assignment.DefaultConfig in project onos by opennetworkinglab.

the class OpenConfigConfigOfAssignmentHandlerTest method testGetModelObject.

/**
 * UnitTest method for getModelObject.
 */
@Test
public void testGetModelObject() {
    // test Handler
    OpenConfigConfigOfAssignmentHandler config = new OpenConfigConfigOfAssignmentHandler(parent);
    // expected ModelObject
    DefaultConfig modelObject = new DefaultConfig();
    assertEquals("[NG]getModelObject:Return is not an expected ModelObject.\n", modelObject, config.getModelObject());
}
Also used : DefaultConfig(org.onosproject.yang.gen.v1.openconfigterminaldevice.rev20170708.openconfigterminaldevice.terminallogicalchanassignmenttop.logicalchannelassignments.assignment.DefaultConfig) Test(org.junit.Test)

Example 4 with DefaultConfig

use of org.onosproject.yang.gen.v1.openconfigterminaldevice.rev20170708.openconfigterminaldevice.terminallogicalchanassignmenttop.logicalchannelassignments.assignment.DefaultConfig in project onos by opennetworkinglab.

the class OpenConfigConfigOfChannelHandlerTest method testGetModelObject.

/**
 * UnitTest method for getModelObject.
 */
@Test
public void testGetModelObject() {
    // test Handler
    OpenConfigConfigOfChannelHandler config = new OpenConfigConfigOfChannelHandler(parent);
    // expected ModelObject
    DefaultConfig modelObject = new DefaultConfig();
    assertEquals("[NG]getModelObject:Return is not an expected ModelObject.\n", modelObject, config.getModelObject());
}
Also used : DefaultConfig(org.onosproject.yang.gen.v1.openconfigterminaldevice.rev20170708.openconfigterminaldevice.terminallogicalchanneltop.logicalchannels.channel.DefaultConfig) Test(org.junit.Test)

Example 5 with DefaultConfig

use of org.onosproject.yang.gen.v1.openconfigterminaldevice.rev20170708.openconfigterminaldevice.terminallogicalchanassignmenttop.logicalchannelassignments.assignment.DefaultConfig in project onos by opennetworkinglab.

the class OpenConfigConfigOfChannelHandlerTest method testAddIndex.

/**
 * UnitTest method for addIndex.
 */
@Test
public void testAddIndex() {
    // test Handler
    OpenConfigConfigOfChannelHandler config = new OpenConfigConfigOfChannelHandler(parent);
    // call addIndex
    config.addIndex(2);
    // expected ModelObject
    DefaultConfig modelObject = new DefaultConfig();
    modelObject.index(2);
    assertEquals("[NG]addIndex:ModelObject(Index added) is not an expected one.\n", modelObject, config.getModelObject());
}
Also used : DefaultConfig(org.onosproject.yang.gen.v1.openconfigterminaldevice.rev20170708.openconfigterminaldevice.terminallogicalchanneltop.logicalchannels.channel.DefaultConfig) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)15 DefaultConfig (org.onosproject.yang.gen.v1.openconfigterminaldevice.rev20170708.openconfigterminaldevice.terminallogicalchanassignmenttop.logicalchannelassignments.assignment.DefaultConfig)6 Component (org.onosproject.yang.gen.v1.openconfigplatform.rev20161222.openconfigplatform.platformcomponenttop.components.Component)3 DefaultConfig (org.onosproject.yang.gen.v1.openconfigplatform.rev20180603.openconfigplatform.platformcomponenttop.components.component.DefaultConfig)3 DefaultConfig (org.onosproject.yang.gen.v1.openconfigplatformtransceiver.rev20180515.openconfigplatformtransceiver.porttransceivertop.transceiver.DefaultConfig)3 DefaultConfig (org.onosproject.yang.gen.v1.openconfigterminaldevice.rev20170708.openconfigterminaldevice.terminallogicalchanneltop.logicalchannels.channel.DefaultConfig)3 DefaultComponents (org.onosproject.yang.gen.v1.openconfigplatform.rev20161222.openconfigplatform.platformcomponenttop.DefaultComponents)2 DefaultComponent (org.onosproject.yang.gen.v1.openconfigplatform.rev20161222.openconfigplatform.platformcomponenttop.components.DefaultComponent)1 Config (org.onosproject.yang.gen.v1.openconfigplatform.rev20161222.openconfigplatform.platformcomponenttop.components.component.Config)1 DefaultConfig (org.onosproject.yang.gen.v1.openconfigplatform.rev20161222.openconfigplatform.platformcomponenttop.components.component.DefaultConfig)1 DefaultComponent (org.onosproject.yang.gen.v1.openconfigplatform.rev20180603.openconfigplatform.platformcomponenttop.components.DefaultComponent)1 DefaultAugmentedOcPlatformComponent (org.onosproject.yang.gen.v1.openconfigplatformtransceiver.rev20170708.openconfigplatformtransceiver.components.component.DefaultAugmentedOcPlatformComponent)1 DefaultTransceiver (org.onosproject.yang.gen.v1.openconfigplatformtransceiver.rev20170708.openconfigplatformtransceiver.porttransceivertop.DefaultTransceiver)1 Config (org.onosproject.yang.gen.v1.openconfigplatformtransceiver.rev20170708.openconfigplatformtransceiver.porttransceivertop.transceiver.Config)1 DefaultConfig (org.onosproject.yang.gen.v1.openconfigplatformtransceiver.rev20170708.openconfigplatformtransceiver.porttransceivertop.transceiver.DefaultConfig)1 DefaultTransceiver (org.onosproject.yang.gen.v1.openconfigplatformtransceiver.rev20180515.openconfigplatformtransceiver.porttransceivertop.DefaultTransceiver)1 DefaultAugmentedOcPlatformComponent (org.onosproject.yang.gen.v1.openconfigterminaldevice.rev20170708.openconfigterminaldevice.components.component.DefaultAugmentedOcPlatformComponent)1 DefaultAssignment (org.onosproject.yang.gen.v1.openconfigterminaldevice.rev20170708.openconfigterminaldevice.terminallogicalchanassignmenttop.logicalchannelassignments.DefaultAssignment)1 DefaultChannel (org.onosproject.yang.gen.v1.openconfigterminaldevice.rev20170708.openconfigterminaldevice.terminallogicalchanneltop.logicalchannels.DefaultChannel)1 DefaultOpticalChannel (org.onosproject.yang.gen.v1.openconfigterminaldevice.rev20170708.openconfigterminaldevice.terminalopticalchanneltop.DefaultOpticalChannel)1