X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=netconf%2Fnetconf-util%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Futil%2Ftest%2FXmlUnitUtil.java;fp=netconf%2Fnetconf-util%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Futil%2Ftest%2FXmlUnitUtil.java;h=f774213a03f3c3b1a43aef691ae3de88daeba0ee;hb=43674bdb541df3322b67994901fe2c73f3f82682;hp=78fc364032b4be4fffb38c6025955f28cc88e222;hpb=d4ce4bf8ebb5d8c3a202b6d6e0387efbab73888a;p=netconf.git diff --git a/netconf/netconf-util/src/test/java/org/opendaylight/netconf/util/test/XmlUnitUtil.java b/netconf/netconf-util/src/test/java/org/opendaylight/netconf/util/test/XmlUnitUtil.java index 78fc364032..f774213a03 100644 --- a/netconf/netconf-util/src/test/java/org/opendaylight/netconf/util/test/XmlUnitUtil.java +++ b/netconf/netconf-util/src/test/java/org/opendaylight/netconf/util/test/XmlUnitUtil.java @@ -23,8 +23,9 @@ import org.w3c.dom.Node; import org.w3c.dom.Text; public final class XmlUnitUtil { + private XmlUnitUtil() { - private XmlUnitUtil() {} + } public static void assertContainsElementWithText(final Document doc, final String textToFind) throws NodeTestException { @@ -34,7 +35,7 @@ public final class XmlUnitUtil { boolean textFound = false; @Override - public void testText(Text text) throws NodeTestException { + public void testText(final Text text) throws NodeTestException { if (!textFound) { if (text.getData().equalsIgnoreCase(textToFind)) { textFound = true; @@ -43,7 +44,7 @@ public final class XmlUnitUtil { } @Override - public void noMoreNodes(NodeTest forTest) throws NodeTestException { + public void noMoreNodes(final NodeTest forTest) throws NodeTestException { assertTrue(textFound); } }; @@ -57,7 +58,7 @@ public final class XmlUnitUtil { private boolean elementFound = false; @Override - public void testElement(Element element) throws NodeTestException { + public void testElement(final Element element) throws NodeTestException { if (!elementFound) { if (element.isEqualNode(testElement)) { elementFound = true; @@ -66,7 +67,7 @@ public final class XmlUnitUtil { } @Override - public void noMoreNodes(NodeTest forTest) throws NodeTestException { + public void noMoreNodes(final NodeTest forTest) throws NodeTestException { assertTrue(elementFound); } }; @@ -81,7 +82,7 @@ public final class XmlUnitUtil { private boolean elementFound = false; @Override - public void testElement(Element element) throws NodeTestException { + public void testElement(final Element element) throws NodeTestException { if (!elementFound) { if (element.getNodeName() != null && element.getNodeName().equals(elementName)) { elementFound = true; @@ -90,7 +91,7 @@ public final class XmlUnitUtil { } @Override - public void noMoreNodes(NodeTest forTest) throws NodeTestException { + public void noMoreNodes(final NodeTest forTest) throws NodeTestException { assertTrue(XmlUtil.toString(doc), elementFound); } }; @@ -104,14 +105,14 @@ public final class XmlUnitUtil { private int elementFound = 0; @Override - public void testElement(Element element) throws NodeTestException { + public void testElement(final Element element) throws NodeTestException { if (element.getNodeName() != null && element.getNodeName().equals(elementName)) { elementFound++; } } @Override - public void noMoreNodes(NodeTest forTest) throws NodeTestException { + public void noMoreNodes(final NodeTest forTest) throws NodeTestException { assertEquals(expectedCount, elementFound); } };