Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Bug 2731: Discard changes only when transaction exist."
[controller.git]
/
opendaylight
/
netconf
/
config-netconf-connector
/
src
/
test
/
java
/
org
/
opendaylight
/
controller
/
netconf
/
confignetconfconnector
/
NetconfMappingTest.java
diff --git
a/opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/NetconfMappingTest.java
b/opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/NetconfMappingTest.java
index b1222997fb8d944eeb6f4e4b489262e082698ecc..d6b5e62b27b59eb60e023c64603e56474145592d 100644
(file)
--- a/
opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/NetconfMappingTest.java
+++ b/
opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/NetconfMappingTest.java
@@
-569,14
+569,14
@@
public class NetconfMappingTest extends AbstractConfigTest {
commit();
}
commit();
}
- @Test
(expected = NetconfDocumentedException.class)
+ @Test
public void testEx2() throws Exception {
public void testEx2() throws Exception {
-
discard(
);
+
assertContainsElement(discard(), readXmlToElement("<ok xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"/>")
);
}
}
- private
void
discard() throws ParserConfigurationException, SAXException, IOException, NetconfDocumentedException {
+ private
Document
discard() throws ParserConfigurationException, SAXException, IOException, NetconfDocumentedException {
DiscardChanges discardOp = new DiscardChanges(transactionProvider, configRegistryClient, NETCONF_SESSION_ID);
DiscardChanges discardOp = new DiscardChanges(transactionProvider, configRegistryClient, NETCONF_SESSION_ID);
- executeOp(discardOp, "netconfMessages/discardChanges.xml");
+
return
executeOp(discardOp, "netconfMessages/discardChanges.xml");
}
private void checkBinaryLeafEdited(final Document response) throws NodeTestException, SAXException, IOException {
}
private void checkBinaryLeafEdited(final Document response) throws NodeTestException, SAXException, IOException {
@@
-716,7
+716,7
@@
public class NetconfMappingTest extends AbstractConfigTest {
}
private Document get() throws NetconfDocumentedException, ParserConfigurationException, SAXException, IOException {
}
private Document get() throws NetconfDocumentedException, ParserConfigurationException, SAXException, IOException {
- Get getOp = new Get(yangStoreSnapshot, configRegistryClient, NETCONF_SESSION_ID);
+ Get getOp = new Get(
transactionProvider,
yangStoreSnapshot, configRegistryClient, NETCONF_SESSION_ID);
return executeOp(getOp, "netconfMessages/get.xml");
}
return executeOp(getOp, "netconfMessages/get.xml");
}