Author: scabanovich
Date: 2009-06-16 09:51:42 -0400 (Tue, 16 Jun 2009)
New Revision: 15990
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/WebContent/WEB-INF/components.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4485
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/WebContent/WEB-INF/components.xml
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/WebContent/WEB-INF/components.xml 2009-06-16
13:51:06 UTC (rev 15989)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/WebContent/WEB-INF/components.xml 2009-06-16
13:51:42 UTC (rev 15990)
@@ -14,6 +14,8 @@
</component>
<core:managed-persistence-context name="myPersistenceContext1"/>
+ <component class="demo.User"/>
+
<core:resource-bundle>
<core:bundle-names>
<value>bundleA</value>
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java 2009-06-16
13:51:06 UTC (rev 15989)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java 2009-06-16
13:51:42 UTC (rev 15990)
@@ -236,7 +236,7 @@
assertTrue("Declared scope for myUser is Application rather than " +
scope.getLabel(), scope == ScopeType.APPLICATION);
// b) @Install(precedence=Install.FRAMEWORK)
- int precedence = c.getPrecedence();
+ int precedence = myUser.getPrecedence();
assertTrue("Declared precedence for myUser is 10 rather than " + precedence,
precedence == 10);
// c) @Entity
@@ -453,6 +453,15 @@
{"persistenceUnitName", "MyPersistenceUnit"},
};
scanSimpleProperties(seamProject, "org.jboss.seam.core.microcontainer",
microcontainerTestProperties);
+
+ //5. components.xml has <component class="demo.User"/> entry
+ // check that
+ // component myUser has both java and xml declaration, the latter without name
+
+ ISeamComponent myUser = seamProject.getComponent("myUser");
+ assertNotNull(myUser);
+ Set<ISeamXmlComponentDeclaration> xml = myUser.getXmlDeclarations();
+ assertEquals(1, xml.size());
}
/**