use of org.opendaylight.mdsal.dom.spi.DefaultDOMRpcResult 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.mdsal.dom.spi.DefaultDOMRpcResult in project netconf by opendaylight.
the class NetconfDataTreeServiceActorTest method testReplace.
@Test
public void testReplace() {
doReturn(FluentFutures.immediateFluentFuture(new DefaultDOMRpcResult())).when(netconfService).replace(STORE, PATH, NODE, Optional.empty());
final NormalizedNodeMessage node = new NormalizedNodeMessage(PATH, NODE);
actorRef.tell(new ReplaceEditConfigRequest(STORE, node, null), probe.ref());
verify(netconfService).replace(STORE, PATH, NODE, Optional.empty());
}
use of org.opendaylight.mdsal.dom.spi.DefaultDOMRpcResult in project netconf by opendaylight.
the class NetconfDataTreeServiceActorTest method testRemove.
@Test
public void testRemove() {
doReturn(FluentFutures.immediateFluentFuture(new DefaultDOMRpcResult())).when(netconfService).remove(STORE, PATH);
actorRef.tell(new RemoveEditConfigRequest(STORE, PATH), probe.ref());
verify(netconfService).remove(STORE, PATH);
}
use of org.opendaylight.mdsal.dom.spi.DefaultDOMRpcResult in project netconf by opendaylight.
the class NetconfDataTreeServiceActorTest method testCommit.
@Test
public void testCommit() {
doReturn(FluentFutures.immediateFluentFuture(new DefaultDOMRpcResult())).when(netconfService).commit();
actorRef.tell(new CommitRequest(), probe.ref());
verify(netconfService).commit();
probe.expectMsgClass(InvokeRpcMessageReply.class);
}
use of org.opendaylight.mdsal.dom.spi.DefaultDOMRpcResult in project netconf by opendaylight.
the class NetconfDataTreeServiceActorTest method testCreate.
@Test
public void testCreate() {
doReturn(FluentFutures.immediateFluentFuture(new DefaultDOMRpcResult())).when(netconfService).create(STORE, PATH, NODE, Optional.empty());
final NormalizedNodeMessage node = new NormalizedNodeMessage(PATH, NODE);
actorRef.tell(new CreateEditConfigRequest(STORE, node, null), probe.ref());
verify(netconfService).create(STORE, PATH, NODE, Optional.empty());
}
Aggregations