Search in sources :

Example 1 with GetTopOutput

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.GetTopOutput in project mdsal by opendaylight.

the class RpcDataSerializationTest method testRpcOutputToNormalized.

@Test
public void testRpcOutputToNormalized() {
    final GetTopOutput bindingOriginal = new GetTopOutputBuilder().setTopLevelList(ImmutableMap.of(LIST_KEY, new TopLevelListBuilder().withKey(LIST_KEY).build())).build();
    final ContainerNode dom = codecContext.toNormalizedNodeRpcData(bindingOriginal);
    assertNotNull(dom);
    assertEquals(GetTopOutput.QNAME, dom.getIdentifier().getNodeType());
    final DataObject bindingDeserialized = codecContext.fromNormalizedNodeRpcData(GET_TOP_OUTPUT, dom);
    assertEquals(bindingOriginal, bindingDeserialized);
}
Also used : TopLevelListBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelListBuilder) DataObject(org.opendaylight.yangtools.yang.binding.DataObject) GetTopOutputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.GetTopOutputBuilder) ContainerNode(org.opendaylight.yangtools.yang.data.api.schema.ContainerNode) GetTopOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.GetTopOutput) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 GetTopOutput (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.GetTopOutput)1 GetTopOutputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.GetTopOutputBuilder)1 TopLevelListBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelListBuilder)1 DataObject (org.opendaylight.yangtools.yang.binding.DataObject)1 ContainerNode (org.opendaylight.yangtools.yang.data.api.schema.ContainerNode)1