Author: scabanovich
Date: 2011-10-05 13:09:25 -0400 (Wed, 05 Oct 2011)
New Revision: 35383
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/org/jboss/beans/validation/test/MyAbstract.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/org/jboss/beans/validation/test/MyBean4.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/org/jboss/beans/validation/test/MyInterface.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/META-INF/beans.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigValidationTest.java
Log:
JBIDE-9834
https://issues.jboss.org/browse/JBIDE-9834
Tests for validation of configuring abstract types and types without bean constructors are
added.
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/META-INF/beans.xml
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/META-INF/beans.xml 2011-10-05
17:08:37 UTC (rev 35382)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/META-INF/beans.xml 2011-10-05
17:09:25 UTC (rev 35383)
@@ -126,4 +126,9 @@
</s:value>
</v:bean2>
</v:MyBean3>
+
+<v:MyAbstract></v:MyAbstract>
+<v:MyInterface></v:MyInterface>
+<v:MyBean4></v:MyBean4>
+
</beans>
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/org/jboss/beans/validation/test/MyAbstract.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/org/jboss/beans/validation/test/MyAbstract.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/org/jboss/beans/validation/test/MyAbstract.java 2011-10-05
17:09:25 UTC (rev 35383)
@@ -0,0 +1,5 @@
+package org.jboss.beans.validation.test;
+
+public abstract class MyAbstract {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/org/jboss/beans/validation/test/MyAbstract.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/org/jboss/beans/validation/test/MyBean4.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/org/jboss/beans/validation/test/MyBean4.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/org/jboss/beans/validation/test/MyBean4.java 2011-10-05
17:09:25 UTC (rev 35383)
@@ -0,0 +1,12 @@
+package org.jboss.beans.validation.test;
+
+import javax.inject.Inject;
+
+public class MyBean4 {
+
+ @Inject MyBean4 b;
+
+ public MyBean4(String s) {
+
+ }
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/org/jboss/beans/validation/test/MyBean4.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/org/jboss/beans/validation/test/MyInterface.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/org/jboss/beans/validation/test/MyInterface.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/org/jboss/beans/validation/test/MyInterface.java 2011-10-05
17:09:25 UTC (rev 35383)
@@ -0,0 +1,5 @@
+package org.jboss.beans.validation.test;
+
+public interface MyInterface {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest/src/org/jboss/beans/validation/test/MyInterface.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigValidationTest.java 2011-10-05
17:08:37 UTC (rev 35382)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigValidationTest.java 2011-10-05
17:09:25 UTC (rev 35383)
@@ -121,6 +121,15 @@
AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.INLINE_BEAN_TYPE_MISMATCH,
"MyBean3", "MyBean1"), 125);
}
+ public void testConfiguringAbstractTypes() throws CoreException {
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.TYPE_IS_ABSTRACT,
"MyAbstract"), 130);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.TYPE_IS_ABSTRACT,
"MyInterface"), 131);
+ }
+
+ public void testNoBeanConstructor() throws CoreException {
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.NO_BEAN_CONSTRUCTOR,
"MyBean4"), 132);
+ }
+
public void testAddClassToResolveNode() throws CoreException {
String path = "src/org/jboss/beans/validation/test/MyBean2.java";
GenericBeanValidationTest.writeFile(project,
"src/org/jboss/beans/validation/test/MyBean2.template", path);