Author: scabanovich
Date: 2010-10-21 07:14:54 -0400 (Thu, 21 Oct 2010)
New Revision: 25963
Modified:
trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components22.xml
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLModelTest.java
Log:
JBIDE-7362
https://jira.jboss.org/browse/JBIDE-7362
Modified: trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components22.xml
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components22.xml 2010-10-21
10:03:54 UTC (rev 25962)
+++
trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components22.xml 2010-10-21
11:14:54 UTC (rev 25963)
@@ -17,4 +17,7 @@
</navigation:resources>
</navigation:pages>
<pdf:document-store name="mypdfStore"/>
+ <core:init debug="#{debug}" jndi-pattern="i2"/>
+ <core:init debug="@debug" name="org.jboss.seam.core.init1"/>
+ <core:init debug="@debug@" name="org.jboss.seam.core.init2"/>
</components>
Modified:
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLModelTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLModelTest.java 2010-10-21
10:03:54 UTC (rev 25962)
+++
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLModelTest.java 2010-10-21
11:14:54 UTC (rev 25963)
@@ -17,8 +17,10 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Path;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.markers.XMarkerManager;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.seam.xml.components.model.SeamComponentConstants;
+import org.jboss.tools.test.util.JobUtils;
public class SeamXMLModelTest extends TestCase {
IProject project = null;
@@ -100,6 +102,26 @@
assertAttribute(navigationPages, "https-port", "1112");
}
+ public void testDebugAttribute() { //JBIDE-7362
+ XModelObject fileObject = getComponents22Object();
+ JobUtils.waitForIdle();
+ XMarkerManager.getInstance();
+ assertNotNull("Cannot create XModel object for file components22.xml.",
fileObject);
+
+ XModelObject coreInit0 =
fileObject.getChildByPath("org.jboss.seam.core.init");
+ assertNotNull("Cannot find component org.jboss.seam.core.init.", coreInit0);
+ assertFalse("Validator found wrong errors in component
org.jboss.seam.core.init", XMarkerManager.getInstance().hasErrors(coreInit0));
+
+ XModelObject coreInit1 =
fileObject.getChildByPath("org.jboss.seam.core.init1");
+ assertNotNull("Cannot find component org.jboss.seam.core.init1.",
coreInit1);
+ assertTrue("Validator failed to report an error in component
org.jboss.seam.core.init1", XMarkerManager.getInstance().hasErrors(coreInit1));
+
+ XModelObject coreInit2 =
fileObject.getChildByPath("org.jboss.seam.core.init2");
+ assertNotNull("Cannot find component org.jboss.seam.core.init2.",
coreInit2);
+ assertFalse("Validator found wrong errors in component
org.jboss.seam.core.init2", XMarkerManager.getInstance().hasErrors(coreInit2));
+
+ }
+
protected void assertAttribute(XModelObject object, String name, String value) {
String actual = object.getAttributeValue(name);
assertEquals("Attribute " + name + " in " +
object.getPresentationString() + " is incorrect.", value, actual);