Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Decouple config and netconf subsystems.
[controller.git]
/
opendaylight
/
netconf
/
netconf-util
/
src
/
test
/
java
/
org
/
opendaylight
/
controller
/
netconf
/
util
/
NetconfUtilTest.java
diff --git
a/opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/NetconfUtilTest.java
b/opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/NetconfUtilTest.java
index 85eeb30a07339c3b379bd756328f7ed96926fbc2..d85128067c7725acf9367dfe65871bc697cb8bf3 100644
(file)
--- a/
opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/NetconfUtilTest.java
+++ b/
opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/NetconfUtilTest.java
@@
-7,14
+7,13
@@
*/
package org.opendaylight.controller.netconf.util;
*/
package org.opendaylight.controller.netconf.util;
-import org.junit.Test;
-import org.opendaylight.controller.netconf.api.NetconfMessage;
-import org.opendaylight.controller.netconf.util.xml.XmlUtil;
-import org.w3c.dom.Document;
-
+import static org.hamcrest.CoreMatchers.containsString;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
-import static org.junit.matchers.JUnitMatchers.containsString;
+
+import org.junit.Test;
+import org.opendaylight.controller.config.util.xml.XmlUtil;
+import org.w3c.dom.Document;
public class NetconfUtilTest {
public class NetconfUtilTest {
@@
-22,7
+21,7
@@
public class NetconfUtilTest {
public void testConflictingVersionDetection() throws Exception {
Document document = XmlUtil.readXmlToDocument(getClass().getResourceAsStream("/netconfMessages/conflictingversion/conflictingVersionResponse.xml"));
try{
public void testConflictingVersionDetection() throws Exception {
Document document = XmlUtil.readXmlToDocument(getClass().getResourceAsStream("/netconfMessages/conflictingversion/conflictingVersionResponse.xml"));
try{
- NetconfUtil.checkIsMessageOk(
new NetconfMessage(document)
);
+ NetconfUtil.checkIsMessageOk(
document
);
fail();
}catch(IllegalStateException e){
assertThat(e.getMessage(), containsString("Optimistic lock failed. Expected parent version 21, was 18"));
fail();
}catch(IllegalStateException e){
assertThat(e.getMessage(), containsString("Optimistic lock failed. Expected parent version 21, was 18"));