Author: dmaliarevich
Date: 2008-10-27 06:47:21 -0400 (Mon, 27 Oct 2008)
New Revision: 11197
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestDomUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2810, test for rich:dataTable was updated, check
for not existed node was added to TestDomUtil.
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestDomUtil.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestDomUtil.java 2008-10-27
10:45:50 UTC (rev 11196)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestDomUtil.java 2008-10-27
10:47:21 UTC (rev 11197)
@@ -156,12 +156,24 @@
nsIDOMNode vpeChild = vpeChildren.item(realCount++);
+ if (null == vpeChild) {
+ throw new ComparisonException(
+ "Child of node \"" //$NON-NLS-1$
+ + vpeNode.getNodeName()
+ + "\" is \"null\", but should be \"" +
schemeChild.getNodeName() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
// leave out empty text nodes in vpe dom model
while (((vpeChild.getNodeType() == Node.TEXT_NODE) && ((vpeChild
.getNodeValue() == null) || (vpeChild.getNodeValue().trim()
.length() == 0)))) {
vpeChild = vpeChildren.item(realCount++);
-
+ if (null == vpeChild) {
+ throw new ComparisonException(
+ "Child of node \"" //$NON-NLS-1$
+ + vpeNode.getNodeName()
+ + "\" is \"null\", but should be \"" +
schemeChild.getNodeName() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ }
}
compareNodes(vpeChild, schemeChild);