use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.GetTopOutputBuilder in project netconf by opendaylight.
the class MountPointEndToEndTest method testDOMRpcService.
private void testDOMRpcService(final DOMRpcService domRpcService) throws InterruptedException, ExecutionException, TimeoutException {
testPutTopRpc(domRpcService, new DefaultDOMRpcResult((NormalizedNode) null));
testPutTopRpc(domRpcService, null);
testPutTopRpc(domRpcService, new DefaultDOMRpcResult(ImmutableList.of(RpcResultBuilder.newError(ErrorType.APPLICATION, "tag1", "error1"), RpcResultBuilder.newError(ErrorType.APPLICATION, "tag2", "error2"))));
testGetTopRpc(domRpcService, new DefaultDOMRpcResult(bindingToNormalized.toNormalizedNodeRpcData(new GetTopOutputBuilder().setTopLevelList(oneTopLevelList()).build())));
testFailedRpc(domRpcService, getTopRpcSchemaPath, getTopInput);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.GetTopOutputBuilder 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);
}
Aggregations