X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fsal-netconf-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fsal%2Fconnect%2Fnetconf%2Fsal%2Ftx%2FWriteRunningTxTest.java;h=ab53dc4f4d12e870b28df24ac8ab1665b574472d;hb=ddfdd7b56162e9c45639388b10407d45f5f0ba13;hp=9668bb158a793641d44f5b76ac1e494b0f53f768;hpb=e7149587aacbb9a2afae4f89db6976574588ac47;p=netconf.git diff --git a/netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/sal/tx/WriteRunningTxTest.java b/netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/sal/tx/WriteRunningTxTest.java index 9668bb158a..ab53dc4f4d 100644 --- a/netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/sal/tx/WriteRunningTxTest.java +++ b/netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/sal/tx/WriteRunningTxTest.java @@ -29,6 +29,7 @@ import org.opendaylight.netconf.sal.connect.netconf.util.NetconfMessageTransform import org.opendaylight.netconf.sal.connect.util.RemoteDeviceId; import org.opendaylight.yangtools.yang.model.api.SchemaContext; import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils; public class WriteRunningTxTest { @@ -40,7 +41,8 @@ public class WriteRunningTxTest { @Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); - final SchemaContext schemaContext = TxTestUtils.parseYangStreams(getClass().getResourceAsStream("/schemas/test-module.yang")); + final SchemaContext schemaContext = + YangParserTestUtils.parseYangStreams(getClass().getResourceAsStream("/schemas/test-module.yang")); doReturn(Futures.immediateCheckedFuture(new DefaultDOMRpcResult())).when(rpc).invokeRpc(any(), any()); netconfOps = new NetconfBaseOps(rpc, schemaContext); id = new RemoteDeviceId("device1", InetSocketAddress.createUnresolved("0.0.0.0", 17830)); @@ -54,10 +56,12 @@ public class WriteRunningTxTest { tx.put(LogicalDatastoreType.CONFIGURATION, TxTestUtils.getContainerId(), TxTestUtils.getContainerNode()); tx.merge(LogicalDatastoreType.CONFIGURATION, TxTestUtils.getLeafId(), TxTestUtils.getLeafNode()); //check, if no edit-config is called before submit - verify(rpc, never()).invokeRpc(eq(SchemaPath.create(true, NetconfMessageTransformUtil.NETCONF_EDIT_CONFIG_QNAME)), any()); + verify(rpc, never()) + .invokeRpc(eq(SchemaPath.create(true, NetconfMessageTransformUtil.NETCONF_EDIT_CONFIG_QNAME)), any()); tx.submit().get(); //check, if both edits are called - verify(rpc, times(2)).invokeRpc(eq(SchemaPath.create(true, NetconfMessageTransformUtil.NETCONF_EDIT_CONFIG_QNAME)), any()); + verify(rpc, times(2)) + .invokeRpc(eq(SchemaPath.create(true, NetconfMessageTransformUtil.NETCONF_EDIT_CONFIG_QNAME)), any()); //check, if unlock is called verify(rpc).invokeRpc(eq(SchemaPath.create(true, NetconfMessageTransformUtil.NETCONF_UNLOCK_QNAME)), any()); }