X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fconfig-netconf-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fconfignetconfconnector%2Foperations%2FValidateTest.java;h=b5c5dd35442704253a4b1e906ab674e0b4a19b71;hb=b2e6c299fad844633c8b40a2e180780f5774a4ae;hp=de1ab71e013bd4c9b64eb2f5aff4b373a8d8d68a;hpb=4f623c74a703a31e787387b536981dcb344ca4f9;p=controller.git diff --git a/opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/ValidateTest.java b/opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/ValidateTest.java index de1ab71e01..b5c5dd3544 100644 --- a/opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/ValidateTest.java +++ b/opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/ValidateTest.java @@ -11,9 +11,9 @@ package org.opendaylight.controller.netconf.confignetconfconnector.operations; import org.junit.Test; import org.opendaylight.controller.config.api.ValidationException; import org.opendaylight.controller.netconf.api.NetconfDocumentedException; +import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants; import org.opendaylight.controller.netconf.confignetconfconnector.transactions.TransactionProvider; import org.opendaylight.controller.netconf.util.xml.XmlElement; -import org.opendaylight.controller.netconf.util.xml.XmlNetconfConstants; import org.opendaylight.controller.netconf.util.xml.XmlUtil; import org.w3c.dom.Element; @@ -30,7 +30,7 @@ public class ValidateTest { public void test() throws Exception { final XmlElement xml = XmlElement.fromString(""); final Validate validate = new Validate(null, null, NETCONF_SESSION_ID_FOR_REPORTING); - validate.handle(null, xml); + validate.handleWithNoSubsequentOperations(null, xml); } @Test(expected = NetconfDocumentedException.class) @@ -38,14 +38,14 @@ public class ValidateTest { final XmlElement xml = XmlElement.fromString(""); final Validate validate = new Validate(null, null, NETCONF_SESSION_ID_FOR_REPORTING); - validate.handle(null, xml); + validate.handleWithNoSubsequentOperations(null, xml); } @Test(expected = NetconfDocumentedException.class) public void testNoNamespace() throws Exception { final XmlElement xml = XmlElement.fromString(""); final Validate validate = new Validate(null, null, NETCONF_SESSION_ID_FOR_REPORTING); - validate.handle(null, xml); + validate.handleWithNoSubsequentOperations(null, xml); } @Test(expected = NetconfDocumentedException.class) @@ -55,7 +55,7 @@ public class ValidateTest { + XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0 + "\">"); final Validate validate = new Validate(null, null, NETCONF_SESSION_ID_FOR_REPORTING); - validate.handle(null, xml); + validate.handleWithNoSubsequentOperations(null, xml); } @Test(expected = NetconfDocumentedException.class) @@ -66,7 +66,7 @@ public class ValidateTest { final TransactionProvider transactionProvider = mock(TransactionProvider.class); doThrow(IllegalStateException.class).when(transactionProvider).validateTransaction(); final Validate validate = new Validate(transactionProvider, null, NETCONF_SESSION_ID_FOR_REPORTING); - validate.handle(null, xml); + validate.handleWithNoSubsequentOperations(null, xml); } @Test(expected = NetconfDocumentedException.class) @@ -77,7 +77,7 @@ public class ValidateTest { final TransactionProvider transactionProvider = mock(TransactionProvider.class); doThrow(ValidationException.class).when(transactionProvider).validateTransaction(); final Validate validate = new Validate(transactionProvider, null, NETCONF_SESSION_ID_FOR_REPORTING); - validate.handle(null, xml); + validate.handleWithNoSubsequentOperations(null, xml); } @Test @@ -89,7 +89,7 @@ public class ValidateTest { final Element okElement = XmlUtil.readXmlToElement(""); doNothing().when(transactionProvider).validateTransaction(); final Validate validate = new Validate(transactionProvider, null, NETCONF_SESSION_ID_FOR_REPORTING); - Element ok = validate.handle(XmlUtil.newDocument(), xml); + Element ok = validate.handleWithNoSubsequentOperations(XmlUtil.newDocument(), xml); assertEquals(XmlUtil.toString(okElement), XmlUtil.toString(ok)); }