use of org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage in project netconf by opendaylight.
the class WriteTransactionActorTestAdapter method testMerge.
@Test
public void testMerge() {
final NormalizedNodeMessage normalizedNodeMessage = new NormalizedNodeMessage(PATH, NODE);
actorRef.tell(new MergeRequest(STORE, normalizedNodeMessage), probe.ref());
verify(mockWriteTx).merge(STORE, PATH, NODE);
}
use of org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage in project netconf by opendaylight.
the class ProxyNetconfServiceTest method testGet.
@Test
public void testGet() throws Exception {
ProxyNetconfService netconf = newSuccessfulProxyNetconfService();
final ListenableFuture<Optional<NormalizedNode>> get = netconf.get(PATH);
final GetRequest getRequest = masterActor.expectMsgClass(GetRequest.class);
assertEquals(PATH, getRequest.getPath());
masterActor.reply(new NormalizedNodeMessage(PATH, node));
final Optional<NormalizedNode> result = get.get(5, TimeUnit.SECONDS);
assertTrue(result.isPresent());
assertEquals(node, result.get());
}
use of org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage in project netconf by opendaylight.
the class NetconfDataTreeServiceActorTest method testGetConfig.
@Test
public void testGetConfig() {
doReturn(immediateFluentFuture(Optional.of(NODE))).when(netconfService).getConfig(PATH);
actorRef.tell(new GetConfigRequest(PATH), probe.ref());
verify(netconfService).getConfig(PATH);
final NormalizedNodeMessage response = probe.expectMsgClass(NormalizedNodeMessage.class);
assertEquals(NODE, response.getNode());
}
use of org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage in project netconf by opendaylight.
the class NetconfDataTreeServiceActorTest method testMerge.
@Test
public void testMerge() {
doReturn(FluentFutures.immediateFluentFuture(new DefaultDOMRpcResult())).when(netconfService).merge(STORE, PATH, NODE, Optional.empty());
final NormalizedNodeMessage node = new NormalizedNodeMessage(PATH, NODE);
actorRef.tell(new MergeEditConfigRequest(STORE, node, null), probe.ref());
verify(netconfService).merge(STORE, PATH, NODE, Optional.empty());
}
use of org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage in project netconf by opendaylight.
the class ReadTransactionActorTestAdapter method testRead.
@Test
public void testRead() {
doReturn(immediateFluentFuture(Optional.of(NODE))).when(mockReadTx).read(STORE, PATH);
actorRef.tell(new ReadRequest(STORE, PATH), probe.ref());
verify(mockReadTx).read(STORE, PATH);
final NormalizedNodeMessage response = probe.expectMsgClass(NormalizedNodeMessage.class);
assertEquals(NODE, response.getNode());
}
Aggregations