Author: scabanovich
Date: 2011-10-06 20:30:20 -0400 (Thu, 06 Oct 2011)
New Revision: 35453
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.project
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.settings/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.settings/org.jboss.ide.eclipse.as.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/META-INF/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/META-INF/beans.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/bin/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/lib/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/lib/cdi-api.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/lib/javax.inject.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/lib/jboss-interceptor-api.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/lib/seam-config-xml.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/lib/seam-solder.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/META-INF/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/META-INF/beans.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/META-INF/seam-beans.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/injection/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/injection/Injections.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean1.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean2.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean3.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean4.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyBean1.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyBean2.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyBean3.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyQualifier1.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyQualifier2.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test03/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test03/MyBean1.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test03/MyBean2.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test03/MyBean3.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean1.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean2.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean3.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean4.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean5.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean6.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyQualifier.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType1.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType2.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType3.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType4.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType5.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType6.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyBean1.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyBean2.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyQualifier.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyType1.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyBean1.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyBean2.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyBean3.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyImpl.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyInterface.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyQualifier.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyType1.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test07/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test07/MyBean1.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/report/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/report/NewQualifier.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/report/Report.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/report/ReportDatasource.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test603/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test603/OtherQualifier.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test603/QualifiedBean1.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test603/QualifiedBean2.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/ArrayFieldValue.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/MyBean.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/RobotFactory.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/SomeQualifier.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6042/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6042/Horse.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6042/Knight.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6042/Sword.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean2.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean3.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean4.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/Qualifier1.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/Qualifier2.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test606/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test606/MyBean.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test606/MyQualifier.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test607/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test607/MyImpl.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test607/MyInterface.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test607/SomeBean.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/MyInterceptorBinding.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/SomeInterceptorBinding.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/SomeQualifier.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/SomeStereotype.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/.project
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/.settings/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/lib/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/lib/cdi-api.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/lib/javax.inject.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/lib/jboss-interceptor-api.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/lib/seam-config-xml.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/lib/seam-solder.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/META-INF/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/META-INF/beans.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyAbstract.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean1.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean2.template
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean3.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean4.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyInterface.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/.project
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/.settings/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/bin/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/bin/org/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/bin/org/jboss/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/bin/org/jboss/beans/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/bin/org/jboss/beans/injection/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/bin/org/jboss/beans/injection/A.class
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/bin/org/jboss/beans/injection/Injections2.class
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/src/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/src/META-INF/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/src/META-INF/seam-beans.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/src/org/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/src/org/jboss/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/src/org/jboss/beans/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/src/org/jboss/beans/injection/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/src/org/jboss/beans/injection/Injections2.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/CDISeamConfigCoreAllTests30.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/ConfigBeansInjectionTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/ExtensionTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamBeansTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigTestSetup.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigValidationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigValidationTestSetup.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamDefinitionsTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/CDISeamConfigCoreAllTests.java
Log:
JBIDE-9852
https://issues.jboss.org/browse/JBIDE-9852
Tests fo Seam config migrated to 3.1.
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.classpath
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.classpath
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.classpath 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="lib/cdi-api.jar"/>
+ <classpathentry kind="lib" path="lib/javax.inject.jar"/>
+ <classpathentry kind="lib" path="lib/seam-config-xml.jar"/>
+ <classpathentry kind="lib" path="lib/seam-solder.jar"/>
+ <classpathentry kind="lib"
path="lib/jboss-interceptor-api.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.project
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.project
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.project 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>CDIConfigTest30</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.cdi.core.cdibuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.jboss.tools.cdi.core.cdinature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.settings/org.eclipse.jdt.core.prefs 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,12 @@
+#Thu Sep 02 19:40:42 MSD 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.settings/org.jboss.ide.eclipse.as.core.prefs
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.settings/org.jboss.ide.eclipse.as.core.prefs
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.settings/org.jboss.ide.eclipse.as.core.prefs 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,3 @@
+#Tue Sep 21 16:45:15 MSD 2010
+eclipse.preferences.version=1
+org.jboss.ide.eclipse.as.core.singledeployable.deployableList=
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/.settings/org.jboss.ide.eclipse.as.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/META-INF/beans.xml
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/META-INF/beans.xml
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/META-INF/beans.xml 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<beans
xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:s="urn:java:ee"
+
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">
+</beans>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/META-INF/beans.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/lib/cdi-api.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/lib/cdi-api.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/lib/javax.inject.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/lib/javax.inject.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/lib/jboss-interceptor-api.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/lib/jboss-interceptor-api.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/lib/seam-config-xml.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/lib/seam-config-xml.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/lib/seam-solder.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/lib/seam-solder.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/META-INF/beans.xml
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/META-INF/beans.xml
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/META-INF/beans.xml 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,181 @@
+<?xml version="1.0"?>
+<beans
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:s="urn:java:ee"
+ xmlns:config="urn:java:org.jboss.test.config"
+ xmlns:test602="urn:java:org.jboss.test602.report"
+ xmlns:test603="urn:java:org.jboss.test603"
+ xmlns:test6041="urn:java:org.jboss.test6041"
+ xmlns:test6042="urn:java:org.jboss.test6042"
+ xmlns:test605="urn:java:org.jboss.test605"
+ xmlns:test606="urn:java:org.jboss.test606"
+ xmlns:test607="urn:java:org.jboss.test607"
+ xmlns:test608="urn:java:org.jboss.test608"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://jboss.org/schema/cdi/beans_1_0.xsd">
+<config:MyAnnotation>
+ <s:Qualifier1/>
+</config:MyAnnotation>
+
+<!-- 6.2. Adding, replacing and modifying beans -->
+<test602:Report>
+ <s:modifies/>
+ <test602:NewQualifier/>
+</test602:Report>
+
+<test602:ReportDatasource>
+ <s:replaces/>
+ <test602:NewQualifier/>
+</test602:ReportDatasource>
+
+<!-- 6.3. Applying annotations using XML -->
+<test603:QualifiedBean1>
+ <test603:OtherQualifier value1="AA"
value2="1">false</test603:OtherQualifier>
+</test603:QualifiedBean1>
+
+<test603:QualifiedBean2>
+ <test603:OtherQualifier value1="BB" value2="2"
value="true" />
+</test603:QualifiedBean2>
+
+<!-- 6.4. Configuring Fields -->
+<test6041:RobotFactory>
+ <test6041:robot>
+ <s:Produces/>
+ </test6041:robot>
+</test6041:RobotFactory>
+
+<!-- 6.4.1. Initial Field Values -->
+<test6041:MyBean>
+ <test6041:SomeQualifier/>
+ <test6041:company>Red Hat Inc</test6041:company>
+</test6041:MyBean>
+
+<test6041:MyBean>
+ <test6041:company>
+ <s:value>Red Hat Inc</s:value>
+ <test6041:SomeQualifier/>
+ </test6041:company>
+</test6041:MyBean>
+
+<test6041:ArrayFieldValue>
+ <test6041:intArrayField>
+ <s:value>1</s:value>
+ <s:value>2</s:value>
+ </test6041:intArrayField>
+ <test6041:classArrayField>
+ <s:value>java.lang.Integer</s:value>
+ <s:value>java.lang.Long</s:value>
+ </test6041:classArrayField>
+ <test6041:stringArrayField>
+ <s:value>hello</s:value>
+ <s:value>world</s:value>
+ </test6041:stringArrayField>
+</test6041:ArrayFieldValue>
+
+<!-- 6.4.2. Inline Bean Declarations -->
+<test6042:Knight>
+ <test6042:sword>
+ <s:value>
+ <test6042:Sword type="sharp"/>
+ </s:value>
+ </test6042:sword>
+ <test6042:horse>
+ <s:value>
+ <test6042:Horse>
+ <test6042:name>
+ <s:value>billy</s:value>
+ </test6042:name>
+ <test6042:shoe>
+ <s:Inject/>
+ </test6042:shoe>
+ </test6042:Horse>
+ </s:value>
+ </test6042:horse>
+</test6042:Knight>
+
+<!-- 6.5. Configuring methods -->
+<test605:MethodBean>
+ <test605:doStuff>
+ <s:Produces/>
+ </test605:doStuff>
+
+ <test605:doStuff>
+ <s:Produces/>
+ <test605:Qualifier1/>
+ <s:parameters>
+ <s:Long>
+ <test605:Qualifier2/>
+ </s:Long>
+ </s:parameters>
+ </test605:doStuff>
+
+ <test605:doStuff>
+ <s:Produces/>
+ <test605:Qualifier1/>
+ <s:parameters>
+ <s:array dimensions="2">
+ <test605:Qualifier2/>
+ <s:Long/>
+ </s:array>
+ </s:parameters>
+ </test605:doStuff>
+</test605:MethodBean>
+
+<test605:MethodBean3>
+ <test605:name>
+ </test605:name>
+</test605:MethodBean3>
+
+<test605:MethodBean4>
+ <test605:name>
+ <s:parameters/>
+ </test605:name>
+</test605:MethodBean4>
+
+<test605:MethodBean2>
+ <test605:method>
+ <s:array>
+ <s:String/>
+ </s:array>
+ </test605:method>
+</test605:MethodBean2>
+
+<!-- 6.6. Configuring the bean constructor -->
+<test606:MyBean>
+ <s:parameters>
+ <s:Integer>
+ <test606:MyQualifier/>
+ </s:Integer>
+ </s:parameters>
+</test606:MyBean>
+
+<!-- 6.7. Overriding the type of an injection point -->
+<test607:SomeBean>
+ <test607:someField>
+ <s:Inject/>
+ <s:Exact>org.jboss.test607.MyInterface</s:Exact>
+ </test607:someField>
+</test607:SomeBean>
+
+<!-- 6.8. Configuring Meta Annotations -->
+<test608:SomeStereotype>
+ <s:Stereotype/>
+ <test608:MyInterceptorBinding/>
+ <s:Named/>
+</test608:SomeStereotype>
+
+<test608:SomeQualifier>
+ <s:Qualifier/>
+</test608:SomeQualifier>
+
+<test608:SomeInterceptorBinding>
+ <s:InterceptorBinding/>
+</test608:SomeInterceptorBinding>
+
+<!-- 6.9. Virtual Producer Fields -->
+<s:String>
+ <s:Produces/>
+ <test606:MyQualifier />
+ <s:value>Version 1.23</s:value>
+</s:String>
+
+</beans>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/META-INF/beans.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/META-INF/seam-beans.xml
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/META-INF/seam-beans.xml
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/META-INF/seam-beans.xml 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,166 @@
+<?xml version="1.0"?>
+<beans
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:s="urn:java:ee"
+ xmlns:test01="urn:java:org.jboss.beans.test01"
+ xmlns:test02="urn:java:org.jboss.beans.test02"
+ xmlns:test03="urn:java:org.jboss.beans.test03"
+ xmlns:test04="urn:java:org.jboss.beans.test04"
+ xmlns:test05="urn:java:org.jboss.beans.test05"
+ xmlns:test06="urn:java:org.jboss.beans.test06"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://jboss.org/schema/cdi/beans_1_0.xsd">
+
+<!-- Test 01-1 -->
+<test01:MyBean1>
+ <s:modifies/>
+</test01:MyBean1>
+
+<!-- Test 01-2 -->
+<test01:MyBean2>
+ <s:replaces/>
+</test01:MyBean2>
+
+<!-- Test 01-3 -->
+<test01:MyBean3>
+</test01:MyBean3>
+
+<!-- Test 01-4 -->
+<test01:MyBean4>
+</test01:MyBean4>
+<test01:MyBean4>
+</test01:MyBean4>
+
+<!-- Test 02-1 -->
+<test02:MyBean1>
+ <s:modifies/>
+ <test02:MyQualifier2/>
+</test02:MyBean1>
+
+<!-- Test 02-2 -->
+<test02:MyBean2>
+ <s:replaces/>
+ <test02:MyQualifier2/>
+</test02:MyBean2>
+
+<!-- Test 02-3 -->
+<test02:MyBean3>
+ <test02:MyQualifier1/>
+</test02:MyBean3>
+<test02:MyBean3>
+ <test02:MyQualifier2/>
+</test02:MyBean3>
+
+<!-- Test 03-1 -->
+<test03:MyBean1>
+ <s:modifies/>
+ <s:Named>test03-1-b</s:Named>
+</test03:MyBean1>
+
+<!-- Test 03-2 -->
+<test03:MyBean2>
+ <s:replaces/>
+ <s:Named>test03-2-b</s:Named>
+</test03:MyBean2>
+
+<!-- Test 03-3 -->
+<test03:MyBean3>
+ <s:Named>test03-3-b</s:Named>
+</test03:MyBean3>
+<test03:MyBean3>
+ <s:Named>test03-3-c</s:Named>
+</test03:MyBean3>
+
+<!-- Test 04-1 -->
+<test04:MyBean1>
+ <s:modifies/>
+</test04:MyBean1>
+
+<!-- Test 04-2 -->
+<test04:MyBean2>
+ <s:modifies/>
+ <test04:myType2>
+ <s:Named>test04-2-a</s:Named>
+ </test04:myType2>
+</test04:MyBean2>
+
+<!-- Test 04-3 -->
+<test04:MyBean3>
+ <s:modifies/>
+ <test04:myType3>
+ <s:Produces/>
+ </test04:myType3>
+</test04:MyBean3>
+
+<!-- Test 04-4 -->
+<test04:MyBean4>
+ <s:replaces/>
+</test04:MyBean4>
+
+<!-- Test 04-5 -->
+<test04:MyBean5>
+ <s:replaces/>
+ <test04:myType5>
+ <s:Inject/>
+ <test04:MyQualifier kind="kind-04-5-a"/>
+ </test04:myType5>
+</test04:MyBean5>
+
+<!-- Test 04-6 -->
+<test04:MyBean6>
+ <test04:MyQualifier kind="kind-04-6"/>
+ <test04:myType6>
+ <s:Produces/>
+ </test04:myType6>
+</test04:MyBean6>
+
+<!-- Test 05-1 -->
+<test05:MyBean1>
+ <s:modifies/>
+ <test05:createType>
+ <s:Produces/>
+ <test05:MyQualifier/>
+ <s:parameters>
+ <test05:MyType1>
+ </test05:MyType1>
+ </s:parameters>
+ </test05:createType>
+</test05:MyBean1>
+
+<!-- Test 05-2 -->
+<test05:MyBean2>
+ <s:parameters>
+ <test05:MyType1>
+ </test05:MyType1>
+ </s:parameters>
+</test05:MyBean2>
+
+<!-- Test 06-1 -->
+<s:String>
+ <s:Produces/>
+ <test06:MyQualifier>one</test06:MyQualifier>
+</s:String>
+
+<!-- Test 06-2 and Test 06-3 -->
+<test06:MyType1>
+ <s:Produces/>
+ <test06:MyQualifier>two</test06:MyQualifier>
+ <s:value>
+ <test06:MyType1>
+ <s:parameters>
+ <s:String>
+ <test06:MyQualifier>one</test06:MyQualifier>
+ </s:String>
+ </s:parameters>
+ </test06:MyType1>
+ </s:value>
+</test06:MyType1>
+
+<!-- Test 06-4 -->
+<test06:MyInterface>
+ <s:Produces/>
+ <s:value>
+ <test06:MyImpl></test06:MyImpl>
+ </s:value>
+</test06:MyInterface>
+
+</beans>
\ No newline at end of file
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/META-INF/seam-beans.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/injection/Injections.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/injection/Injections.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/injection/Injections.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,32 @@
+package org.jboss.beans.injection;
+
+import javax.inject.Inject;
+
+import org.jboss.beans.test04.MyBean5;
+import org.jboss.beans.test04.MyQualifier;
+import org.jboss.beans.test04.MyType3;
+import org.jboss.beans.test05.MyType1;
+
+public class Injections {
+
+ /**
+ * Class bean defined in seam-config.xml
+ */
+ @Inject MyBean5 b5;
+
+ /**
+ * Virtual field producer bean defined in seam-config.xml
+ */
+ @Inject @org.jboss.beans.test06.MyQualifier("one") String s;
+
+ /**
+ * Method producer bean defined in seam-config.xml
+ */
+ @Inject @org.jboss.beans.test05.MyQualifier MyType1 t1;
+
+ /**
+ * Field producer bean defined in seam-config.xml
+ */
+ @Inject @MyQualifier(kind="kind-04-3") MyType3 t3;
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/injection/Injections.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean1.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean1.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean1.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,18 @@
+package org.jboss.beans.test01;
+
+/**
+ * Test 01-1.
+ * Sources contain simple bean class MyBean1.
+ * Seam config xml contains declaration:
+ * <test01:MyBean1>
+ * <s:modifies/>
+ * </test01:MyBean1>
+ *
+ * ASSERT: Model contains 1 bean with type MyBean1.
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyBean1 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean1.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean2.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean2.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean2.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,18 @@
+package org.jboss.beans.test01;
+
+/**
+ * Test 01-2.
+ * Sources contain simple bean class MyBean2.
+ * Seam config xml contains declaration:
+ * <test01:MyBean2>
+ * <s:replaces/>
+ * </test01:MyBean2>
+ *
+ * ASSERT: Model contains 1 bean with type MyBean2.
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyBean2 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean3.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean3.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean3.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,17 @@
+package org.jboss.beans.test01;
+
+/**
+ * Test 01-3.
+ * Sources contain simple bean class MyBean3.
+ * Seam config xml contains declaration:
+ * <test01:MyBean3>
+ * </test01:MyBean3>
+ *
+ * ASSERT: Model contains 2 beans with type MyBean3.
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyBean3 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean3.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean4.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean4.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean4.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,19 @@
+package org.jboss.beans.test01;
+
+/**
+ * Test 01-4.
+ * Sources contain simple bean class MyBean4.
+ * Seam config xml contains 2 declarations:
+ * <test01:MyBean4>
+ * </test01:MyBean4>
+ * <test01:MyBean4>
+ * </test01:MyBean4>
+ *
+ * ASSERT: Model contains 3 beans with type MyBean4.
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyBean4 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test01/MyBean4.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyBean1.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyBean1.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyBean1.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,21 @@
+package org.jboss.beans.test02;
+
+/**
+ * Test 02-1.
+ * Sources contain simple bean class MyBean1 with qualifier MyQualifier1.
+ * Seam config xml contains declaration:
+ * <test02:MyBean1>
+ * <s:modifies/>
+ * <test02:MyQualifier2/>
+ * </test02:MyBean1>
+ *
+ * ASSERT: Model contains 1 bean with type MyBean1 and qualifier MyQualifier1.
+ * ASSERT: That bean also has qualifier MyQualifier2.
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+@MyQualifier1
+public class MyBean1 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyBean1.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyBean2.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyBean2.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyBean2.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,21 @@
+package org.jboss.beans.test02;
+
+/**
+ * Test 02-2.
+ * Sources contain simple bean class MyBean2 with qualifier MyQualifier1.
+ * Seam config xml contains declaration:
+ * <test02:MyBean2>
+ * <s:replaces/>
+ * <test02:MyQualifier2/>
+ * </test02:MyBean2>
+ *
+ * ASSERT: Model contains no bean with type MyBean2 and qualifier MyQualifier1.
+ * ASSERT: Model contains 1 bean with type MyBean2 and qualifier MyQualifier2.
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+@MyQualifier1
+public class MyBean2 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyBean2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyBean3.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyBean3.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyBean3.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,23 @@
+package org.jboss.beans.test02;
+
+/**
+ * Test 02-3.
+ * Sources contain simple bean class MyBean3.
+ * Seam config xml contains declarations:
+ * <test02:MyBean3>
+ * <test02:MyQualifier1/>
+ * </test02:MyBean3>
+ * <test02:MyBean3>
+ * <test02:MyQualifier2/>
+ * </test02:MyBean3>
+ *
+ * ASSERT: Model contains 3 bean with type MyBean2.
+ * ASSERT: Model contains 1 bean with type MyBean2 and qualifier MyQualifier1.
+ * ASSERT: Model contains 1 bean with type MyBean2 and qualifier MyQualifier2.
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyBean3 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyBean3.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyQualifier1.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyQualifier1.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyQualifier1.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,21 @@
+package org.jboss.beans.test02;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface MyQualifier1 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyQualifier1.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyQualifier2.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyQualifier2.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyQualifier2.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,21 @@
+package org.jboss.beans.test02;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface MyQualifier2 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test02/MyQualifier2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test03/MyBean1.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test03/MyBean1.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test03/MyBean1.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,23 @@
+package org.jboss.beans.test03;
+
+import javax.inject.Named;
+
+/**
+ * Test 03-1.
+ * Sources contain simple bean class MyBean1 with qualifier
Named("test03-1-a").
+ * Seam config xml contains declaration:
+ * <test03:MyBean1>
+ * <s:modifies/>
+ * <s:Named>test03-1-b</s:Named>
+ * </test03:MyBean1>
+ *
+ * ASSERT: Model contains no named bean with name "test03-1-a".
+ * ASSERT: Model contains 1 named bean with name "test03-1-b".
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+@Named("test03-1-a")
+public class MyBean1 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test03/MyBean1.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test03/MyBean2.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test03/MyBean2.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test03/MyBean2.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,23 @@
+package org.jboss.beans.test03;
+
+import javax.inject.Named;
+
+/**
+ * Test 03-2.
+ * Sources contain simple bean class MyBean2 with qualifier
Named("test03-2-a").
+ * Seam config xml contains declaration:
+ * <test03:MyBean2>
+ * <s:replaces/>
+ * <s:Named>test03-2-b</s:Named>
+ * </test03:MyBean2>
+ *
+ * ASSERT: Model contains no named bean with name "test03-2-a".
+ * ASSERT: Model contains 1 named bean with name "test03-2-b".
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+@Named("test03-2-a")
+public class MyBean2 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test03/MyBean2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test03/MyBean3.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test03/MyBean3.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test03/MyBean3.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,24 @@
+package org.jboss.beans.test03;
+
+import javax.inject.Named;
+
+/**
+ * Test 03-3.
+ * Sources contain simple bean class MyBean3 with qualifier
Named("test03-3-a").
+ * Seam config xml contains declarations:
+ * <test03:MyBean3>
+ * <s:Named>test03-3-b</s:Named>
+ * </test03:MyBean3>
+ * <test03:MyBean3>
+ * <s:Named>test03-3-c</s:Named>
+ * </test03:MyBean3>
+ *
+ * ASSERT: Model contains named beans "test03-3-a", "test03-3-b",
"test03-3-c".
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+@Named("test03-3-a")
+public class MyBean3 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test03/MyBean3.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean1.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean1.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean1.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,26 @@
+package org.jboss.beans.test04;
+
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+
+/**
+ * Test 04-1.
+ * Sources contain class MyBean1 that declares producer field of type MyType1,
+ * class MyType1 has no bean constructor.
+ * Seam config xml contains declaration:
+ * <test04:MyBean1>
+ * <s:modifies/>
+ * </test04:MyBean1>
+ *
+ * ASSERT: Model contains 1 bean with type MyType1.
+ * ASSERT: That bean is field producer.
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyBean1 {
+
+ @Produces
+ public MyType1 myType1 = new MyType1("");
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean1.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean2.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean2.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean2.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,31 @@
+package org.jboss.beans.test04;
+
+import javax.enterprise.inject.Produces;
+
+/**
+ * Test 04-2.
+ * Sources contain class MyBean2 that declares producer field of type MyType2,
+ * class MyType2 has no bean constructor.
+ * Seam config xml contains declaration:
+ * <test04:MyBean2>
+ * <s:modifies/>
+ * <test04:myType2>
+ * <s:Named>test04-2-a</s:Named>
+ * </test04:myType2>
+ * </test04:MyBean2>
+ *
+ * ASSERT: Model contains 1 bean with type MyType2.
+ * ASSERT: That bean is field producer.
+ * ASSERT: That bean has qualifier MyQualifier with kind="kind-04-2".
+ * ASSERT: That bean has name "test04-2-a".
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyBean2 {
+
+ @Produces
+ @MyQualifier(kind="kind-04-2")
+ public MyType2 myType2 = new MyType2("");
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean3.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean3.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean3.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,27 @@
+package org.jboss.beans.test04;
+
+/**
+ * Test 04-3.
+ * Sources contain class MyBean2 that declares a field of type MyType3,
+ * class MyType3 has no bean constructor.
+ * Seam config xml contains declaration:
+ * <test04:MyBean3>
+ * <s:modifies/>
+ * <test04:myType3>
+ * <s:Produces/>
+ * </test04:myType3>
+ * </test04:MyBean3>
+ *
+ * ASSERT: Model contains 1 bean with type MyType3.
+ * ASSERT: That bean is field producer.
+ * ASSERT: That bean has qualifier MyQualifier with kind="kind-04-3".
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyBean3 {
+
+ @MyQualifier(kind="kind-04-3")
+ public MyType3 myType3 = new MyType3("");
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean3.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean4.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean4.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean4.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,24 @@
+package org.jboss.beans.test04;
+
+import javax.enterprise.inject.Produces;
+
+/**
+ * Test 04-4.
+ * Sources contain class MyBean4 that declares producer field of type MyType4,
+ * class MyType4 has no bean constructor.
+ * Seam config xml contains declaration:
+ * <test04:MyBean4>
+ * <s:replaces/>
+ * </test04:MyBean4>
+ *
+ * ASSERT: Model contains no bean with type MyType4.
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyBean4 {
+
+ @Produces
+ public MyType4 myType4 = new MyType4("");
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean4.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean5.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean5.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean5.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,31 @@
+package org.jboss.beans.test04;
+
+import javax.enterprise.inject.Produces;
+
+/**
+ * Test 04-5.
+ * Sources contain class MyBean5 that declares producer field of type MyType5,
+ * class MyType5 has no bean constructor.
+ * Seam config xml contains declaration:
+ * <test04:MyBean5>
+ * <s:replaces/>
+ * <test04:myType5>
+ * <s:Inject/>
+ * <test04:MyQualifier kind="kind-04-5-a"/>
+ * </test04:myType5>
+ * </test04:MyBean5>
+ *
+ * ASSERT: Model contains no bean with type MyType5.
+ * ASSERT: Model contains 1 bean with type MyBean5.
+ * ASSERT: That bean has injection point field with qualifier MyQualifier with
kind="kind-04-5-a".
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyBean5 {
+
+ @Produces
+ @MyQualifier(kind="kind-04-5")
+ public MyType5 myType5 = new MyType5("");
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean5.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean6.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean6.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean6.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,33 @@
+package org.jboss.beans.test04;
+
+import javax.inject.Inject;
+
+/**
+ * Test 04-6.
+ * Sources contain class MyBean6 that declares field of type MyType6,
+ * class MyType6 has no bean constructor.
+ * Seam config xml contains declaration:
+ * <test04:MyBean6>
+ * <test04:MyQualifier kind="kind-04-6"/>
+ * <test04:myType6>
+ * <s:Produces/>
+ * </test04:myType6>
+ * </test04:MyBean6>
+ *
+ * ASSERT: Model contains 1 bean with type MyType6.
+ * ASSERT: That bean is field producer.
+ * ASSERT: Model contains 1 bean with type MyBean6 with qualifier MyQualifier
+ * ASSERT: That bean has no injection points.
+ * ASSERT: Model contains 1 bean with type MyBean6 with default qualifier..
+ * ASSERT: That bean has 1 injection point.
+ * ASSERT: That injection point is resolved to bean MyType6.
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyBean6 {
+
+ @Inject
+ public MyType6 myType6 = new MyType6("");
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyBean6.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyQualifier.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyQualifier.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyQualifier.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,21 @@
+package org.jboss.beans.test04;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface MyQualifier {
+ String kind();
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyQualifier.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType1.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType1.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType1.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,14 @@
+package org.jboss.beans.test04;
+
+/**
+ * Test 04-1.
+ * see org.jboss.beans.test04.MyBean1
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyType1 {
+ public MyType1(String s) {
+ }
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType1.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType2.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType2.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType2.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,13 @@
+package org.jboss.beans.test04;
+
+/**
+ * Test 04-2.
+ * see org.jboss.beans.test04.MyBean2
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyType2 {
+ public MyType2(String s) {
+ }
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType3.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType3.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType3.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,13 @@
+package org.jboss.beans.test04;
+
+/**
+ * Test 04-3.
+ * see org.jboss.beans.test04.MyBean3
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyType3 {
+ public MyType3(String s) {
+ }
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType3.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType4.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType4.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType4.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,13 @@
+package org.jboss.beans.test04;
+
+/**
+ * Test 04-4.
+ * see org.jboss.beans.test04.MyBean4
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyType4 {
+ public MyType4(String s) {
+ }
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType4.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType5.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType5.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType5.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,13 @@
+package org.jboss.beans.test04;
+
+/**
+ * Test 04-2.
+ * see org.jboss.beans.test04.MyBean2
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyType5 {
+ public MyType5(String s) {
+ }
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType5.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType6.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType6.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType6.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,13 @@
+package org.jboss.beans.test04;
+
+/**
+ * Test 04-6.
+ * see org.jboss.beans.test04.MyBean6
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyType6 {
+ public MyType6(String s) {
+ }
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test04/MyType6.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyBean1.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyBean1.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyBean1.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,35 @@
+package org.jboss.beans.test05;
+
+/**
+ * Test 05-1
+ * Sources contain class MyBean1 that declares method createType
+ * with parameter MyType1.
+ * Seam config xml contains declaration:
+ * <test05:MyBean1>
+ * <test05:createType>
+ * <s:Produces/>
+ * <test05:MyQualifier/>
+ * <s:parameters>
+ * <test05:MyType1>
+ * </test05:MyType1>
+ * </s:parameters>
+ * </test05:createType>
+ * </test05:MyBean1>
+ *
+ * ASSERT: Model contains 1 bean with type MyType1 with qualifier MyQualifier.
+ * ASSERT: That bean is method producer.
+ * ASSERT: That bean has one injection point; it is parameter.
+ * ASSERT: That injection point is resolved to class bean with type MyType1 with default
qualifier.
+ *
+ * @author Viacheslav Kababovich
+ *
+ */
+public class MyBean1 {
+
+ public MyType1 createType(MyType1 template) {
+ MyType1 result = new MyType1();
+ //use template to modify result.
+ return result;
+ }
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyBean1.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyBean2.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyBean2.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyBean2.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,28 @@
+package org.jboss.beans.test05;
+
+import javax.inject.Inject;
+
+/**
+ * Test 05-2
+ * Sources contain class MyBean2 that declares constructor.
+ * Seam config xml contains declaration:
+ * <test05:MyBean2>
+ * <s:parameters>
+ * <test05:MyType1>
+ * </test05:MyType1>
+ * </s:parameters>
+ * </test05:MyBean2>
+ *
+ * ASSERT: Model contains 1 bean with type MyBean2.
+ * ASSERT: That bean has one injection point; it is parameter.
+ * ASSERT: That injection point is resolved to class bean with type MyType1 with default
qualifier.
+ *
+ * @author Viacheslav Kababovich
+ *
+ */
+public class MyBean2 {
+
+ public MyBean2(MyType1 type) {
+ }
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyBean2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyQualifier.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyQualifier.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyQualifier.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,20 @@
+package org.jboss.beans.test05;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface MyQualifier {
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyQualifier.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyType1.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyType1.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyType1.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,11 @@
+package org.jboss.beans.test05;
+
+/**
+ * Test 05-1.
+ * see org.jboss.beans.test05.MyBean1
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyType1 {
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test05/MyType1.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyBean1.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyBean1.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyBean1.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,32 @@
+package org.jboss.beans.test06;
+
+import javax.inject.Inject;
+
+/**
+ * Test 06-1.
+ * Sources contain simple bean class MyBean1
+ * with two injection points of type String.
+ * Seam config xml contains declaration:
+ * <s:String>
+ * <s:Produces/>
+ * <test06:MyQualifier>one</test06:MyQualifier>
+ * </s:String>
+ *
+ * ASSERT: Model contains 1 bean with type String and qualifier MyQualifier.
+ * ASSERT: Qualifier has value member equal to "one".
+ * ASSERT: Injection point field 'one' in MyBean1 is resolved to that bean.
+ * ASSERT: Injection point field 'two' in MyBean1 is not resolved to a bean.
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyBean1 {
+ @Inject
+ @MyQualifier("one")
+ String one;
+
+ @Inject
+ @MyQualifier("two")
+ String two;
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyBean1.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyBean2.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyBean2.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyBean2.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,53 @@
+package org.jboss.beans.test06;
+
+import javax.enterprise.inject.Any;
+import javax.inject.Inject;
+
+/**
+ * Test 06-2.
+ * Sources contain simple bean class MyBean1
+ * with injection point of type MyType1.
+ * class MyType1 has no bean constructor.
+ * Seam config xml contains declaration:
+ * <test06:MyType1>
+ * <s:Produces/>
+ * <test06:MyQualifier>two</test06:MyQualifier>
+ * <s:value>
+ * <test06:MyType1>
+ * <s:parameters>
+ * <s:String>
+ * <test06:MyQualifier>one</test06:MyQualifier>
+ * </s:String>
+ * </s:parameters>
+ * </test06:MyType1>
+ * </s:value>
+ * </test06:MyType1>
+ *
+ * ASSERT: Model contains 1 bean with type MyType1 and qualifier MyQualifier.
+ * ASSERT: Qualifier has value member equal to "two".
+ * ASSERT: Injection point field 'two' in MyBean1 is resolved to that bean.
+ * ASSERT: Injection point field 'one' in MyBean1 is resolved to 2 beans.
+ * ASSERT: One of them is the above-mentioned MyType1 bean.
+ * ASSERT: The other of them is a bean with type MyType1 InlineBeanQualifier qualifier.
+ *
+ * Test 06-3.
+ * Uses sources of tests 06-1 and 06-2.
+ *
+ * ASSERT: Inner bean of type MyType1 has InlineBeanQualifier qualifier.
+ * ASSERT: The inner bean has one injection point.
+ * ASSERT: The injection point is resolved to a bean (created in test 06-1).
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyBean2 {
+
+ @Inject
+ @Any
+ MyType1 one;
+
+ @Inject
+ @MyQualifier("two")
+ MyType1 two;
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyBean2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyBean3.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyBean3.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyBean3.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,24 @@
+package org.jboss.beans.test06;
+
+import javax.inject.Inject;
+
+/**
+ * Test 06-4.
+ *
+ * Sources contain simple bean class MyBean3
+ * with injection point of type MyInterface
+ * Seam config xml contains declaration:
+ * <test06:MyInterface>
+ * <s:Produces/>
+ * <s:value>
+ * <test06:MyImpl></test06:MyImpl>
+ * </s:value>
+ * </test06:MyInterface>
+ * ASSERT: Model contains one bean of type MyInterface with qualifier Default.
+ * ASSERT: Injection point field 'i' in MyBean3 is resolved to that bean.
+ */
+public class MyBean3 {
+
+ @Inject MyInterface i;
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyBean3.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyImpl.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyImpl.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyImpl.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,5 @@
+package org.jboss.beans.test06;
+
+@MyQualifier("myImpl1")
+public class MyImpl implements MyInterface {
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyImpl.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyInterface.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyInterface.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyInterface.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,5 @@
+package org.jboss.beans.test06;
+
+public interface MyInterface {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyInterface.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyQualifier.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyQualifier.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyQualifier.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,21 @@
+package org.jboss.beans.test06;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface MyQualifier {
+ String value();
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyQualifier.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyType1.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyType1.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyType1.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,14 @@
+package org.jboss.beans.test06;
+
+/**
+ * Test 04-1.
+ * see org.jboss.beans.test04.MyBean1
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class MyType1 {
+ public MyType1(String s) {
+ }
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test06/MyType1.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test07/MyBean1.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test07/MyBean1.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test07/MyBean1.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,24 @@
+package org.jboss.beans.test07;
+
+import javax.inject.Named;
+/**
+ * Test 07-1.
+ * Sources contain simple bean class MyBean1 with qualifier
@Named("test07-1-a").
+ * Seam config xml in a dependent project contains declaration:
+ * <test07:MyBean1>
+ * <s:modifies/>
+ * <s:Named>test07-1-b</s:Named>
+ * </test07:MyBean1>
+ *
+ * ASSERT: Model contains 1 named bean with name "test07-1-a".
+ * ASSERT: Model contains no named bean with name "test07-1-b".
+ * ASSERT: Model of dependent project contains no named bean with name
"test07-1-a".
+ * ASSERT: Model of dependent project contains 1 named bean with name
"test07-1-b".
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+@Named("test07-1-a")
+public class MyBean1 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/beans/test07/MyBean1.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/report/NewQualifier.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/report/NewQualifier.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/report/NewQualifier.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,21 @@
+package org.jboss.test602.report;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface NewQualifier {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/report/NewQualifier.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/report/Report.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/report/Report.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/report/Report.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,5 @@
+package org.jboss.test602.report;
+
+public class Report {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/report/Report.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/report/ReportDatasource.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/report/ReportDatasource.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/report/ReportDatasource.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,5 @@
+package org.jboss.test602.report;
+
+public class ReportDatasource {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test602/report/ReportDatasource.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test603/OtherQualifier.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test603/OtherQualifier.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test603/OtherQualifier.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,23 @@
+package org.jboss.test603;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface OtherQualifier {
+ public String value1();
+ public int value2();
+ public boolean value();
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test603/OtherQualifier.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test603/QualifiedBean1.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test603/QualifiedBean1.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test603/QualifiedBean1.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,5 @@
+package org.jboss.test603;
+
+public class QualifiedBean1 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test603/QualifiedBean1.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test603/QualifiedBean2.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test603/QualifiedBean2.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test603/QualifiedBean2.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,5 @@
+package org.jboss.test603;
+
+public class QualifiedBean2 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test603/QualifiedBean2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/ArrayFieldValue.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/ArrayFieldValue.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/ArrayFieldValue.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,8 @@
+package org.jboss.test6041;
+
+public class ArrayFieldValue {
+ int[] intArrayField;
+ Class[] classArrayField;
+ String[] stringArrayField;
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/ArrayFieldValue.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/MyBean.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/MyBean.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/MyBean.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,5 @@
+package org.jboss.test6041;
+
+public class MyBean {
+ String company;
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/MyBean.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/RobotFactory.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/RobotFactory.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/RobotFactory.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,5 @@
+package org.jboss.test6041;
+
+public class RobotFactory {
+ String robot = "robot";
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/RobotFactory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/SomeQualifier.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/SomeQualifier.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/SomeQualifier.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,21 @@
+package org.jboss.test6041;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface SomeQualifier {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6041/SomeQualifier.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6042/Horse.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6042/Horse.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6042/Horse.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,6 @@
+package org.jboss.test6042;
+
+public class Horse {
+ String name;
+ String shoe;
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6042/Horse.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6042/Knight.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6042/Knight.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6042/Knight.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,7 @@
+package org.jboss.test6042;
+
+public class Knight {
+ Sword sword;
+ Horse horse;
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6042/Knight.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6042/Sword.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6042/Sword.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6042/Sword.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,6 @@
+package org.jboss.test6042;
+
+public class Sword {
+ String type;
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test6042/Sword.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,47 @@
+package org.jboss.test605;
+
+/**
+ * 6.5. Configuring methods
+ * It is also possible to configure methods in a similar way to configuring fields:
+<test605:MethodBean>
+ <test605:doStuff>
+ <s:Produces/>
+ </test605:doStuff>
+
+ <test605:doStuff>
+ <s:Produces/>
+ <test605:Qualifier1/>
+ <s:parameters>
+ <s:Long>
+ <test605:Qualifier2/>
+ </s:Long>
+ </s:parameters>
+ </test605:doStuff>
+
+ <test605:doStuff>
+ <s:Produces/>
+ <test605:Qualifier1/>
+ <s:parameters>
+ <s:array dimensions="2">
+ <test605:Qualifier2/>
+ <s:Long/>
+ </s:array>
+ </s:parameters>
+ </test605:doStuff>
+</test605:MethodBean>
+ *
+ */
+public class MethodBean {
+
+ public int doStuff() {
+ return 1;
+ }
+
+ public long doStuff(long c) {
+ return c + 1;
+ }
+
+ public void doStuff(long[][] beans) {
+
+ }
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean2.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean2.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean2.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,20 @@
+package org.jboss.test605;
+
+/**
+ * 6.5. Configuring methods
+ * Array parameters can be represented using the <s:array> element,
+ * with a child element to represent the type of the array.
+ * E.g. int method(String[] param); could be configured via xml using the following:
+<my:method>
+ <s:array>
+ <my:MethodValueBean/>
+ </s:array>
+</my:method>
+ */
+public class MethodBean2 {
+
+ public void method(String[] s) {
+
+ }
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean3.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean3.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean3.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,22 @@
+package org.jboss.test605;
+
+/**
+ * 6.5.Note
+ * If a class has a field and a method of the same name then by default the field
+ * will be resolved, unless the element has a child <parameters> element,
+ * in which case it is resolved as a method.
+ * In the next example field must be resolved.
+<test605:MethodBean3>
+ <test605:name>
+ </test605:name>
+</test605:MethodBean3>
+ *
+ */
+public class MethodBean3 {
+ String name;
+
+ String name() {
+ return "";
+ }
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean3.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean4.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean4.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean4.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,23 @@
+package org.jboss.test605;
+
+/**
+ * 6.5.Note
+ * If a class has a field and a method of the same name then by default the field
+ * will be resolved, unless the element has a child <parameters> element,
+ * in which case it is resolved as a method.
+ * In the next example method must be resolved.
+<test605:MethodBean3>
+ <test605:name>
+ <s:parameters/>
+ </test605:name>
+</test605:MethodBean3>
+ *
+ */
+public class MethodBean4 {
+ String name;
+
+ String name() {
+ return "";
+ }
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/MethodBean4.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/Qualifier1.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/Qualifier1.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/Qualifier1.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,21 @@
+package org.jboss.test605;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface Qualifier1 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/Qualifier1.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/Qualifier2.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/Qualifier2.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/Qualifier2.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,21 @@
+package org.jboss.test605;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface Qualifier2 {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test605/Qualifier2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test606/MyBean.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test606/MyBean.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test606/MyBean.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,9 @@
+package org.jboss.test606;
+
+public class MyBean {
+
+ public MyBean(int count) {
+
+ }
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test606/MyBean.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test606/MyQualifier.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test606/MyQualifier.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test606/MyQualifier.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,21 @@
+package org.jboss.test606;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface MyQualifier {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test606/MyQualifier.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test607/MyImpl.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test607/MyImpl.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test607/MyImpl.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,5 @@
+package org.jboss.test607;
+
+public class MyImpl implements MyInterface {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test607/MyImpl.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test607/MyInterface.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test607/MyInterface.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test607/MyInterface.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,5 @@
+package org.jboss.test607;
+
+public interface MyInterface {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test607/MyInterface.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test607/SomeBean.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test607/SomeBean.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test607/SomeBean.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,5 @@
+package org.jboss.test607;
+
+public class SomeBean {
+ MyImpl someField;
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test607/SomeBean.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/MyInterceptorBinding.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/MyInterceptorBinding.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/MyInterceptorBinding.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,21 @@
+package org.jboss.test608;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.interceptor.InterceptorBinding;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@InterceptorBinding
+@Inherited
+@Target({ TYPE, METHOD })
+@Retention(RUNTIME)
+@Documented
+public @interface MyInterceptorBinding {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/MyInterceptorBinding.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/SomeInterceptorBinding.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/SomeInterceptorBinding.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/SomeInterceptorBinding.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,18 @@
+package org.jboss.test608;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Inherited
+@Target({ TYPE, METHOD })
+@Retention(RUNTIME)
+@Documented
+public @interface SomeInterceptorBinding {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/SomeInterceptorBinding.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/SomeQualifier.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/SomeQualifier.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/SomeQualifier.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,18 @@
+package org.jboss.test608;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface SomeQualifier {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/SomeQualifier.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/SomeStereotype.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/SomeStereotype.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/SomeStereotype.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,17 @@
+package org.jboss.test608;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Target({ TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface SomeStereotype {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigTest30/src/org/jboss/test608/SomeStereotype.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/.classpath
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/.classpath
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/.classpath 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="lib" path="lib/cdi-api.jar"/>
+ <classpathentry kind="lib" path="lib/javax.inject.jar"/>
+ <classpathentry kind="lib" path="lib/seam-config-xml.jar"/>
+ <classpathentry kind="lib" path="lib/seam-solder.jar"/>
+ <classpathentry kind="lib"
path="lib/jboss-interceptor-api.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/.project
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/.project
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/.project 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>CDIConfigValidationTest30</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.cdi.core.cdibuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ <nature>org.jboss.tools.cdi.core.cdinature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/.settings/org.eclipse.jdt.core.prefs 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,12 @@
+#Fri May 13 12:44:03 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/lib/cdi-api.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/lib/cdi-api.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/lib/javax.inject.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/lib/javax.inject.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/lib/jboss-interceptor-api.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/lib/jboss-interceptor-api.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/lib/seam-config-xml.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/lib/seam-config-xml.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/lib/seam-solder.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/lib/seam-solder.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/META-INF/beans.xml
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/META-INF/beans.xml
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/META-INF/beans.xml 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,134 @@
+<?xml version="1.0"?>
+<beans
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:s="urn:java:ee"
+ xmlns:v="urn:java:org.jboss.beans.validation.test"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://jboss.org/schema/cdi/beans_1_0.xsd">
+
+<v:MyBean2>
+</v:MyBean2>
+
+<v:MyBean1>
+ <s:Default/>
+ <v:field1>
+ </v:field1>
+ <v:field3></v:field3>
+</v:MyBean1>
+
+<v:MyBean1>
+ <s:Default/>
+ <v:field1>
+ <s:Named param="abc"/>
+ </v:field1>
+</v:MyBean1>
+
+<v:MyBean1>
+ <s:Default/>
+ <v:field1>
+ <s:Named value="abc"/>
+ </v:field1>
+</v:MyBean1>
+
+<v:MyBean1>
+ <s:Default/>
+ <v:method1>
+ <s:parameters>
+ </s:parameters>
+ </v:method1>
+ <v:method2>
+ <s:parameters>
+ </s:parameters>
+ </v:method2>
+ <v:method1>
+ <s:parameters>
+ <s:String/>
+ </s:parameters>
+ </v:method1>
+ <v:method1>
+ <s:parameters>
+ <s:Boolean/>
+ </s:parameters>
+ </v:method1>
+</v:MyBean1>
+
+<v:MyBean3>
+ <s:replaces/>
+ <v:set1>
+ <s:value>
+ <s:String>111</s:String>
+ </s:value>
+ <s:value>112</s:value>
+ <s:value>
+ <s:Integer>
+ <s:parameters>
+ <s:String>113</s:String>
+ </s:parameters>
+ </s:Integer>
+ </s:value>
+
+ </v:set1>
+ <v:set2>
+ <s:value>
+ <s:String>121</s:String>
+ </s:value>
+ <s:value>122</s:value>
+ <s:value>
+ <s:Integer>
+ <s:parameters>
+ <s:String>123</s:String>
+ </s:parameters>
+ </s:Integer>
+ </s:value>
+
+ </v:set2>
+ <v:map>
+ <s:entry>
+ <s:key>
+ <s:Integer>
+ <s:parameters>
+ <s:String>211</s:String>
+ </s:parameters>
+ </s:Integer>
+ </s:key>
+ <s:value>
+ <s:Long>
+ <s:parameters>
+ <s:String>212</s:String>
+ </s:parameters>
+ </s:Long>
+ </s:value>
+ </s:entry>
+ <s:entry>
+ <s:key>
+ <s:Long>
+ <s:parameters>
+ <s:String>222</s:String>
+ </s:parameters>
+ </s:Long>
+ </s:key>
+ <s:value>
+ <s:Integer>
+ <s:parameters>
+ <s:String>221</s:String>
+ </s:parameters>
+ </s:Integer>
+ </s:value>
+ </s:entry>
+ </v:map>
+ <v:bean1>
+ <s:value>
+ <v:MyBean1></v:MyBean1>
+ </s:value>
+ </v:bean1>
+ <v:bean2>
+ <s:value>
+ <v:MyBean3></v:MyBean3>
+ </s:value>
+ </v:bean2>
+</v:MyBean3>
+
+<v:MyAbstract></v:MyAbstract>
+<v:MyInterface></v:MyInterface>
+<v:MyBean4></v:MyBean4>
+
+</beans>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/META-INF/beans.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyAbstract.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyAbstract.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyAbstract.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -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/CDIConfigValidationTest30/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/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean1.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean1.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean1.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,10 @@
+package org.jboss.beans.validation.test;
+
+public class MyBean1 {
+ boolean field1;
+
+ void method1() {}
+
+ void method1(String s) {}
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean1.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean2.template
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean2.template
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean2.template 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,5 @@
+package org.jboss.beans.validation.test;
+
+public class MyBean2 {
+
+}
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean3.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean3.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean3.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,17 @@
+package org.jboss.beans.validation.test;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+public class MyBean3 {
+ Set<String> set1 = new HashSet<String>();
+ Set<Integer> set2 = new HashSet<Integer>();
+
+ Map<Integer,Long> map = new HashMap<Integer, Long>();
+
+ MyBean1 bean1;
+ MyBean1 bean2;
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean3.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean4.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean4.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyBean4.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -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/CDIConfigValidationTest30/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/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyInterface.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyInterface.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyInterface.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -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/CDIConfigValidationTest30/src/org/jboss/beans/validation/test/MyInterface.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/.classpath
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/.classpath
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/.classpath 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib"
path="/CDIConfigTest/lib/cdi-api.jar"/>
+ <classpathentry kind="lib"
path="/CDIConfigTest30/lib/javax.inject.jar"/>
+ <classpathentry kind="lib"
path="/CDIConfigTest30/lib/seam-config-xml.jar"/>
+ <classpathentry kind="lib"
path="/CDIConfigTest30/lib/seam-solder.jar"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/CDIConfigTest30"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/.project
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/.project
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/.project 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>CDIDependentConfigTest30</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.cdi.core.cdibuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ <nature>org.jboss.tools.cdi.core.cdinature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/.settings/org.eclipse.jdt.core.prefs 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,12 @@
+#Wed Aug 10 09:48:24 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/bin/org/jboss/beans/injection/A.class
===================================================================
(Binary files differ)
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/bin/org/jboss/beans/injection/A.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/bin/org/jboss/beans/injection/Injections2.class
===================================================================
(Binary files differ)
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/bin/org/jboss/beans/injection/Injections2.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/src/META-INF/seam-beans.xml
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/src/META-INF/seam-beans.xml
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/src/META-INF/seam-beans.xml 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<beans
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:s="urn:java:ee"
+ xmlns:test07="urn:java:org.jboss.beans.test07"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://jboss.org/schema/cdi/beans_1_0.xsd">
+
+<!-- Test 07-1 -->
+<test07:MyBean1>
+ <s:modifies/>
+ <s:Named>test07-1-b</s:Named>
+</test07:MyBean1>
+
+</beans>
\ No newline at end of file
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/src/META-INF/seam-beans.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/src/org/jboss/beans/injection/Injections2.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/src/org/jboss/beans/injection/Injections2.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/src/org/jboss/beans/injection/Injections2.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,32 @@
+package org.jboss.beans.injection;
+
+import javax.inject.Inject;
+
+import org.jboss.beans.test04.MyBean5;
+import org.jboss.beans.test04.MyQualifier;
+import org.jboss.beans.test04.MyType3;
+import org.jboss.beans.test05.MyType1;
+
+public class Injections2 {
+
+ /**
+ * Class bean defined in seam-config.xml
+ */
+ @Inject MyBean5 b5;
+
+ /**
+ * Virtual field producer bean defined in seam-config.xml
+ */
+ @Inject @org.jboss.beans.test06.MyQualifier("one") String s;
+
+ /**
+ * Method producer bean defined in seam-config.xml
+ */
+ @Inject @org.jboss.beans.test05.MyQualifier MyType1 t1;
+
+ /**
+ * Field producer bean defined in seam-config.xml
+ */
+ @Inject @MyQualifier(kind="kind-04-3") MyType3 t3;
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/projects/CDIDependentConfigTest30/src/org/jboss/beans/injection/Injections2.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/CDISeamConfigCoreAllTests.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/CDISeamConfigCoreAllTests.java 2011-10-07
00:29:16 UTC (rev 35452)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/CDISeamConfigCoreAllTests.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -15,6 +15,7 @@
import org.eclipse.jdt.internal.core.JavaModelManager;
import org.eclipse.wst.validation.ValidationFramework;
+import org.jboss.tools.cdi.seam.config.core.test.v30.CDISeamConfigCoreAllTests30;
import org.jboss.tools.common.base.test.validation.ValidationExceptionTest;
/**
@@ -31,20 +32,26 @@
ValidationExceptionTest.initLogger();
TestSuite suiteAll = new TestSuite("CDI Config Core Tests");
+
+ suiteAll.addTest(CDISeamConfigCoreAllTests30.suite());
+ TestSuite suite31 = new TestSuite("CDI Config Core 3.1 Tests");
+
TestSuite suiteCore = new TestSuite("CDI Config Model Tests");
suiteCore.addTestSuite(ExtensionTest.class);
suiteCore.addTestSuite(SeamDefinitionsTest.class);
suiteCore.addTestSuite(SeamBeansTest.class);
suiteCore.addTestSuite(ConfigBeansInjectionTest.class);
- suiteAll.addTest(new SeamConfigTestSetup(suiteCore));
+ suite31.addTest(new SeamConfigTestSetup(suiteCore));
TestSuite suiteValidation = new TestSuite("CDI Config Validation Tests");
suiteValidation.addTestSuite(SeamConfigValidationTest.class);
- suiteAll.addTest(new SeamConfigValidationTestSetup(suiteValidation));
+ suite31.addTest(new SeamConfigValidationTestSetup(suiteValidation));
suiteAll.addTestSuite(ValidationExceptionTest.class); // This test should be added
last!
+ suiteAll.addTest(suite31);
+
return suiteAll;
}
}
\ No newline at end of file
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/CDISeamConfigCoreAllTests30.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/CDISeamConfigCoreAllTests30.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/CDISeamConfigCoreAllTests30.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.seam.config.core.test.v30;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jdt.internal.core.JavaModelManager;
+import org.eclipse.wst.validation.ValidationFramework;
+import org.jboss.tools.common.base.test.validation.ValidationExceptionTest;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class CDISeamConfigCoreAllTests30 {
+
+ public static Test suite() {
+ TestSuite suiteAll = new TestSuite("CDI Config Core 3.0 Tests");
+
+ TestSuite suiteCore = new TestSuite("CDI Config Model Tests");
+ suiteCore.addTestSuite(ExtensionTest.class);
+ suiteCore.addTestSuite(SeamDefinitionsTest.class);
+ suiteCore.addTestSuite(SeamBeansTest.class);
+ suiteCore.addTestSuite(ConfigBeansInjectionTest.class);
+ suiteAll.addTest(new SeamConfigTestSetup(suiteCore));
+
+ TestSuite suiteValidation = new TestSuite("CDI Config Validation Tests");
+ suiteValidation.addTestSuite(SeamConfigValidationTest.class);
+ suiteAll.addTest(new SeamConfigValidationTestSetup(suiteValidation));
+
+ return suiteAll;
+ }
+}
\ No newline at end of file
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/CDISeamConfigCoreAllTests30.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/ConfigBeansInjectionTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/ConfigBeansInjectionTest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/ConfigBeansInjectionTest.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,67 @@
+package org.jboss.tools.cdi.seam.config.core.test.v30;
+
+import java.util.Set;
+
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IClassBean;
+import org.jboss.tools.cdi.core.IInjectionPoint;
+import org.jboss.tools.cdi.core.IProducerField;
+import org.jboss.tools.cdi.core.IProducerMethod;
+import org.jboss.tools.cdi.core.test.DependentProjectTest;
+
+public class ConfigBeansInjectionTest extends SeamConfigTest {
+ static String INJECTIONS_CLASS_PATH =
"src/org/jboss/beans/injection/Injections.java";
+ static String INJECTIONS2_CLASS_PATH =
"src/org/jboss/beans/injection/Injections2.java";
+
+ public void testClassBeanInjection() {
+ IInjectionPoint p = DependentProjectTest.getInjectionPointField(cdiProject,
INJECTIONS_CLASS_PATH, "b5");
+ Set<IBean> bs = cdiProject.getBeans(false, p);
+ assertEquals(1, bs.size());
+ IBean b = bs.iterator().next();
+ assertTrue(b instanceof IClassBean);
+
+ //The same in dependent project
+ p = DependentProjectTest.getInjectionPointField(cdiDependentProject,
INJECTIONS2_CLASS_PATH, "b5");
+ bs = cdiDependentProject.getBeans(false, p);
+ assertEquals(1, bs.size());
+ }
+
+ public void testVirtualFieldProducer() {
+ IInjectionPoint p = DependentProjectTest.getInjectionPointField(cdiProject,
INJECTIONS_CLASS_PATH, "s");
+ Set<IBean> bs = cdiProject.getBeans(false, p);
+ assertEquals(1, bs.size());
+ IBean b = bs.iterator().next();
+ assertTrue(b instanceof IClassBean);
+
+ //The same in dependent project
+ p = DependentProjectTest.getInjectionPointField(cdiDependentProject,
INJECTIONS2_CLASS_PATH, "s");
+ bs = cdiDependentProject.getBeans(false, p);
+ assertEquals(1, bs.size());
+ }
+
+ public void testMethodProducer() {
+ IInjectionPoint p = DependentProjectTest.getInjectionPointField(cdiProject,
INJECTIONS_CLASS_PATH, "t1");
+ Set<IBean> bs = cdiProject.getBeans(false, p);
+ assertEquals(1, bs.size());
+ IBean b = bs.iterator().next();
+ assertTrue(b instanceof IProducerMethod);
+
+ //The same in dependent project
+ p = DependentProjectTest.getInjectionPointField(cdiDependentProject,
INJECTIONS2_CLASS_PATH, "t1");
+ bs = cdiDependentProject.getBeans(false, p);
+ assertEquals(1, bs.size());
+ }
+
+ public void testFieldProducer() {
+ IInjectionPoint p = DependentProjectTest.getInjectionPointField(cdiProject,
INJECTIONS_CLASS_PATH, "t3");
+ Set<IBean> bs = cdiProject.getBeans(false, p);
+ assertEquals(1, bs.size());
+ IBean b = bs.iterator().next();
+ assertTrue(b instanceof IProducerField);
+
+ //The same in dependent project
+ p = DependentProjectTest.getInjectionPointField(cdiDependentProject,
INJECTIONS2_CLASS_PATH, "t3");
+ bs = cdiDependentProject.getBeans(false, p);
+ assertEquals(1, bs.size());
+ }
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/ConfigBeansInjectionTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/ExtensionTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/ExtensionTest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/ExtensionTest.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.seam.config.core.test.v30;
+
+import java.io.IOException;
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.ICDIProject;
+import org.jboss.tools.cdi.core.extension.feature.IBuildParticipantFeature;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class ExtensionTest extends SeamConfigTest {
+ public ExtensionTest() {}
+
+ public void testExtension() throws CoreException, IOException {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+
+ Set<IBuildParticipantFeature> bp =
cdi.getNature().getExtensionManager().getBuildParticipantFeatures();
+ System.out.println(bp.size());
+ }
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/ExtensionTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamBeansTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamBeansTest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamBeansTest.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,817 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.seam.config.core.test.v30;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.cdi.core.CDIConstants;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IClassBean;
+import org.jboss.tools.cdi.core.IInjectionPoint;
+import org.jboss.tools.cdi.core.IInjectionPointField;
+import org.jboss.tools.cdi.core.IInjectionPointParameter;
+import org.jboss.tools.cdi.core.IProducerField;
+import org.jboss.tools.cdi.core.IProducerMethod;
+import org.jboss.tools.cdi.core.IQualifierDeclaration;
+import org.jboss.tools.cdi.seam.config.core.CDISeamConfigConstants;
+import org.jboss.tools.common.java.IAnnotationDeclaration;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class SeamBeansTest extends SeamConfigTest {
+
+ public SeamBeansTest() {}
+
+ /**
+ * Test 01-1.
+ * Sources contain simple bean class MyBean1.
+ * Seam config xml contains declaration:
+ * <test01:MyBean1>
+ * <s:modifies/>
+ * </test01:MyBean1>
+ *
+ * ASSERT: Model contains 1 bean with type MyBean1.
+ */
+ public void testModifyingATrivialBean() throws CoreException, IOException {
+ Set<IBean> beans =
getBeansByClassName("org.jboss.beans.test01.MyBean1");
+ assertEquals(1, beans.size());
+ }
+
+ /**
+ * Test 01-2.
+ * Sources contain simple bean class MyBean2.
+ * Seam config xml contains declaration:
+ * <test01:MyBean2>
+ * <s:replaces/>
+ * </test01:MyBean2>
+ *
+ * ASSERT: Model contains 1 bean with type MyBean2.
+ */
+ public void testReplacingATrivialBean() throws CoreException, IOException {
+ Set<IBean> beans =
getBeansByClassName("org.jboss.beans.test01.MyBean2");
+ assertEquals(1, beans.size());
+ }
+
+ /**
+ * Test 01-3.
+ * Sources contain simple bean class MyBean3.
+ * Seam config xml contains declaration:
+ * <test01:MyBean3>
+ * </test01:MyBean3>
+ *
+ * ASSERT: Model contains 2 beans with type MyBean3.
+ */
+ public void testCreatingNewTrivialBean() throws CoreException, IOException {
+ Set<IBean> beans =
getBeansByClassName("org.jboss.beans.test01.MyBean3");
+ assertEquals(2, beans.size());
+
+ //The same in dependent project
+ beans =
getBeansByClassNameInDependentProject("org.jboss.beans.test01.MyBean3");
+ assertEquals(2, beans.size());
+ }
+
+ /**
+ * Test 01-4.
+ * Sources contain simple bean class MyBean4.
+ * Seam config xml contains 2 declarations:
+ * <test01:MyBean4>
+ * </test01:MyBean4>
+ * <test01:MyBean4>
+ * </test01:MyBean4>
+ *
+ * ASSERT: Model contains 3 beans with type MyBean4.
+ */
+ public void testCreatingTwoNewTrivialBeans() throws CoreException, IOException {
+ Set<IBean> beans =
getBeansByClassName("org.jboss.beans.test01.MyBean4");
+ assertEquals(3, beans.size());
+
+ //The same in dependent project
+ beans =
getBeansByClassNameInDependentProject("org.jboss.beans.test01.MyBean4");
+ assertEquals(3, beans.size());
+ }
+
+ /**
+ * Test 02-1.
+ * Sources contain simple bean class MyBean1
+ * with qualifier MyQualifier1.
+ * Seam config xml contains declaration:
+ * <test02:MyBean1>
+ * <s:modifies/>
+ * <test02:MyQualifier2/>
+ * </test02:MyBean1>
+ *
+ * ASSERT: Model contains 1 bean with type MyBean1 and qualifier MyQualifier1.
+ * ASSERT: That bean also has qualifier MyQualifier2.
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+ public void testModifyingAQualifiedBean() throws CoreException, IOException {
+ Set<IBean> beans1 = cdiProject.getBeans(false,
"org.jboss.beans.test02.MyBean1",
+ new String[]{"org.jboss.beans.test02.MyQualifier1"});
+ assertEquals(1, beans1.size());
+ Set<IBean> beans2 = cdiProject.getBeans(false,
"org.jboss.beans.test02.MyBean1",
+ new String[]{"org.jboss.beans.test02.MyQualifier1",
+ "org.jboss.beans.test02.MyQualifier2"});
+ assertEquals(1, beans2.size());
+ assertTrue("Two sets should contain the same bean.", beans1.iterator().next()
== beans2.iterator().next());
+
+ //The same in dependent project
+ beans1 = cdiDependentProject.getBeans(false,
"org.jboss.beans.test02.MyBean1",
+ new String[]{"org.jboss.beans.test02.MyQualifier1"});
+ assertEquals(1, beans1.size());
+ beans2 = cdiDependentProject.getBeans(false,
"org.jboss.beans.test02.MyBean1",
+ new String[]{"org.jboss.beans.test02.MyQualifier1",
+ "org.jboss.beans.test02.MyQualifier2"});
+ assertEquals(1, beans2.size());
+ assertTrue("Two sets should contain the same bean.", beans1.iterator().next()
== beans2.iterator().next());
+ }
+
+ /**
+ * Test 02-2.
+ * Sources contain simple bean class MyBean2
+ * with qualifier MyQualifier1.
+ * Seam config xml contains declaration:
+ * <test02:MyBean2>
+ * <s:replaces/>
+ * <test02:MyQualifier2/>
+ * </test02:MyBean2>
+ *
+ * ASSERT: Model contains no bean with type MyBean2 and qualifier MyQualifier1.
+ * ASSERT: Model contains 1 bean with type MyBean2 and qualifier MyQualifier2.
+ */
+ public void testReplacingAQualifiedBean() throws CoreException, IOException {
+ Set<IBean> beans1 = cdiProject.getBeans(false,
"org.jboss.beans.test02.MyBean2",
+ new String[]{"org.jboss.beans.test02.MyQualifier1"});
+ assertTrue(beans1.isEmpty());
+ Set<IBean> beans2 = cdiProject.getBeans(false,
"org.jboss.beans.test02.MyBean2",
+ new String[]{"org.jboss.beans.test02.MyQualifier2"});
+ assertEquals(1, beans2.size());
+
+ //The same in dependent project
+ beans1 = cdiDependentProject.getBeans(false,
"org.jboss.beans.test02.MyBean2",
+ new String[]{"org.jboss.beans.test02.MyQualifier1"});
+ assertTrue(beans1.isEmpty());
+ beans2 = cdiDependentProject.getBeans(false,
"org.jboss.beans.test02.MyBean2",
+ new String[]{"org.jboss.beans.test02.MyQualifier2"});
+ assertEquals(1, beans2.size());
+ }
+
+ /**
+ * Test 02-3.
+ * Sources contain simple bean class MyBean3.
+ * Seam config xml contains declarations:
+ * <test02:MyBean3>
+ * <test02:MyQualifier1/>
+ * </test02:MyBean3>
+ * <test02:MyBean3>
+ * <test02:MyQualifier2/>
+ * </test02:MyBean3>
+ *
+ * ASSERT: Model contains 3 bean with type MyBean2.
+ * ASSERT: Model contains 1 bean with type MyBean2 and qualifier MyQualifier1.
+ * ASSERT: Model contains 1 bean with type MyBean2 and qualifier MyQualifier2.
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+ public void testCreatingTwoNewQualifiedBeans() throws CoreException, IOException {
+ Set<IBean> beans =
getBeansByClassName("org.jboss.beans.test01.MyBean4");
+ assertEquals(3, beans.size());
+
+ //The same in dependent project
+ beans = getBeansByClassName("org.jboss.beans.test01.MyBean4");
+ assertEquals(3, beans.size());
+ }
+
+ /**
+ * Test 03-1.
+ * Sources contain simple bean class MyBean1 with qualifier
Named("test03-1-a").
+ * Seam config xml contains declaration:
+ * <test03:MyBean1>
+ * <s:modifies/>
+ * <s:Named>test03-1-b</s:Named>
+ * </test03:MyBean1>
+ *
+ * ASSERT: Model contains no named bean with name "test03-1-a".
+ * ASSERT: Model contains 1 named bean with name "test03-1-b".
+ */
+ public void testModifyingANamedBean() throws CoreException, IOException {
+ Set<IBean> beans1 = cdiProject.getBeans(false,
"org.jboss.beans.test03.MyBean1");
+ assertEquals(1, beans1.size());
+ IBean b = beans1.iterator().next();
+ assertEquals("test03-1-b", b.getName());
+
+ //The same in dependent project
+ beans1 = cdiDependentProject.getBeans(false,
"org.jboss.beans.test03.MyBean1");
+ assertEquals(1, beans1.size());
+ b = beans1.iterator().next();
+ assertEquals("test03-1-b", b.getName());
+ }
+
+ /**
+ * Test 03-2.
+ * Sources contain simple bean class MyBean2 with qualifier
Named("test03-2-a").
+ * Seam config xml contains declaration:
+ * <test03:MyBean2>
+ * <s:replaces/>
+ * <s:Named>test03-2-b</s:Named>
+ * </test03:MyBean2>
+ *
+ * ASSERT: Model contains no named bean with name "test03-2-a".
+ * ASSERT: Model contains 1 named bean with name "test03-2-b".
+ */
+ public void testReplacingANamedBean() throws CoreException, IOException {
+ Set<IBean> beans1 = cdiProject.getBeans(false,
"org.jboss.beans.test03.MyBean2");
+ assertEquals(1, beans1.size());
+ IBean b = beans1.iterator().next();
+ assertEquals("test03-2-b", b.getName());
+
+ //The same in dependent project
+ beans1 = cdiDependentProject.getBeans(false,
"org.jboss.beans.test03.MyBean2");
+ assertEquals(1, beans1.size());
+ b = beans1.iterator().next();
+ assertEquals("test03-2-b", b.getName());
+ }
+
+ /**
+ * Test 03-3.
+ * Sources contain simple bean class MyBean3 with qualifier
Named("test03-3-a").
+ * Seam config xml contains declarations:
+ * <test03:MyBean3>
+ * <s:Named>test03-3-b</s:Named>
+ * </test03:MyBean3>
+ * <test03:MyBean3>
+ * <s:Named>test03-3-c</s:Named>
+ * </test03:MyBean3>
+ *
+ * ASSERT: Model contains named beans "test03-3-a", "test03-3-b",
"test03-3-c".
+ */
+ public void testCreatingNamedBeans() throws CoreException, IOException {
+ Set<IBean> beans = cdiProject.getBeans(false,
"org.jboss.beans.test03.MyBean3");
+ assertEquals(3, beans.size());
+ Set<String> names = new HashSet<String>();
+ for (IBean b: beans) {
+ names.add(b.getName());
+ }
+ assertTrue(names.contains("test03-3-a"));
+ assertTrue(names.contains("test03-3-b"));
+ assertTrue(names.contains("test03-3-c"));
+
+ //The same in dependent project
+ beans = cdiDependentProject.getBeans(false,
"org.jboss.beans.test03.MyBean3");
+ assertEquals(3, beans.size());
+ names = new HashSet<String>();
+ for (IBean b: beans) {
+ names.add(b.getName());
+ }
+ assertTrue(names.contains("test03-3-a"));
+ assertTrue(names.contains("test03-3-b"));
+ assertTrue(names.contains("test03-3-c"));
+ }
+
+ /**
+ * Test 04-1.
+ * Sources contain class MyBean1 that declares producer field of type MyType1,
+ * class MyType1 has no bean constructor.
+ * Seam config xml contains declaration:
+ * <test04:MyBean1>
+ * <s:modifies/>
+ * </test04:MyBean1>
+ *
+ * ASSERT: Model contains 1 bean with type MyType1.
+ * ASSERT: That bean is field producer.
+ */
+ public void testModifyingBeanWithFieldProducer() {
+ Set<IBean> beans = cdiProject.getBeans(false,
"org.jboss.beans.test04.MyType1");
+ assertEquals(1, beans.size());
+ IBean b = beans.iterator().next();
+ assertTrue(b instanceof IProducerField);
+
+ //The same in dependent project
+ beans = cdiDependentProject.getBeans(false,
"org.jboss.beans.test04.MyType1");
+ assertEquals(1, beans.size());
+ b = beans.iterator().next();
+ assertTrue(b instanceof IProducerField);
+ }
+
+ /**
+ * Test 04-2.
+ * Sources contain class MyBean2 that declares producer field of type MyType2,
+ * class MyType2 has no bean constructor.
+ * Seam config xml contains declaration:
+ * <test04:MyBean2>
+ * <s:modifies/>
+ * <test04:myType2>
+ * <s:Named>test04-2-a</s:Named>
+ * </test04:myType2>
+ * </test04:MyBean2>
+ *
+ * ASSERT: Model contains 1 bean with type MyType2.
+ * ASSERT: That bean is field producer.
+ * ASSERT: That bean has qualifier MyQualifier with kind="kind-04-2".
+ * ASSERT: That bean has name "test04-2-a".
+ */
+ public void testModifyingBeanWithModifiedFieldProducer() {
+ Set<IBean> beans = cdiProject.getBeans(false,
"org.jboss.beans.test04.MyType2",
+ new String[]{"org.jboss.beans.test04.MyQualifier"});
+ assertEquals(1, beans.size());
+ IBean b = beans.iterator().next();
+ assertTrue(b instanceof IProducerField);
+ Set<IQualifierDeclaration> qs = b.getQualifierDeclarations();
+ Map<String, IQualifierDeclaration> map = new HashMap<String,
IQualifierDeclaration>();
+ for (IQualifierDeclaration q: qs) {
+ map.put(q.getTypeName(), q);
+ }
+ IQualifierDeclaration myQualifier =
map.get("org.jboss.beans.test04.MyQualifier");
+ assertNotNull(myQualifier);
+ assertEquals("kind-04-2", myQualifier.getMemberValue("kind"));
+ assertEquals("test04-2-a", b.getName());
+ }
+
+ /**
+ * Test 04-3.
+ * Sources contain class MyBean2 that declares a field of type MyType3,
+ * class MyType3 has no bean constructor.
+ * Seam config xml contains declaration:
+ * <test04:MyBean3>
+ * <s:modifies/>
+ * <test04:myType3>
+ * <s:Produces/>
+ * </test04:myType3>
+ * </test04:MyBean3>
+ *
+ * ASSERT: Model contains 1 bean with type MyType3.
+ * ASSERT: That bean is field producer.
+ * ASSERT: That bean has qualifier MyQualifier with kind="kind-04-3".
+ */
+ public void testModifyingBeanWithFieldMadeProducer() {
+ Set<IBean> beans = cdiProject.getBeans(false,
"org.jboss.beans.test04.MyType3",
+ new String[]{"org.jboss.beans.test04.MyQualifier"});
+ assertEquals(1, beans.size());
+ IBean b = beans.iterator().next();
+ assertTrue(b instanceof IProducerField);
+ Set<IQualifierDeclaration> qs = b.getQualifierDeclarations();
+ Map<String, IQualifierDeclaration> map = new HashMap<String,
IQualifierDeclaration>();
+ for (IQualifierDeclaration q: qs) {
+ map.put(q.getTypeName(), q);
+ }
+ IQualifierDeclaration myQualifier =
map.get("org.jboss.beans.test04.MyQualifier");
+ assertNotNull(myQualifier);
+ assertEquals("kind-04-3", myQualifier.getMemberValue("kind"));
+ }
+
+ /**
+ * Test 04-4.
+ * Sources contain class MyBean4 that declares producer field of type MyType4,
+ * class MyType4 has no bean constructor.
+ * Seam config xml contains declaration:
+ * <test04:MyBean4>
+ * <s:replaces/>
+ * </test04:MyBean4>
+ *
+ * ASSERT: Model contains no bean with type MyType4.
+ */
+ public void testReplacingBeanWithFieldProducer() {
+ Set<IBean> beans = cdiProject.getBeans(false,
"org.jboss.beans.test04.MyType4");
+ assertTrue(beans.isEmpty());
+ }
+
+ /**
+ * Test 04-5.
+ * Sources contain class MyBean5 that declares producer field of type MyType5,
+ * class MyType5 has no bean constructor.
+ * Seam config xml contains declaration:
+ * <test04:MyBean5>
+ * <s:replaces/>
+ * <test04:myType5>
+ * <test04:MyQualifier kind="kind-04-5-a"/>
+ * </test04:myType5>
+ * </test04:MyBean5>
+ *
+ * ASSERT: Model contains no bean with type MyType5.
+ * ASSERT: Model contains 1 bean with type MyBean5.
+ * ASSERT: That bean has injection point field with qualifier MyQualifier with
kind="kind-04-5-a".
+ */
+ public void testReplacingBeanWithModifiedFieldProducer() {
+ Set<IBean> beans = cdiProject.getBeans(false,
"org.jboss.beans.test04.MyType5",
+ new String[]{"org.jboss.beans.test04.MyQualifier"});
+ assertTrue(beans.isEmpty());
+
+ beans = cdiProject.getBeans(false, "org.jboss.beans.test04.MyBean5", new
String[0]);
+ assertEquals(1, beans.size());
+ IBean b = beans.iterator().next();
+ Set<IInjectionPoint> is = b.getInjectionPoints();
+ assertEquals(1, is.size());
+ IInjectionPoint p = is.iterator().next();
+ Set<IQualifierDeclaration> qs = p.getQualifierDeclarations();
+ Map<String, IQualifierDeclaration> map = new HashMap<String,
IQualifierDeclaration>();
+ for (IQualifierDeclaration q: qs) {
+ map.put(q.getTypeName(), q);
+ }
+ IQualifierDeclaration myQualifier =
map.get("org.jboss.beans.test04.MyQualifier");
+ assertNotNull(myQualifier);
+ assertEquals("kind-04-5-a", myQualifier.getMemberValue("kind"));
+ }
+
+ /**
+ * Test 04-6.
+ * Sources contain class MyBean6 that declares field of type MyType6,
+ * class MyType6 has no bean constructor.
+ * Seam config xml contains declaration:
+ * <test04:MyBean6>
+ * <test04:MyQualifier kind="kind-04-6"/>
+ * <test04:myType6>
+ * <s:Produces/>
+ * </test04:myType6>
+ * </test04:MyBean6>
+ *
+ * ASSERT: Model contains 1 bean with type MyType6.
+ * ASSERT: That bean is field producer.
+ * ASSERT: Model contains 1 bean with type MyBean6 with qualifier MyQualifier
+ * ASSERT: That bean has no injection points.
+ * ASSERT: Model contains 1 bean with type MyBean6 with default qualifier..
+ * ASSERT: That bean has 1 injection point.
+ * ASSERT: That injection point is resolved to bean MyType6.
+ */
+ public void testCreatingBeanWithFieldMadeProducer() {
+ Set<IBean> beans = cdiProject.getBeans(false,
"org.jboss.beans.test04.MyType6", new String[0]);
+ assertEquals(1, beans.size());
+ IBean b = beans.iterator().next();
+ assertTrue(b instanceof IProducerField);
+
+ Set<IBean> beans1 = cdiProject.getBeans(false,
"org.jboss.beans.test04.MyBean6",
+ new String[]{"org.jboss.beans.test04.MyQualifier"});
+ assertEquals(1, beans1.size());
+ IBean b1 = beans1.iterator().next();
+ Set<IInjectionPoint> is1 = b1.getInjectionPoints();
+ assertTrue(is1.isEmpty());
+
+ Set<IBean> beans2 = cdiProject.getBeans(false,
"org.jboss.beans.test04.MyBean6", new String[0]);
+ assertEquals(1, beans2.size());
+ IBean b2 = beans2.iterator().next();
+ Set<IInjectionPoint> is2 = b2.getInjectionPoints();
+ assertEquals(1, is2.size());
+
+ IInjectionPoint p = is2.iterator().next();
+
+ Set<IBean> beansI = cdiProject.getBeans(false, p);
+ assertTrue(beansI.contains(b));
+ }
+
+ /**
+ * Test 05-1
+ * Sources contain class MyBean1 that declares method createType
+ * with parameter MyType1.
+ * Seam config xml contains declaration:
+ * <test05:MyBean1>
+ * <test05:createType>
+ * <s:Produces/>
+ * <test05:MyQualifier/>
+ * <s:parameters>
+ * <test05:MyType1>
+ * </test05:MyType1>
+ * </s:parameters>
+ * </test05:createType>
+ * </test05:MyBean1>
+ *
+ * ASSERT: Model contains 1 bean with type MyType1 with qualifier MyQualifier.
+ * ASSERT: That bean is method producer.
+ * ASSERT: That bean has one injection point; it is parameter.
+ * ASSERT: That injection point is resolved to class bean with type MyType1 with default
qualifier.
+ *
+ * @author Viacheslav Kababovich
+ *
+ */
+ public void testCreatingBeanWithMethodMadeProducer() {
+ Set<IBean> beans = cdiProject.getBeans(false,
"org.jboss.beans.test05.MyType1",
+ new String[]{"org.jboss.beans.test05.MyQualifier"});
+ assertEquals(1, beans.size());
+ IBean b = beans.iterator().next();
+ assertTrue(b instanceof IProducerMethod);
+
+ Set<IInjectionPoint> is = b.getInjectionPoints();
+ assertEquals(1, is.size());
+
+ IInjectionPoint p = is.iterator().next();
+ Set<IBean> beansI = cdiProject.getBeans(false, p);
+ assertEquals(1, beansI.size());
+
+ Set<IBean> beans2 = cdiProject.getBeans(false,
"org.jboss.beans.test05.MyType1", new String[0]);
+ assertEquals(1, beans2.size());
+ IBean b2 = beans2.iterator().next();
+
+ assertTrue(beansI.contains(b2));
+ }
+
+ /**
+ * Test 05-2
+ * Sources contain class MyBean2 that declares constructor.
+ * Seam config xml contains declaration:
+ * <test05:MyBean2>
+ * <s:parameters>
+ * <test05:MyType1>
+ * </test05:MyType1>
+ * </s:parameters>
+ * </test05:MyBean2>
+ *
+ * ASSERT: Model contains 1 bean with type MyBean2.
+ * ASSERT: That bean has one injection point; it is parameter.
+ * ASSERT: That injection point is resolved to class bean with type MyType1 with default
qualifier.
+ *
+ */
+ public void testCreatingBeanWithConstructor() {
+ Set<IBean> beans = cdiProject.getBeans(false,
"org.jboss.beans.test05.MyBean2", new String[0]);
+ assertEquals(1, beans.size());
+ IBean b = beans.iterator().next();
+ assertTrue(b instanceof IClassBean);
+
+ Set<IInjectionPoint> is = b.getInjectionPoints();
+ IInjectionPoint p = getParameterInjectionPoint(is);
+ assertNotNull(p);
+
+ Set<IBean> beansI = cdiProject.getBeans(false, p);
+ assertEquals(1, beansI.size());
+
+ Set<IBean> beans2 = cdiProject.getBeans(false,
"org.jboss.beans.test05.MyType1", new String[0]);
+ assertEquals(1, beans2.size());
+ IBean b2 = beans2.iterator().next();
+
+ assertTrue(beansI.contains(b2));
+ }
+
+ private IInjectionPoint getParameterInjectionPoint(Set<IInjectionPoint> is) {
+ Iterator<IInjectionPoint> it = is.iterator();
+ while(it.hasNext()) {
+ IInjectionPoint i = it.next();
+ if(i instanceof IInjectionPointParameter) {
+ return i;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Test 06-1.
+ * Sources contain simple bean class MyBean1
+ * with two injection points of type String.
+ * Seam config xml contains declaration:
+ * <s:String>
+ * <s:Produces/>
+ * <test06:MyQualifier>one</test06:MyQualifier>
+ * </s:String>
+ *
+ * ASSERT: Model contains 1 bean with type String and qualifier MyQualifier.
+ * ASSERT: Qualifier has value member equal to "one".
+ * ASSERT: Injection point field 'one' in MyBean1 is resolved to that bean.
+ * ASSERT: Injection point field 'two' in MyBean1 is not resolved to a bean.
+ */
+ public void testVirtualFieldProducer() {
+ Set<IBean> beans = cdiProject.getBeans(false, "java.lang.String",
+ new String[]{"org.jboss.beans.test06.MyQualifier"});
+ assertEquals(1, beans.size());
+ IBean b = beans.iterator().next();
+ assertTrue(b instanceof IClassBean); // we keep it as a class bean
+ IQualifierDeclaration d = b.getQualifierDeclarations().iterator().next();
+ String value = (String)d.getMemberValue(null);
+ assertEquals("one", value);
+
+ Set<IBean> beans1 = cdiProject.getBeans(false,
"org.jboss.beans.test06.MyBean1", new String[0]);
+ assertEquals(1, beans1.size());
+ IBean b1 = beans1.iterator().next();
+
+ Set<IInjectionPoint> is = b1.getInjectionPoints();
+ assertEquals(2, is.size());
+ IInjectionPoint one = null;
+ IInjectionPoint two = null;
+
+ Iterator<IInjectionPoint> it = is.iterator();
+ while(it.hasNext()) {
+ IInjectionPoint i = it.next();
+ if(i instanceof IInjectionPointField) {
+ IInjectionPointField f = (IInjectionPointField)i;
+ String n = f.getField().getElementName();
+ if("one".equals(n)) {
+ one = f;
+ } else if("two".equals(n)) {
+ two = f;
+ }
+
+ }
+ }
+ assertNotNull(one);
+ assertNotNull(two);
+
+ Set<IBean> beansI = cdiProject.getBeans(false, one);
+ assertEquals(1, beansI.size());
+ assertTrue(beansI.contains(b));
+
+ beansI = cdiProject.getBeans(false, two);
+ assertTrue(beansI.isEmpty());
+ }
+
+ /**
+ * Test 06-2.
+ * Sources contain simple bean class MyBean1
+ * with injection point of type MyType1.
+ * class MyType1 has no bean constructor.
+ * Seam config xml contains declaration:
+ * <test06:MyType1>
+ * <s:Produces/>
+ * <test06:MyQualifier>two</test06:MyQualifier>
+ * <s:value>
+ * <test06:MyType1>
+ * <s:parameters>
+ * <s:String>
+ * <test06:MyQualifier>one</test06:MyQualifier>
+ * </s:String>
+ * </s:parameters>
+ * </test06:MyType1>
+ * </s:value>
+ * </test06:MyType1>
+ *
+ * ASSERT: Model contains 1 bean with type MyType1 and qualifier MyQualifier.
+ * ASSERT: Qualifier has value member equal to "two".
+ * ASSERT: Injection point field 'two' in MyBean2 is resolved to that bean.
+ * ASSERT: Injection point field 'one' in MyBean2 is resolved to 2 beans.
+ * ASSERT: One of them is the above-mentioned MyType1 bean.
+ * ASSERT: The other of them is a bean with type MyType1 InlineBeanQualifier qualifier.
+ */
+ public void testVirtualFieldProducerWithNoBeanConstructor() {
+ Set<IBean> beans = cdiProject.getBeans(false,
"org.jboss.beans.test06.MyType1",
+ new String[]{"org.jboss.beans.test06.MyQualifier"});
+ assertEquals(1, beans.size());
+ IBean b = beans.iterator().next();
+ assertTrue(b instanceof IClassBean); // we keep it as a class bean
+ IAnnotationDeclaration d =
b.getAnnotation("org.jboss.beans.test06.MyQualifier");
+ assertTrue(d instanceof IQualifierDeclaration);
+ String value = (String)d.getMemberValue(null);
+ assertEquals("two", value);
+// Now this qualifier is added, but it should belong only two the inner injection point,
not to the bean.
+// IAnnotationDeclaration inlineBeanQ =
b.getAnnotation(CDISeamConfigConstants.INLINE_BEAN_QUALIFIER);
+// assertNotNull(inlineBeanQ);
+// Object inlineIndex1 = inlineBeanQ.getMemberValue(null);
+
+ Set<IBean> beans1 = cdiProject.getBeans(false,
"org.jboss.beans.test06.MyBean2", new String[0]);
+ assertEquals(1, beans1.size());
+ IBean b1 = beans1.iterator().next();
+
+ Set<IInjectionPoint> is = b1.getInjectionPoints();
+ assertEquals(2, is.size());
+ IInjectionPoint one = null;
+ IInjectionPoint two = null;
+
+ Iterator<IInjectionPoint> it = is.iterator();
+ while(it.hasNext()) {
+ IInjectionPoint i = it.next();
+ if(i instanceof IInjectionPointField) {
+ IInjectionPointField f = (IInjectionPointField)i;
+ String n = f.getField().getElementName();
+ if("one".equals(n)) {
+ one = f;
+ } else if("two".equals(n)) {
+ two = f;
+ }
+
+ }
+ }
+ assertNotNull(one);
+ assertNotNull(two);
+
+ Set<IBean> beansI = cdiProject.getBeans(false, two);
+ assertEquals(1, beansI.size());
+ assertTrue(beansI.contains(b));
+
+ beansI = cdiProject.getBeans(false, one);
+ assertEquals(2, beansI.size());
+ assertTrue(beansI.contains(b));
+ beansI.remove(b);
+ IBean inner = beansI.iterator().next();
+ d = inner.getAnnotation("org.jboss.beans.test06.MyQualifier");
+ assertNull(d);
+
+ IAnnotationDeclaration inlineBeanQ2 =
inner.getAnnotation(CDISeamConfigConstants.INLINE_BEAN_QUALIFIER_30);
+ assertNotNull(inlineBeanQ2);
+ Object inlineIndex2 = inlineBeanQ2.getMemberValue(null);
+ assertNotNull(inlineIndex2);
+//see comment to inlineIndex1 above.
+// assertEquals(inlineIndex1, inlineIndex2);
+ }
+
+ public void testVirtualFieldProducerForInterface() {
+ Set<IBean> beans = cdiProject.getBeans(false,
"org.jboss.beans.test06.MyInterface",
+ new String[]{CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME});
+ assertEquals(1, beans.size());
+ IBean b = beans.iterator().next();
+ assertTrue(b instanceof IClassBean); // we keep it as a class bean
+
+ Set<IBean> beans1 = cdiProject.getBeans(false,
"org.jboss.beans.test06.MyBean3", new String[0]);
+ assertEquals(1, beans1.size());
+ IBean b1 = beans1.iterator().next();
+
+ Set<IInjectionPoint> is = b1.getInjectionPoints();
+ assertEquals(1, is.size());
+ IInjectionPoint i = is.iterator().next();
+
+ assertNotNull(i);
+
+ Set<IBean> beansI = cdiProject.getBeans(false, i);
+ assertEquals(1, beansI.size());
+ assertTrue(beansI.contains(b));
+
+ }
+
+ /**
+ * Test 06-3.
+ * Uses sources of tests 06-1 and 06-2.
+ *
+ * ASSERT: Inner bean of type MyType1 has InlineBeanQualifier qualifier.
+ * ASSERT: Inner bean of type MyType1 has one injection point.
+ * ASSERT: The injection point is constructor parameter.
+ * ASSERT: The injection point is resolved to a bean (created in test 06-1).
+ *
+ */
+ public void testInnerBeanWithConstructor() {
+ Set<IBean> beans = cdiProject.getBeans(false,
"org.jboss.beans.test06.MyType1",
+ new String[]{CDIConstants.ANY_QUALIFIER_TYPE_NAME});
+ assertEquals(2, beans.size());
+ IBean inner = null;
+ IBean virtual = null;
+ Iterator<IBean> it = beans.iterator();
+ while(it.hasNext()) {
+ IBean b = it.next();
+ if(b.getAnnotation("org.jboss.beans.test06.MyQualifier") != null) {
+ virtual = b;
+ } else {
+ inner = b;
+ }
+ }
+ assertNotNull(inner);
+ assertNotNull(virtual);
+
+ IAnnotationDeclaration inlineBeanQ =
inner.getAnnotation(CDISeamConfigConstants.INLINE_BEAN_QUALIFIER_30);
+ assertNotNull(inlineBeanQ);
+ Object inlineIndex = inlineBeanQ.getMemberValue(null);
+ assertNotNull(inlineIndex);
+
+ Set<IInjectionPoint> is = inner.getInjectionPoints();
+ IInjectionPoint p = getParameterInjectionPoint(is);
+ assertNotNull(p);
+ Set<IBean> bs = cdiProject.getBeans(false, p);
+ assertEquals(1, bs.size());
+
+ }
+
+ /**
+ * Test 07-1.
+ * Sources contain simple bean class MyBean1 with qualifier
@Named("test07-1-a").
+ * Seam config xml in a dependent project contains declaration:
+ * <test07:MyBean1>
+ * <s:modifies/>
+ * <s:Named>test07-1-b</s:Named>
+ * </test07:MyBean1>
+ *
+ * ASSERT: Model contains 1 named bean with name "test07-1-a".
+ * ASSERT: Model contains no named bean with name "test07-1-b".
+ * ASSERT: Model of dependent project contains no named bean with name
"test07-1-a".
+ * ASSERT: Model of dependent project contains 1 named bean with name
"test07-1-b".
+ */
+ public void testModifyingBeanInDependentProject() throws CoreException, IOException {
+ Set<IBean> beans1 = cdiProject.getBeans(false,
"org.jboss.beans.test07.MyBean1");
+ assertEquals(1, beans1.size());
+ IBean b = beans1.iterator().next();
+ assertEquals("test07-1-a", b.getName());
+
+ //The same in dependent project
+ beans1 = cdiDependentProject.getBeans(false,
"org.jboss.beans.test07.MyBean1");
+ assertEquals(1, beans1.size());
+ b = beans1.iterator().next();
+ assertEquals("test07-1-b", b.getName());
+ }
+
+ protected Set<IBean> getBeansByClassName(String className) {
+ return cdiProject.getBeans(false, className, new String[0]);
+ }
+
+ protected Set<IBean> getBeansByClassNameInDependentProject(String className) {
+ return cdiDependentProject.getBeans(false, className, new String[0]);
+ }
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamBeansTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigTest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigTest.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.seam.config.core.test.v30;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.ICDIProject;
+import org.jboss.tools.cdi.core.IInjectionPointField;
+import org.jboss.tools.cdi.core.extension.feature.IBuildParticipantFeature;
+import org.jboss.tools.cdi.core.test.DependentProjectTest;
+import org.jboss.tools.cdi.seam.config.core.CDISeamConfigExtension;
+import org.jboss.tools.cdi.seam.config.core.ConfigDefinitionContext;
+import org.jboss.tools.cdi.seam.config.core.definition.SeamBeanDefinition;
+import org.jboss.tools.cdi.seam.config.core.definition.SeamBeansDefinition;
+import org.jboss.tools.cdi.seam.config.core.xml.SAXElement;
+import org.jboss.tools.test.util.ResourcesUtils;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class SeamConfigTest extends TestCase {
+ protected static String PLUGIN_ID =
"org.jboss.tools.cdi.seam.config.core.test";
+ protected static String PROJECT_NAME = "CDIConfigTest30";
+ protected static String PROJECT_PATH = "/projects/" + PROJECT_NAME;
+
+ protected static String DEPENDENT_PROJECT_NAME = "CDIDependentConfigTest30";
+ protected static String DEPENDENT_PROJECT_PATH = "/projects/" +
DEPENDENT_PROJECT_NAME;
+
+ protected IProject project;
+ protected ICDIProject cdiProject;
+
+ protected IProject dependentProject;
+ protected ICDIProject cdiDependentProject;
+
+ public SeamConfigTest() {
+ project = getTestProject();
+ cdiProject = CDICorePlugin.getCDIProject(project, false);
+ dependentProject = getDependentTestProject();
+ cdiDependentProject = CDICorePlugin.getCDIProject(dependentProject, false);
+ }
+
+ public IProject getTestProject() {
+ if(project==null) {
+ try {
+ project = findTestProject(PROJECT_NAME);
+ if(project==null || !project.exists()) {
+ project = ResourcesUtils.importProject(PLUGIN_ID, PROJECT_PATH);
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Can't import CDI test project: " + e.getMessage());
+ }
+ }
+ return project;
+ }
+
+ public IProject getDependentTestProject() {
+ if(dependentProject==null) {
+ try {
+ dependentProject = findTestProject(DEPENDENT_PROJECT_NAME);
+ if(dependentProject==null || !dependentProject.exists()) {
+ dependentProject = ResourcesUtils.importProject(PLUGIN_ID, DEPENDENT_PROJECT_PATH);
+ dependentProject.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Can't import CDI test project: " + e.getMessage());
+ }
+ }
+ return dependentProject;
+ }
+
+ public static IProject findTestProject(String name) {
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(name);
+ }
+
+ protected CDISeamConfigExtension getConfigExtension(ICDIProject cdi) {
+ Set<IBuildParticipantFeature> bp =
cdi.getNature().getExtensionManager().getBuildParticipantFeatures();
+ for (IBuildParticipantFeature p: bp) {
+ if(p instanceof CDISeamConfigExtension) {
+ return (CDISeamConfigExtension)p;
+ }
+ }
+ return null;
+ }
+
+ protected IInjectionPointField getInjectionPointField(ICDIProject cdi, String
beanClassFilePath, String fieldName) {
+ return DependentProjectTest.getInjectionPointField(cdi, beanClassFilePath, fieldName);
+ }
+
+ protected SeamBeansDefinition getBeansDefinition(ConfigDefinitionContext context, String
path) {
+ IFile f = project.getFile(path);
+ assertNotNull(f);
+ assertTrue(f.exists());
+ SeamBeansDefinition d = context.getDefinition(f.getFullPath());
+ assertNotNull(d);
+ return d;
+ }
+
+ protected Set<SeamBeanDefinition> findBeanDefinitionByTagName(SeamBeansDefinition
seamBeans, String tagname) {
+ Set<SeamBeanDefinition> ds = new HashSet<SeamBeanDefinition>();
+ Set<SeamBeanDefinition> all = seamBeans.getBeanDefinitions();
+ for (SeamBeanDefinition d: all) {
+ SAXElement e = d.getElement();
+ if(tagname.equals(e.getName())) {
+ ds.add(d);
+ }
+ }
+ return ds;
+ }
+}
\ No newline at end of file
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigTestSetup.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigTestSetup.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigTestSetup.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.seam.config.core.test.v30;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class SeamConfigTestSetup extends TestSetup {
+
+ protected IProject project;
+ protected IProject dependentProject;
+
+ public SeamConfigTestSetup(Test test) {
+ super(test);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ project =
ResourcesPlugin.getWorkspace().getRoot().getProject(SeamConfigTest.PROJECT_NAME);
+ if(project == null || !project.exists()) {
+ project = ResourcesUtils.importProject(SeamConfigTest.PLUGIN_ID,
SeamConfigTest.PROJECT_PATH);
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+ }
+ dependentProject =
ResourcesPlugin.getWorkspace().getRoot().getProject(SeamConfigTest.DEPENDENT_PROJECT_NAME);
+ if(dependentProject == null || !dependentProject.exists()) {
+ dependentProject = ResourcesUtils.importProject(SeamConfigTest.PLUGIN_ID,
SeamConfigTest.DEPENDENT_PROJECT_PATH);
+ dependentProject.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+ }
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+ project.delete(true, true, null);
+ JobUtils.waitForIdle();
+ ResourcesUtils.setBuildAutomatically(saveAutoBuild);
+ }
+}
\ No newline at end of file
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigTestSetup.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigValidationTest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigValidationTest.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.seam.config.core.test.v30;
+
+import java.text.MessageFormat;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.internal.preferences.EclipsePreferences;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.ICDIProject;
+import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
+import org.jboss.tools.cdi.seam.config.core.CDISeamConfigPreferences;
+import org.jboss.tools.cdi.seam.config.core.validation.SeamConfigValidationMessages;
+import org.jboss.tools.cdi.seam.solder.core.test.GenericBeanValidationTest;
+import org.jboss.tools.common.base.test.validation.TestUtil;
+import org.jboss.tools.common.preferences.SeverityPreferences;
+import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.tests.AbstractResourceMarkerTest;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class SeamConfigValidationTest extends TestCase {
+ protected static String PLUGIN_ID =
"org.jboss.tools.cdi.seam.config.core.test";
+ protected static String PROJECT_NAME = "CDIConfigValidationTest30";
+ protected static String PROJECT_PATH = "/projects/CDIConfigValidationTest30";
+
+ protected IProject project;
+ protected ICDIProject cdiProject;
+ IFile f;
+
+ public SeamConfigValidationTest() {
+ project = getTestProject();
+ cdiProject = CDICorePlugin.getCDIProject(project, true);
+ f = project.getFile("src/META-INF/beans.xml");
+ assertTrue(f.exists());
+ }
+
+ public IProject getTestProject() {
+ if(project==null) {
+ try {
+ project = findTestProject();
+ if(project==null || !project.exists()) {
+ project = ResourcesUtils.importProject(PLUGIN_ID, PROJECT_PATH);
+ TestUtil._waitForValidation(project);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Can't import CDI test project: " + e.getMessage());
+ }
+ }
+ return project;
+ }
+
+ public static IProject findTestProject() {
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+ }
+
+ public void testBeanResolution() throws CoreException {
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_TYPE, "v:MyBean2"),
8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_TYPE,
"v:MyBean1"));
+ }
+
+ public void testFieldResolution() throws CoreException {
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER, "param"),
21);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER, "value"),
28);
+ }
+
+ public void testMethodResolution() throws CoreException {
+ //It is unresolved member because no member with that name is found.
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER,
"v:method2"), 38);
+
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER,
"v:method1"), 34);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_METHOD,
"v:method1"), 34);
+
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER,
"v:method1"), 42);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_METHOD,
"v:method1"), 42);
+
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_METHOD,
"v:method1"), 47);
+ }
+
+ public void testAnnotationMemberResolution() throws CoreException {
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER,
"v:field3"), 15);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER,
"v:field1"));
+ }
+
+ public void testSettingInlineBeanValuesToBeanOrSetOrMap() throws CoreException {
+ //correct element of set assignment
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 75);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 57);
+ //correct bean assignment
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 119);
+
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 61, 71, 102, 109, 124);
+
+ //set
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.INLINE_BEAN_TYPE_MISMATCH,
"Integer", "String"), 62);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.INLINE_BEAN_TYPE_MISMATCH,
"String", "Integer"), 72);
+
+ //map
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.INLINE_BEAN_TYPE_MISMATCH,
"Long", "Integer"), 103);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.INLINE_BEAN_TYPE_MISMATCH,
"Integer", "Long"), 110);
+
+ //bean
+ 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);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_TYPE, "v:MyBean2"),
8);
+
+ GenericBeanValidationTest.removeFile(project, path);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f,
MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_TYPE, "v:MyBean2"),
8);
+ }
+
+ /**
+ * Check that marker disappears when preference is set to IGNORE and appears again
+ * when preference is set back to WARNING. Check that marker for another preference
+ * is always present.
+ *
+ * @throws CoreException
+ */
+ public void testPreference() throws CoreException {
+ String pattern1 = MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_METHOD,
"v:method1");
+ String pattern2 = MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER,
"v:method2");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f, pattern1, 47);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f, pattern2, 38);
+
+ EclipsePreferences ps =
(EclipsePreferences)CDISeamConfigPreferences.getInstance().getDefaultPreferences();
+ ps.put(CDISeamConfigPreferences.UNRESOLVED_MEMBER, SeverityPreferences.IGNORE);
+ TestUtil._waitForValidation(project);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f, pattern1, 47);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(f, pattern2, 38);
+
+ ps.put(CDISeamConfigPreferences.UNRESOLVED_MEMBER, SeverityPreferences.WARNING);
+ TestUtil._waitForValidation(project);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f, pattern1, 47);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(f, pattern2, 38);
+ }
+}
\ No newline at end of file
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigValidationTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigValidationTestSetup.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigValidationTestSetup.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigValidationTestSetup.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.seam.config.core.test.v30;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.jboss.tools.common.base.test.validation.TestUtil;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class SeamConfigValidationTestSetup extends TestSetup {
+
+ protected IProject project;
+
+ public SeamConfigValidationTestSetup(Test test) {
+ super(test);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ project =
ResourcesPlugin.getWorkspace().getRoot().getProject(SeamConfigValidationTest.PROJECT_NAME);
+ if(project == null || !project.exists()) {
+ project = ResourcesUtils.importProject(SeamConfigValidationTest.PLUGIN_ID,
SeamConfigValidationTest.PROJECT_PATH);
+ TestUtil._waitForValidation(project);
+ }
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+ project.delete(true, true, null);
+ JobUtils.waitForIdle();
+ ResourcesUtils.setBuildAutomatically(saveAutoBuild);
+ }
+}
\ No newline at end of file
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamConfigValidationTestSetup.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamDefinitionsTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamDefinitionsTest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamDefinitionsTest.java 2011-10-07
00:30:20 UTC (rev 35453)
@@ -0,0 +1,530 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.seam.config.core.test.v30;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jdt.core.IMemberValuePair;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IType;
+import org.jboss.tools.cdi.core.CDIConstants;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.ICDIProject;
+import org.jboss.tools.cdi.core.IInterceptorBinding;
+import org.jboss.tools.cdi.core.IQualifier;
+import org.jboss.tools.cdi.core.IStereotype;
+import org.jboss.tools.cdi.seam.config.core.CDISeamConfigConstants;
+import org.jboss.tools.cdi.seam.config.core.ConfigDefinitionContext;
+import org.jboss.tools.cdi.seam.config.core.definition.SeamBeanDefinition;
+import org.jboss.tools.cdi.seam.config.core.definition.SeamBeansDefinition;
+import org.jboss.tools.cdi.seam.config.core.definition.SeamFieldDefinition;
+import org.jboss.tools.cdi.seam.config.core.definition.SeamMethodDefinition;
+import org.jboss.tools.cdi.seam.config.core.definition.SeamParameterDefinition;
+import org.jboss.tools.cdi.seam.config.core.definition.SeamVirtualFieldDefinition;
+import org.jboss.tools.cdi.seam.config.core.xml.Location;
+import org.jboss.tools.cdi.seam.solder.core.CDISeamSolderConstants;
+import org.jboss.tools.cdi.seam.solder.core.CDISeamSolderConstants30;
+import org.jboss.tools.common.java.IJavaAnnotation;
+import org.osgi.framework.Bundle;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class SeamDefinitionsTest extends SeamConfigTest {
+ public SeamDefinitionsTest() {}
+
+ /**
+ * This test just checks that SAXParser class is in class path.
+ */
+ public void testParser() throws Exception {
+ Bundle bundle = Platform.getBundle("org.jboss.tools.cdi.seam.config.core");
+ Class cls = bundle.loadClass("org.apache.xerces.parsers.SAXParser");
+ assertNotNull(cls);
+ }
+
+ public void testLineNumber() {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ConfigDefinitionContext context =
(ConfigDefinitionContext)getConfigExtension(cdi).getContext();
+ SeamBeansDefinition d = getBeansDefinition(context,
"src/META-INF/beans.xml");
+
+ Set<SeamBeanDefinition> ds = findBeanDefinitionByTagName(d,
"test602:Report");
+ assertEquals(1, ds.size());
+ SeamBeanDefinition report = ds.iterator().next();
+ assertEquals(20, report.getElement().getLocation().getLine());
+ }
+
+ public void testReplacingAndModifyingBeans() throws CoreException, IOException {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ConfigDefinitionContext context =
(ConfigDefinitionContext)getConfigExtension(cdi).getContext();
+ SeamBeansDefinition d = getBeansDefinition(context,
"src/META-INF/beans.xml");
+
+ Set<SeamBeanDefinition> ds = findBeanDefinitionByTagName(d,
"test602:Report");
+ assertEquals(1, ds.size());
+ SeamBeanDefinition report = ds.iterator().next();
+ Location modifies = report.getModifiesLocation();
+ assertNotNull(modifies);
+ IJavaAnnotation annotation =
report.getAnnotation("org.jboss.test602.report.NewQualifier");
+ assertNotNull(annotation);
+
+ ds = findBeanDefinitionByTagName(d, "test602:ReportDatasource");
+ assertEquals(1, ds.size());
+ SeamBeanDefinition reportDatasource = ds.iterator().next();
+ Location replaces = reportDatasource.getReplacesLocation();
+ assertNotNull(replaces);
+ }
+
+ public void testApplyingAnnotations() throws CoreException {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ConfigDefinitionContext context =
(ConfigDefinitionContext)getConfigExtension(cdi).getContext();
+ SeamBeansDefinition d = getBeansDefinition(context,
"src/META-INF/beans.xml");
+
+ Set<SeamBeanDefinition> ds = findBeanDefinitionByTagName(d,
"test603:QualifiedBean1");
+ assertEquals(1, ds.size());
+ SeamBeanDefinition b = ds.iterator().next();
+ IJavaAnnotation a = b.getAnnotation("org.jboss.test603.OtherQualifier");
+ Map<String, Object> ps = toMap(a.getMemberValuePairs());
+ assertEquals(3, ps.size());
+ assertEquals("AA", "" + ps.get("value1"));
+ assertEquals("1", "" + ps.get("value2"));
+ assertEquals("false", "" + ps.get("value"));
+
+ ds = findBeanDefinitionByTagName(d, "test603:QualifiedBean2");
+ assertEquals(1, ds.size());
+ b = ds.iterator().next();
+ a = b.getAnnotation("org.jboss.test603.OtherQualifier");
+ ps = toMap(a.getMemberValuePairs());
+ assertEquals(3, ps.size());
+ assertEquals("BB", "" + ps.get("value1"));
+ assertEquals("2", "" + ps.get("value2"));
+ assertEquals("true", "" + ps.get("value"));
+ }
+
+ Map<String, Object> toMap(IMemberValuePair[] ps) {
+ Map<String, Object> result = new HashMap<String, Object>();
+ for (IMemberValuePair p: ps) result.put(p.getMemberName(), p.getValue());
+ return result;
+ }
+
+ public void testInitialFieldValues() {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ConfigDefinitionContext context =
(ConfigDefinitionContext)getConfigExtension(cdi).getContext();
+ SeamBeansDefinition d = getBeansDefinition(context,
"src/META-INF/beans.xml");
+
+ /*
+<test6041:RobotFactory>
+ <test6041:robot>
+ <s:Produces/>
+ </test6041:robot>
+</test6041:RobotFactory>
+ */
+ Set<SeamBeanDefinition> ds = findBeanDefinitionByTagName(d,
"test6041:RobotFactory");
+ assertEquals(1, ds.size());
+ SeamBeanDefinition b = ds.iterator().next();
+ SeamFieldDefinition f = b.getField("robot");
+ assertNotNull(f);
+ IJavaAnnotation a = f.getAnnotation("javax.enterprise.inject.Produces");
+ assertNotNull(a);
+
+/*
+<test6041:MyBean>
+ <test6041:SomeQualifier/>
+ <test6041:company>Red Hat Inc</test6041:company>
+</test6041:MyBean>
+
+<test6041:MyBean>
+ <test6041:company>
+ <s:value>Red Hat Inc</s:value>
+ <test6041:SomeQualifier/>
+ </test6041:company>
+</test6041:MyBean>
+ */
+ ds = findBeanDefinitionByTagName(d, "test6041:MyBean");
+ assertEquals(2, ds.size());
+ Iterator<SeamBeanDefinition> it = ds.iterator();
+ SeamBeanDefinition b1 = it.next();
+ SeamBeanDefinition b2 = it.next();
+ String someQualifier = "org.jboss.test6041.SomeQualifier";
+ boolean qb1 = b1.getAnnotation(someQualifier) != null;
+ boolean qb2 = b2.getAnnotation(someQualifier) != null;
+ assertFalse(qb1 == qb2);
+ if(qb2) {
+ //assign b1 to bean with qualifier; b2 to bean having field with qualifier.
+ SeamBeanDefinition bc = b1;
+ b1 = b2;
+ b2 = bc;
+ }
+ f = b1.getField("company");
+ assertNotNull(f);
+ assertNull(f.getAnnotation(someQualifier));
+ assertEquals("Red Hat Inc", f.getValue());
+ f = b2.getField("company");
+ assertNotNull(f);
+ assertNotNull(f.getAnnotation(someQualifier));
+ assertEquals("Red Hat Inc", f.getValue());
+ }
+
+ /**
+<test6041:ArrayFieldValue>
+ <test6041:intArrayField>
+ <s:value>1</s:value>
+ <s:value>2</s:value>
+ </test6041:intArrayField>
+ <test6041:classArrayField>
+ <s:value>java.lang.Integer</s:value>
+ <s:value>java.lang.Long</s:value>
+ </test6041:classArrayField>
+ <test6041:stringArrayField>
+ <s:value>hello</s:value>
+ <s:value>world</s:value>
+ </test6041:stringArrayField>
+</test6041:ArrayFieldValue>
+ *
+ */
+ public void testInitialFieldListValues() {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ConfigDefinitionContext context =
(ConfigDefinitionContext)getConfigExtension(cdi).getContext();
+ SeamBeansDefinition d = getBeansDefinition(context,
"src/META-INF/beans.xml");
+
+ Set<SeamBeanDefinition> ds = findBeanDefinitionByTagName(d,
"test6041:ArrayFieldValue");
+ assertEquals(1, ds.size());
+ SeamBeanDefinition b = ds.iterator().next();
+ SeamFieldDefinition f = b.getField("intArrayField");
+ assertNotNull(f);
+ List<String> vs = f.getListValue();
+ assertEquals(2, vs.size());
+ assertEquals("1", vs.get(0));
+ assertEquals("2", vs.get(1));
+
+ f = b.getField("classArrayField");
+ assertNotNull(f);
+ vs = f.getListValue();
+ assertEquals(2, vs.size());
+ assertEquals("java.lang.Integer", vs.get(0));
+ assertEquals("java.lang.Long", vs.get(1));
+
+ f = b.getField("stringArrayField");
+ assertNotNull(f);
+ vs = f.getListValue();
+ assertEquals(2, vs.size());
+ assertEquals("hello", vs.get(0));
+ assertEquals("world", vs.get(1));
+
+ }
+
+ /**
+<test6042:Knight>
+ <test6042:sword>
+ <s:value>
+ <test6042:Sword type="sharp"/>
+ </s:value>
+ </test6042:sword>
+ <test6042:horse>
+ <s:value>
+ <test6042:Horse>
+ <test6042:name>
+ <value>billy</value>
+ </test6042:name>
+ <test6042:shoe>
+ <Inject/>
+ </test6042:shoe>
+ </test6042:Horse>
+ </s:value>
+ </test6042:horse>
+</test6042:Knight>
+ */
+ public void testInlineBeanDeclarations() {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ConfigDefinitionContext context =
(ConfigDefinitionContext)getConfigExtension(cdi).getContext();
+ SeamBeansDefinition d = getBeansDefinition(context,
"src/META-INF/beans.xml");
+
+ Set<SeamBeanDefinition> ds = findBeanDefinitionByTagName(d,
"test6042:Knight");
+ assertEquals(1, ds.size());
+ SeamBeanDefinition knight = ds.iterator().next();
+
+ SeamFieldDefinition f = knight.getField("sword");
+ assertNotNull(f);
+ ds = findBeanDefinitionByTagName(d, "test6042:Sword");
+ assertEquals(1, ds.size());
+ SeamBeanDefinition sword = ds.iterator().next();
+ assertTrue(sword.isInline());
+ IJavaAnnotation a1 =
sword.getAnnotation(CDISeamConfigConstants.INLINE_BEAN_QUALIFIER_30);
+ assertNotNull(a1);
+ IJavaAnnotation a2 =
f.getValueDefinitions().get(0).getAnnotation(CDISeamConfigConstants.INLINE_BEAN_QUALIFIER_30);
+ assertTrue(a1 == a2);
+ IJavaAnnotation inject =
f.getValueDefinitions().get(0).getAnnotation(CDIConstants.INJECT_ANNOTATION_TYPE_NAME);
+ assertNotNull(inject);
+
+ SeamFieldDefinition swordType = sword.getField("type");
+ assertNotNull(swordType);
+ assertEquals("sharp", swordType.getValue());
+
+ f = knight.getField("horse");
+ assertNotNull(f);
+ ds = findBeanDefinitionByTagName(d, "test6042:Horse");
+ assertEquals(1, ds.size());
+ SeamBeanDefinition horse = ds.iterator().next();
+ assertTrue(horse.isInline());
+ a1 = horse.getAnnotation(CDISeamConfigConstants.INLINE_BEAN_QUALIFIER_30);
+ assertNotNull(a1);
+ a2 =
f.getValueDefinitions().get(0).getAnnotation(CDISeamConfigConstants.INLINE_BEAN_QUALIFIER_30);
+ assertTrue(a1 == a2);
+ inject =
f.getValueDefinitions().get(0).getAnnotation(CDIConstants.INJECT_ANNOTATION_TYPE_NAME);
+ assertNotNull(inject);
+
+ SeamFieldDefinition horseName = horse.getField("name");
+ assertNotNull(horseName);
+ assertEquals("billy", horseName.getValue());
+ SeamFieldDefinition shoe = horse.getField("shoe");
+ assertNotNull(shoe);
+ inject = shoe.getAnnotation(CDIConstants.INJECT_ANNOTATION_TYPE_NAME);
+ assertNotNull(inject);
+
+ }
+
+ /**
+<test605:MethodBean>
+ <test605:doStuff>
+ <s:Produces/>
+ </test605:doStuff>
+
+ <test605:doStuff>
+ <s:Produces/>
+ <test605:Qualifier1/>
+ <s:parameters>
+ <s:Long>
+ <test605:Qualifier2/>
+ </s:Long>
+ </s:parameters>
+ </test605:doStuff>
+
+ <test605:doStuff>
+ <s:Produces/>
+ <test605:Qualifier1/>
+ <s:parameters>
+ <s:array dimensions="2">
+ <test605:Qualifier2/>
+ <s:Long/>
+ </s:array>
+ </s:parameters>
+ </test605:doStuff>
+</test605:MethodBean>
+ */
+ public void testConfiguringMethods() {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ConfigDefinitionContext context =
(ConfigDefinitionContext)getConfigExtension(cdi).getContext();
+ SeamBeansDefinition d = getBeansDefinition(context,
"src/META-INF/beans.xml");
+
+ Set<SeamBeanDefinition> ds = findBeanDefinitionByTagName(d,
"test605:MethodBean");
+ assertEquals(1, ds.size());
+ SeamBeanDefinition b = ds.iterator().next();
+ List<SeamMethodDefinition> ms = b.getMethods();
+ assertEquals(3, ms.size());
+
+ SeamMethodDefinition noParam = ms.get(0);
+ assertEquals(0, noParam.getParameters().size());
+ assertNotNull(noParam.getAnnotation(CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME));
+
+ SeamMethodDefinition oneParam = ms.get(1);
+ assertEquals(1, oneParam.getParameters().size());
+ assertNotNull(oneParam.getAnnotation(CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME));
+ assertNotNull(oneParam.getAnnotation("org.jboss.test605.Qualifier1"));
+ SeamParameterDefinition param = oneParam.getParameters().get(0);
+ assertEquals(0, param.getDimensions());
+ assertEquals("java.lang.Long", param.getType().getFullyQualifiedName());
+ assertNotNull(param.getAnnotation("org.jboss.test605.Qualifier2"));
+
+ SeamMethodDefinition oneArrayParam = ms.get(2);
+ assertEquals(1, oneParam.getParameters().size());
+ assertNotNull(oneArrayParam.getAnnotation(CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME));
+ assertNotNull(oneArrayParam.getAnnotation("org.jboss.test605.Qualifier1"));
+ param = oneArrayParam.getParameters().get(0);
+ assertEquals(2, param.getDimensions());
+ assertEquals("java.lang.Long", param.getType().getFullyQualifiedName());
+ assertNotNull(param.getAnnotation("org.jboss.test605.Qualifier2"));
+
+ }
+
+ /**
+<test605:MethodBean2>
+ <test605:method>
+ <s:array>
+ <test605:String/>
+ </s:array>
+ </test605:method>
+</test605:MethodBean2>
+ */
+ public void testConfiguringMethods2() {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ConfigDefinitionContext context =
(ConfigDefinitionContext)getConfigExtension(cdi).getContext();
+ SeamBeansDefinition d = getBeansDefinition(context,
"src/META-INF/beans.xml");
+
+ Set<SeamBeanDefinition> ds = findBeanDefinitionByTagName(d,
"test605:MethodBean2");
+ assertEquals(1, ds.size());
+ SeamBeanDefinition b = ds.iterator().next();
+ List<SeamMethodDefinition> ms = b.getMethods();
+ assertEquals(1, ms.size());
+
+ SeamMethodDefinition m = ms.get(0);
+ assertEquals(1, m.getParameters().size());
+ SeamParameterDefinition param = m.getParameters().get(0);
+ assertEquals(1, param.getDimensions());
+ assertEquals("java.lang.String", param.getType().getFullyQualifiedName());
+
+ }
+
+ public void testResolvingBetweenFieldAndMethod() {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ConfigDefinitionContext context =
(ConfigDefinitionContext)getConfigExtension(cdi).getContext();
+ SeamBeansDefinition d = getBeansDefinition(context,
"src/META-INF/beans.xml");
+
+ Set<SeamBeanDefinition> ds = findBeanDefinitionByTagName(d,
"test605:MethodBean3");
+ assertEquals(1, ds.size());
+ SeamBeanDefinition b = ds.iterator().next();
+ SeamFieldDefinition f = b.getField("name");
+ assertNotNull(f);
+
+ ds = findBeanDefinitionByTagName(d, "test605:MethodBean4");
+ assertEquals(1, ds.size());
+ b = ds.iterator().next();
+ List<SeamMethodDefinition> ms = b.getMethods();
+ assertEquals(1, ms.size());
+ SeamMethodDefinition m = ms.get(0);
+ assertEquals("name", m.getMethod().getElementName());
+
+ }
+
+ /**
+<test606:MyBean>
+ <s:parameters>
+ <s:Integer>
+ <test606:MyQualifier/>
+ </s:Integer>
+ </s:parameters>
+</test606:MyBean>
+ */
+ public void testConfiguringConstructor() throws CoreException {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ConfigDefinitionContext context =
(ConfigDefinitionContext)getConfigExtension(cdi).getContext();
+ SeamBeansDefinition d = getBeansDefinition(context,
"src/META-INF/beans.xml");
+
+ Set<SeamBeanDefinition> ds = findBeanDefinitionByTagName(d,
"test606:MyBean");
+ assertEquals(1, ds.size());
+ SeamBeanDefinition b = ds.iterator().next();
+ List<SeamMethodDefinition> ms = b.getMethods();
+ assertEquals(1, ms.size());
+
+ SeamMethodDefinition m = ms.get(0);
+ IMethod jm = m.getMethod();
+ assertTrue(jm.isConstructor());
+ assertEquals(1, m.getParameters().size());
+ SeamParameterDefinition param = m.getParameters().get(0);
+ assertEquals(0, param.getDimensions());
+ assertEquals("java.lang.Integer", param.getType().getFullyQualifiedName());
+
+ }
+
+ /**
+<test607:SomeBean>
+ <test607:someField>
+ <s:Inject/>
+ <s:Exact>org.jboss.test607.MyInterface</s:Exact>
+ </test607:someField>
+</test607:SomeBean>
+ */
+ public void testOverridingTypeOfAnInjectionPoint() throws CoreException {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ConfigDefinitionContext context =
(ConfigDefinitionContext)getConfigExtension(cdi).getContext();
+ SeamBeansDefinition d = getBeansDefinition(context,
"src/META-INF/beans.xml");
+
+ Set<SeamBeanDefinition> ds = findBeanDefinitionByTagName(d,
"test607:SomeBean");
+ assertEquals(1, ds.size());
+ SeamBeanDefinition b = ds.iterator().next();
+ SeamFieldDefinition f = b.getField("someField");
+ assertNotNull(f);
+ IJavaAnnotation inject = f.getAnnotation(CDIConstants.INJECT_ANNOTATION_TYPE_NAME);
+ assertNotNull(inject);
+ IJavaAnnotation exact =
f.getAnnotation(CDISeamSolderConstants30.EXACT_ANNOTATION_TYPE_NAME_30);
+ assertNotNull(exact);
+ IMemberValuePair[] ps = exact.getMemberValuePairs();
+ assertEquals(1, ps.length);
+ assertEquals("org.jboss.test607.MyInterface", ps[0].getValue());
+
+ }
+
+ public void testConfiguringMetaAnnotations() {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ConfigDefinitionContext context =
(ConfigDefinitionContext)getConfigExtension(cdi).getContext();
+ SeamBeansDefinition d = getBeansDefinition(context,
"src/META-INF/beans.xml");
+
+ /*
+<test608:SomeQualifier>
+ <s:Qualifier/>
+</test608:SomeQualifier>
+ */
+ context.getRootContext().getAnnotation("org.jboss.test608.SomeQualifier");
+ IQualifier q = cdi.getQualifier("org.jboss.test608.SomeQualifier");
+ assertNotNull(q);
+
+ /*
+<test608:SomeInterceptorBinding>
+ <s:InterceptorBinding/>
+</test608:SomeInterceptorBinding>
+ */
+ IInterceptorBinding b =
cdi.getInterceptorBinding("org.jboss.test608.SomeInterceptorBinding");
+ assertNotNull(b);
+
+ /*
+<test608:SomeStereotype>
+ <s:Stereotype/>
+ <test608:MyInterceptorBinding/>
+ <s:Named/>
+</test608:SomeStereotype>
+ */
+ IStereotype s = cdi.getStereotype("org.jboss.test608.SomeStereotype");
+ assertNotNull(s);
+ assertNotNull(s.getAnnotation(CDIConstants.NAMED_QUALIFIER_TYPE_NAME));
+ Set<IInterceptorBinding> bs = s.getInterceptorBindings();
+ assertEquals(1, bs.size());
+
+ }
+
+ public void testVirtualProducerField() {
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ConfigDefinitionContext context =
(ConfigDefinitionContext)getConfigExtension(cdi).getContext();
+ SeamBeansDefinition d = getBeansDefinition(context,
"src/META-INF/beans.xml");
+
+ Set<SeamVirtualFieldDefinition> fs = d.getVirtualFieldDefinitions();
+ assertFalse(fs.isEmpty());
+ SeamVirtualFieldDefinition f = findVirtualField(fs, "java.lang.String",
"org.jboss.test606.MyQualifier");
+ assertNotNull(f);
+ assertNotNull(f.getAnnotation(CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME));
+ assertEquals("Version 1.23", f.getValue());
+
+ }
+
+ private SeamVirtualFieldDefinition
findVirtualField(Set<SeamVirtualFieldDefinition> fs, String typeName, String
qualifier) {
+ for (SeamVirtualFieldDefinition f: fs) {
+ IType t = f.getType();
+ if(typeName.equals(t.getFullyQualifiedName()) && f.getAnnotation(qualifier) !=
null) return f;
+ }
+ return null;
+ }
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/v30/SeamDefinitionsTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain