use of org.onosproject.yang.model.ResourceId in project onos by opennetworkinglab.
the class OpenConfigChannelHandlerTest method testSetResourceId.
/**
* UnitTest method for setResourceId.
*/
@Test
public void testSetResourceId() {
// call setResourceId
OpenConfigChannelHandler channel = new OpenConfigChannelHandler(1, parent);
// get resourceId
ResourceId resourceId = null;
try {
Field field = OpenConfigObjectHandler.class.getDeclaredField("resourceId");
field.setAccessible(true);
resourceId = (ResourceId) field.get(channel);
} catch (NoSuchFieldException e) {
Assert.fail("[NG]setResourceId:ResourceId does not exist.\n" + e);
} catch (IllegalAccessException e) {
Assert.fail("[NG]setResourceId:Access to ResourceId is illegal.\n" + e);
}
assertEquals("[NG]setResourceId:Set ResourceId is not an expected one.\n", rid, resourceId);
}
use of org.onosproject.yang.model.ResourceId in project onos by opennetworkinglab.
the class OpenConfigComponentsHandlerTest method testSetResourceId.
/**
* UnitTest method for setResourceId.
*/
@Test
public void testSetResourceId() {
// call setResourceId
OpenConfigComponentsHandler components = new OpenConfigComponentsHandler();
// get resourceId
ResourceId resourceId = null;
try {
Field field = OpenConfigObjectHandler.class.getDeclaredField("resourceId");
field.setAccessible(true);
resourceId = (ResourceId) field.get(components);
} catch (NoSuchFieldException e) {
Assert.fail("[NG]setResourceId:ResourceId does not exist.\n" + e);
} catch (IllegalAccessException e) {
Assert.fail("[NG]setResourceId:Access to ResourceId is illegal.\n" + e);
}
assertEquals("[NG]setResourceId:Set ResourceId is not an expected one.\n", rid, resourceId);
}
use of org.onosproject.yang.model.ResourceId in project onos by opennetworkinglab.
the class OpenConfigConfigOfTransceiverHandlerTest method testSetResourceId.
/**
* UnitTest method for setResourceId.
*/
@Test
public void testSetResourceId() {
// call setResourceId
OpenConfigConfigOfTransceiverHandler config = new OpenConfigConfigOfTransceiverHandler(parent);
// get resourceId
ResourceId resourceId = null;
try {
Field field = OpenConfigObjectHandler.class.getDeclaredField("resourceId");
field.setAccessible(true);
resourceId = (ResourceId) field.get(config);
} catch (NoSuchFieldException e) {
Assert.fail("[NG]setResourceId:ResourceId does not exist.\n" + e);
} catch (IllegalAccessException e) {
Assert.fail("[NG]setResourceId:Access to ResourceId is illegal.\n" + e);
}
assertEquals("[NG]setResourceId:Set ResourceId is not an expected one.\n", rid, resourceId);
}
use of org.onosproject.yang.model.ResourceId in project onos by opennetworkinglab.
the class OpenConfigLogicalChannelsHandlerTest method testSetResourceId.
/**
* UnitTest method for setResourceId.
*/
@Test
public void testSetResourceId() {
// call setResourceId
OpenConfigLogicalChannelsHandler logicalChannels = new OpenConfigLogicalChannelsHandler(parent);
// get resourceId
ResourceId resourceId = null;
try {
Field field = OpenConfigObjectHandler.class.getDeclaredField("resourceId");
field.setAccessible(true);
resourceId = (ResourceId) field.get(logicalChannels);
} catch (NoSuchFieldException e) {
Assert.fail("[NG]setResourceId:ResourceId does not exist.\n" + e);
} catch (IllegalAccessException e) {
Assert.fail("[NG]setResourceId:Access to ResourceId is illegal.\n" + e);
}
assertEquals("[NG]setResourceId:Set ResourceId is not an expected one.\n", rid, resourceId);
}
use of org.onosproject.yang.model.ResourceId in project onos by opennetworkinglab.
the class OpenConfigTerminalDeviceHandlerTest method testSetResourceId.
/**
* UnitTest method for setResourceId.
*/
@Test
public void testSetResourceId() {
// call setResourceId
OpenConfigTerminalDeviceHandler terminalDevice = new OpenConfigTerminalDeviceHandler();
// get resourceId
ResourceId resourceId = null;
try {
Field field = OpenConfigObjectHandler.class.getDeclaredField("resourceId");
field.setAccessible(true);
resourceId = (ResourceId) field.get(terminalDevice);
} catch (NoSuchFieldException e) {
Assert.fail("[NG]setResourceId:ResourceId does not exist.\n" + e);
} catch (IllegalAccessException e) {
Assert.fail("[NG]setResourceId:Access to ResourceId is illegal.\n" + e);
}
assertEquals("[NG]setResourceId:Set ResourceId is not an expected one.\n", rid, resourceId);
}
Aggregations