Author: yradtsevich
Date: 2008-11-26 15:10:09 -0500 (Wed, 26 Nov 2008)
New Revision: 12086
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestDomUtil.java
Log:
RESOLVED - issue JBIDE-3298: Adjust Content Tests.
https://jira.jboss.org/jira/browse/JBIDE-3298
a static variable 'skippedAtributes' has been added to class
org.jboss.tools.vpe.ui.test.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-11-26
19:00:10 UTC (rev 12085)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestDomUtil.java 2008-11-26
20:10:09 UTC (rev 12086)
@@ -15,7 +15,10 @@
import java.io.FileReader;
import java.io.StringReader;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -37,7 +40,15 @@
*
*/
public class TestDomUtil {
-
+ /**
+ * Attributes names that will be skipped in attribute comparison.
+ */
+ public static final Set<String> skippedAtributes = new HashSet<String>();
+ static {
+ // Add here all attributes names to be skipped (IN UPPER CASE!)
+ skippedAtributes.addAll(Arrays.asList("DIR"));//$NON-NLS-1$
+ }
+
final public static String ID_ATTRIBUTE = "id"; //$NON-NLS-1$
final public static String ILLEGAL_ATTRIBUTES = "illegalAttributes";
//$NON-NLS-1$
@@ -208,6 +219,12 @@
Attr modelAttr = (Attr) modelAttributes.item(i);
String name = modelAttr.getName();
+ if ( name != null
+ && skippedAtributes.contains(name.toUpperCase()) ) {
+ // if the attribute have to be skipped, do it
+ continue;
+ }
+
// if there are limitation of attributes
if (ILLEGAL_ATTRIBUTES.equals(name)) {