Author: akazakov
Date: 2011-11-11 19:17:34 -0500 (Fri, 11 Nov 2011)
New Revision: 36311
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/JavaSource/META-INF/beans.xml
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/JavaSource/META-INF/beans.xml.with.alternative
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/BeansXmlValidationTest.java
Log:
https://issues.jboss.org/browse/JBIDE-10166 CDI Validator validates resources from output
folder
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/JavaSource/META-INF/beans.xml
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/JavaSource/META-INF/beans.xml 2011-11-11
23:55:16 UTC (rev 36310)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/JavaSource/META-INF/beans.xml 2011-11-12
00:17:34 UTC (rev 36311)
@@ -3,5 +3,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://jboss.org/schema/cdi/beans_1_0.xsd">
<alternatives>
<class>org.jboss.jsr299.tck.tests.jbt.validation.beansxml.incremental.Test1</class>
+ <class>cdi.test.alternative.Unxisting</class>
</alternatives>
</beans>
\ No newline at end of file
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/JavaSource/META-INF/beans.xml.with.alternative
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/JavaSource/META-INF/beans.xml.with.alternative 2011-11-11
23:55:16 UTC (rev 36310)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/JavaSource/META-INF/beans.xml.with.alternative 2011-11-12
00:17:34 UTC (rev 36311)
@@ -3,5 +3,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://jboss.org/schema/cdi/beans_1_0.xsd">
<alternatives>
<class>org.jboss.jsr299.tck.tests.jbt.validation.beansxml.incremental.Test1</class>
+ <class>cdi.test.alternative.Unxisting</class>
</alternatives>
</beans>
\ No newline at end of file
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/BeansXmlValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/BeansXmlValidationTest.java 2011-11-11
23:55:16 UTC (rev 36310)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/BeansXmlValidationTest.java 2011-11-12
00:17:34 UTC (rev 36311)
@@ -27,6 +27,13 @@
static int FORD_INTERCEPTOR_1_LINE = CAT_INTERCEPTOR_LINE + 3; //
<class>org.jboss.jsr299.tck.tests.interceptors.definition.broken.sameClassListedTwiceInBeansXml.FordInterceptor</class>
static int FORD_INTERCEPTOR_2_LINE = FORD_INTERCEPTOR_1_LINE + 1; //
+ public void testBeansXMLInBin() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/META-INF/beans.xml");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.UNKNOWN_ALTERNATIVE_BEAN_CLASS_NAME, false, 6);
+ file = tckProject.getFile("WebContent/WEB-INF/classes/META-INF/beans.xml");
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file,
CDIValidationMessages.UNKNOWN_ALTERNATIVE_BEAN_CLASS_NAME, 6);
+ }
+
/**
* 5.1.1. Declaring selected alternatives for a bean archive
* - Each child <class> element must specify the name of an alternative bean
class. If there is no class with the specified