Weld SVN: r5313 - in archetypes/tags/weld-archetype-parent-1.0.0-BETA/jsf: jee-minimal/src/main/resources/archetype-resources and 1 other directories.
by weld-commits@lists.jboss.org
Author: sboscarine
Date: 2009-12-16 22:57:29 -0500 (Wed, 16 Dec 2009)
New Revision: 5313
Modified:
archetypes/tags/weld-archetype-parent-1.0.0-BETA/jsf/jee-minimal/src/main/resources/archetype-resources/pom.xml
archetypes/tags/weld-archetype-parent-1.0.0-BETA/jsf/jee/src/main/resources/archetype-resources/pom.xml
archetypes/tags/weld-archetype-parent-1.0.0-BETA/jsf/servlet-minimal/src/main/resources/archetype-resources/pom.xml
Log:
Added repo reference
Modified: archetypes/tags/weld-archetype-parent-1.0.0-BETA/jsf/jee/src/main/resources/archetype-resources/pom.xml
===================================================================
--- archetypes/tags/weld-archetype-parent-1.0.0-BETA/jsf/jee/src/main/resources/archetype-resources/pom.xml 2009-12-17 01:17:12 UTC (rev 5312)
+++ archetypes/tags/weld-archetype-parent-1.0.0-BETA/jsf/jee/src/main/resources/archetype-resources/pom.xml 2009-12-17 03:57:29 UTC (rev 5313)
@@ -7,7 +7,15 @@
<packaging>war</packaging>
<name>${artifactId}</name>
<version>${version}</version>
-
+ <repositories>
+ <!-- Some core Java EE 6 dependencies have not yet made it on to the Maven Central Repository when this POM was authored. -->
+ <!-- This repository declaration will likely be optional soon. -->
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ </repository>
+ </repositories>
<properties>
<!--
Explicitly declaring the source encoding eliminates the following message:
Modified: archetypes/tags/weld-archetype-parent-1.0.0-BETA/jsf/jee-minimal/src/main/resources/archetype-resources/pom.xml
===================================================================
--- archetypes/tags/weld-archetype-parent-1.0.0-BETA/jsf/jee-minimal/src/main/resources/archetype-resources/pom.xml 2009-12-17 01:17:12 UTC (rev 5312)
+++ archetypes/tags/weld-archetype-parent-1.0.0-BETA/jsf/jee-minimal/src/main/resources/archetype-resources/pom.xml 2009-12-17 03:57:29 UTC (rev 5313)
@@ -7,7 +7,15 @@
<packaging>war</packaging>
<name>${artifactId}</name>
<version>${version}</version>
-
+ <repositories>
+ <!-- Some core Java EE 6 dependencies have not yet made it on to the Maven Central Repository when this POM was authored. -->
+ <!-- This repository declaration will likely be optional soon. -->
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ </repository>
+ </repositories>
<properties>
<!--
Explicitly declaring the source encoding eliminates the following message:
Modified: archetypes/tags/weld-archetype-parent-1.0.0-BETA/jsf/servlet-minimal/src/main/resources/archetype-resources/pom.xml
===================================================================
--- archetypes/tags/weld-archetype-parent-1.0.0-BETA/jsf/servlet-minimal/src/main/resources/archetype-resources/pom.xml 2009-12-17 01:17:12 UTC (rev 5312)
+++ archetypes/tags/weld-archetype-parent-1.0.0-BETA/jsf/servlet-minimal/src/main/resources/archetype-resources/pom.xml 2009-12-17 03:57:29 UTC (rev 5313)
@@ -7,7 +7,15 @@
<packaging>war</packaging>
<name>${artifactId}</name>
<version>${version}</version>
-
+ <repositories>
+ <!-- Some core Java EE 6 dependencies have not yet made it on to the Maven Central Repository when this POM was authored. -->
+ <!-- This repository declaration will likely be optional soon. -->
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ </repository>
+ </repositories>
<properties>
<!--
Explicitly declaring the source encoding eliminates the following message:
14 years, 11 months
Weld SVN: r5312 - in archetypes/trunk/jsf: jee-minimal/src/main/resources/archetype-resources/src/main/java and 1 other directories.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-12-16 20:17:12 -0500 (Wed, 16 Dec 2009)
New Revision: 5312
Modified:
archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/main/java/HelloWorld.java
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/HelloWorld.java
archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/main/java/HelloWorld.java
Log:
use a proper @PostConstruct to report that the bean was created/initialized
Modified: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/HelloWorld.java
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/HelloWorld.java 2009-12-17 01:07:58 UTC (rev 5311)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/HelloWorld.java 2009-12-17 01:17:12 UTC (rev 5312)
@@ -1,5 +1,6 @@
package ${package};
+import javax.annotation.PostConstruct;
import javax.enterprise.inject.Model;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
@@ -18,7 +19,10 @@
private String email;
- public HelloWorld()
+ public HelloWorld() {}
+
+ @PostConstruct
+ public void initialize()
{
System.out.println(this.getClass().getSimpleName() + " was constructed");
}
Modified: archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/main/java/HelloWorld.java
===================================================================
--- archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/main/java/HelloWorld.java 2009-12-17 01:07:58 UTC (rev 5311)
+++ archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/main/java/HelloWorld.java 2009-12-17 01:17:12 UTC (rev 5312)
@@ -1,5 +1,6 @@
package ${package};
+import javax.annotation.PostConstruct;
import javax.enterprise.inject.Model;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
@@ -18,7 +19,10 @@
private String email;
- public HelloWorld()
+ public HelloWorld() {}
+
+ @PostConstruct
+ public void initialize()
{
System.out.println(this.getClass().getSimpleName() + " was constructed");
}
Modified: archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/main/java/HelloWorld.java
===================================================================
--- archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/main/java/HelloWorld.java 2009-12-17 01:07:58 UTC (rev 5311)
+++ archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/main/java/HelloWorld.java 2009-12-17 01:17:12 UTC (rev 5312)
@@ -1,5 +1,6 @@
package ${package};
+import javax.annotation.PostConstruct;
import javax.enterprise.inject.Model;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
@@ -18,7 +19,10 @@
private String email;
- public HelloWorld()
+ public HelloWorld() {}
+
+ @PostConstruct
+ public void initialize()
{
System.out.println(this.getClass().getSimpleName() + " was constructed");
}
14 years, 11 months
Weld SVN: r5311 - extensions/trunk/bom.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-12-16 20:07:58 -0500 (Wed, 16 Dec 2009)
New Revision: 5311
Modified:
extensions/trunk/bom/pom.xml
Log:
move to official JSF 2 release: 2.0.2-FCS
Modified: extensions/trunk/bom/pom.xml
===================================================================
--- extensions/trunk/bom/pom.xml 2009-12-16 16:25:46 UTC (rev 5310)
+++ extensions/trunk/bom/pom.xml 2009-12-17 01:07:58 UTC (rev 5311)
@@ -35,7 +35,7 @@
<weld.api.version>1.0</weld.api.version>
<weld.core.version>1.0.0</weld.core.version>
<!-- Use JSF 2 for all extensions support, despite core using JSF 1.2 -->
- <jsf.version>2.0.0-RC</jsf.version>
+ <jsf.version>2.0.2-FCS</jsf.version>
<wicket.version>1.4.1</wicket.version>
<tomcat.version>6.0.20</tomcat.version>
<uel.glassfish.version>2.1.2-b04</uel.glassfish.version>
14 years, 11 months
Weld SVN: r5310 - cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom.
by weld-commits@lists.jboss.org
Author: jharting
Date: 2009-12-16 11:25:46 -0500 (Wed, 16 Dec 2009)
New Revision: 5310
Modified:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/IntegerBean.java
Log:
CDITCK-57
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java 2009-12-16 16:22:52 UTC (rev 5309)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java 2009-12-16 16:25:46 UTC (rev 5310)
@@ -24,10 +24,12 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Resource;
import org.jboss.testharness.impl.packaging.Resources;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
@Artifact
@SpecVersion(spec="cdi", version="20091101")
+@BeansXml("beans.xml")
@Resources({
@Resource(source="javax.enterprise.inject.spi.Extension", destination="WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
})
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/IntegerBean.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/IntegerBean.java 2009-12-16 16:22:52 UTC (rev 5309)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/IntegerBean.java 2009-12-16 16:25:46 UTC (rev 5310)
@@ -69,8 +69,10 @@
public Set<Class<? extends Annotation>> getStereotypes()
{
+ HashSet<Class<? extends Annotation>> stereotypes = new HashSet<Class<? extends Annotation>>();
+ stereotypes.add(AlternativeStereotype.class);
getStereotypesCalled = true;
- return Collections.emptySet();
+ return stereotypes;
}
public Set<Type> getTypes()
@@ -87,7 +89,7 @@
public boolean isAlternative()
{
isAlternativeCalled = true;
- return false;
+ return true;
}
public boolean isNullable()
14 years, 11 months
Weld SVN: r5309 - cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom.
by weld-commits@lists.jboss.org
Author: jharting
Date: 2009-12-16 11:22:52 -0500 (Wed, 16 Dec 2009)
New Revision: 5309
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/IntegerBean.java
Log:
CDITCK-57
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java 2009-12-16 15:59:30 UTC (rev 5308)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java 2009-12-16 16:22:52 UTC (rev 5309)
@@ -24,10 +24,12 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Resource;
import org.jboss.testharness.impl.packaging.Resources;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
@Artifact
@SpecVersion(spec="cdi", version="20091101")
+@BeansXml("beans.xml")
@Resources({
@Resource(source="javax.enterprise.inject.spi.Extension", destination="WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
})
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/IntegerBean.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/IntegerBean.java 2009-12-16 15:59:30 UTC (rev 5308)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/IntegerBean.java 2009-12-16 16:22:52 UTC (rev 5309)
@@ -69,8 +69,10 @@
public Set<Class<? extends Annotation>> getStereotypes()
{
+ HashSet<Class<? extends Annotation>> stereotypes = new HashSet<Class<? extends Annotation>>();
+ stereotypes.add(AlternativeStereotype.class);
getStereotypesCalled = true;
- return Collections.emptySet();
+ return stereotypes;
}
public Set<Type> getTypes()
@@ -87,7 +89,7 @@
public boolean isAlternative()
{
isAlternativeCalled = true;
- return false;
+ return true;
}
public boolean isNullable()
14 years, 11 months
Weld SVN: r5308 - in cdi-tck/branches/1.0/impl/src/main: resources/org/jboss/jsr299/tck/tests/definition/bean/custom and 1 other directory.
by weld-commits@lists.jboss.org
Author: jharting
Date: 2009-12-16 10:59:30 -0500 (Wed, 16 Dec 2009)
New Revision: 5308
Added:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/AlternativeStereotype.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/IntegerBean.java
cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/beans.xml
Removed:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/Cat.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CatBean.java
Modified:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/House.java
cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/javax.enterprise.inject.spi.Extension
Log:
CDITCK-57
Added: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/AlternativeStereotype.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/AlternativeStereotype.java (rev 0)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/AlternativeStereotype.java 2009-12-16 15:59:30 UTC (rev 5308)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.definition.bean.custom;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import javax.enterprise.inject.Alternative;
+import javax.enterprise.inject.Stereotype;
+
+@Alternative
+@Stereotype
+@Target(TYPE)
+@Retention(RUNTIME)
+@interface AlternativeStereotype
+{
+}
Deleted: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/Cat.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/Cat.java 2009-12-16 15:57:52 UTC (rev 5307)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/Cat.java 2009-12-16 15:59:30 UTC (rev 5308)
@@ -1,13 +0,0 @@
-package org.jboss.jsr299.tck.tests.definition.bean.custom;
-
-class Cat
-{
-
- @SuppressWarnings("unused")
- private String name;
-
- public Cat(String name)
- {
- this.name = name;
- }
-}
Deleted: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CatBean.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CatBean.java 2009-12-16 15:57:52 UTC (rev 5307)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CatBean.java 2009-12-16 15:59:30 UTC (rev 5308)
@@ -1,163 +0,0 @@
-package org.jboss.jsr299.tck.tests.definition.bean.custom;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.context.Dependent;
-import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.Extension;
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.jboss.jsr299.tck.literals.DefaultLiteral;
-
-public class CatBean implements Bean<Cat>, Extension
-{
- public static final CatBean bean = new CatBean();
-
- private boolean getBindingsCalled = false;
- private boolean getInjectionPointsCalled = false;
- private boolean getNameCalled = false;
- private boolean getScopeTypeCalled = false;
- private boolean getTypesCalled = false;
- private boolean isPolicyCalled = false;
- private boolean isSerializableCalled = false;
- private boolean isNullableCalled = false;
- private boolean isGetBeanClassCalled = false;
- private boolean getStereotypesCalled = false;
-
-
- @SuppressWarnings("serial")
- public Set<Annotation> getQualifiers()
- {
- getBindingsCalled = true;
- return new HashSet<Annotation>(){{ add(new DefaultLiteral());}};
- }
-
- public Set<InjectionPoint> getInjectionPoints()
- {
- getInjectionPointsCalled = true;
- return new HashSet<InjectionPoint>();
- }
-
- public String getName()
- {
- getNameCalled = true;
- return "cat";
- }
-
- public Set<Class<? extends Annotation>> getStereotypes() {
- getStereotypesCalled = true;
- return new HashSet<Class<? extends Annotation>>();
- }
-
- public Class<? extends Annotation> getScope()
- {
- getScopeTypeCalled = true;
- return Dependent.class;
- }
-
- @SuppressWarnings("serial")
- public Set<Type> getTypes()
- {
- getTypesCalled = true;
- return new HashSet<Type>() {{ add(Cat.class); add(Object.class); }};
- }
-
- public boolean isNullable()
- {
- isNullableCalled = true;
- return false;
- }
-
- public boolean isSerializable()
- {
- isSerializableCalled = true;
- return false;
- }
-
- public Class<?> getBeanClass()
- {
- isGetBeanClassCalled = true;
- return Cat.class;
- }
-
- public boolean isAlternative()
- {
- isPolicyCalled = true;
- return false;
- }
-
- public Cat create(CreationalContext<Cat> creationalContext)
- {
- return new Cat("kitty");
- }
-
- public void destroy(Cat instance, CreationalContext<Cat> creationalContext)
- {
- creationalContext.release();
- }
-
- public boolean isGetBindingsCalled()
- {
- return getBindingsCalled;
- }
-
- public boolean isGetInjectionPointsCalled()
- {
- return getInjectionPointsCalled;
- }
-
- public boolean isGetNameCalled()
- {
- return getNameCalled;
- }
-
- public boolean isGetScopeTypeCalled()
- {
- return getScopeTypeCalled;
- }
-
- public boolean isGetTypesCalled()
- {
- return getTypesCalled;
- }
-
- public boolean isPolicyCalled()
- {
- return isPolicyCalled;
- }
-
- public boolean isSerializableCalled()
- {
- return isSerializableCalled;
- }
-
- public boolean isNullableCalled()
- {
- return isNullableCalled;
- }
-
- public static CatBean getBean()
- {
- return bean;
- }
-
- public boolean isGetBeanClassCalled()
- {
- return isGetBeanClassCalled;
- }
-
- public boolean isGetStereotypesCalled()
- {
- return getStereotypesCalled;
- }
-
- public void afterDiscovery(@Observes AfterBeanDiscovery event) {
- event.addBean(bean);
- }
-}
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java 2009-12-16 15:57:52 UTC (rev 5307)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java 2009-12-16 15:59:30 UTC (rev 5308)
@@ -42,7 +42,7 @@
})
public void testGetBeanClassCalled()
{
- assert CatBean.bean.isGetBeanClassCalled();
+ assert IntegerBean.bean.isGetBeanClassCalled();
}
@Test(groups = { "ri-broken" })
@@ -50,56 +50,55 @@
// WBRI-328
public void testGetStereotypesCalled()
{
- assert CatBean.bean.isGetStereotypesCalled();
+ assert IntegerBean.bean.isGetStereotypesCalled();
}
@Test
@SpecAssertion(section = "5.1.1", id = "k")
public void testIsPolicyCalled()
{
- assert CatBean.bean.isPolicyCalled();
+ assert IntegerBean.bean.isAlternativeCalled();
}
@Test
@SpecAssertion(section = "5.2", id = "na")
public void testGetTypesCalled()
{
- assert CatBean.bean.isGetTypesCalled();
+ assert IntegerBean.bean.isGetTypesCalled();
}
@Test
@SpecAssertion(section = "5.2", id = "nb")
public void testGetBindingsCalled()
{
- assert CatBean.bean.isGetBindingsCalled();
+ assert IntegerBean.bean.isGetQualifiersCalled();
}
@Test
@SpecAssertion(section = "5.2.1", id = "b")
public void testGetInjectionPointsCalled()
{
- assert CatBean.bean.isGetInjectionPointsCalled();
+ assert IntegerBean.bean.isGetInjectionPointsCalled();
}
- @Test(groups = { "ri-broken" })
+ @Test
@SpecAssertion(section = "5.2.4", id = "ba")
- // WBRI-328
public void testIsNullableCalled()
{
- assert CatBean.bean.isNullableCalled();
+ assert IntegerBean.bean.isNullableCalled();
}
@Test
@SpecAssertion(section = "5.3", id = "e")
public void testGetNameCalled()
{
- assert CatBean.bean.isGetNameCalled();
+ assert IntegerBean.bean.isGetNameCalled();
}
@Test
@SpecAssertion(section = "6.5.2", id = "e")
public void testGetScopeTypeCalled()
{
- assert CatBean.bean.isGetScopeTypeCalled();
+ assert IntegerBean.bean.isGetScopeCalled();
}
}
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/House.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/House.java 2009-12-16 15:57:52 UTC (rev 5307)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/House.java 2009-12-16 15:59:30 UTC (rev 5308)
@@ -5,5 +5,5 @@
class House
{
@SuppressWarnings("unused")
- @Inject private Cat cat;
+ @Inject private int one;
}
Added: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/IntegerBean.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/IntegerBean.java (rev 0)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/IntegerBean.java 2009-12-16 15:59:30 UTC (rev 5308)
@@ -0,0 +1,162 @@
+package org.jboss.jsr299.tck.tests.definition.bean.custom;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.enterprise.context.Dependent;
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.AfterBeanDiscovery;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.Extension;
+import javax.enterprise.inject.spi.InjectionPoint;
+
+import org.jboss.jsr299.tck.literals.DefaultLiteral;
+
+public class IntegerBean implements Bean<Integer>, Extension
+{
+
+ public static final IntegerBean bean = new IntegerBean();
+
+ private boolean getQualifiersCalled = false;
+ private boolean getInjectionPointsCalled = false;
+ private boolean getNameCalled = false;
+ private boolean getScopeCalled = false;
+ private boolean getTypesCalled = false;
+ private boolean isAlternativeCalled = false;
+ private boolean isSerializableCalled = false;
+ private boolean isNullableCalled = false;
+ private boolean isGetBeanClassCalled = false;
+ private boolean getStereotypesCalled = false;
+
+ public Class<?> getBeanClass()
+ {
+ isGetBeanClassCalled = true;
+ return Integer.class;
+ }
+
+ public Set<InjectionPoint> getInjectionPoints()
+ {
+ getInjectionPointsCalled = true;
+ return Collections.emptySet();
+ }
+
+ public String getName()
+ {
+ getNameCalled = true;
+ return "one";
+ }
+
+ @SuppressWarnings("serial")
+ public Set<Annotation> getQualifiers()
+ {
+ getQualifiersCalled = true;
+ return new HashSet<Annotation>() {
+ {
+ add(new DefaultLiteral());
+ }
+ };
+ }
+
+ public Class<? extends Annotation> getScope()
+ {
+ getScopeCalled = true;
+ return Dependent.class;
+ }
+
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ getStereotypesCalled = true;
+ return Collections.emptySet();
+ }
+
+ public Set<Type> getTypes()
+ {
+ HashSet<Type> types = new HashSet<Type>();
+ types.add(Object.class);
+ types.add(Number.class);
+ types.add(Integer.class);
+
+ getTypesCalled = true;
+ return types;
+ }
+
+ public boolean isAlternative()
+ {
+ isAlternativeCalled = true;
+ return false;
+ }
+
+ public boolean isNullable()
+ {
+ isNullableCalled = true;
+ return false;
+ }
+
+ public Integer create(CreationalContext<Integer> creationalContext)
+ {
+ return new Integer(1);
+ }
+
+ public void destroy(Integer instance, CreationalContext<Integer> creationalContext)
+ {
+ creationalContext.release();
+ }
+
+ public boolean isGetQualifiersCalled()
+ {
+ return getQualifiersCalled;
+ }
+
+ public boolean isGetInjectionPointsCalled()
+ {
+ return getInjectionPointsCalled;
+ }
+
+ public boolean isGetNameCalled()
+ {
+ return getNameCalled;
+ }
+
+ public boolean isGetScopeCalled()
+ {
+ return getScopeCalled;
+ }
+
+ public boolean isGetTypesCalled()
+ {
+ return getTypesCalled;
+ }
+
+ public boolean isAlternativeCalled()
+ {
+ return isAlternativeCalled;
+ }
+
+ public boolean isSerializableCalled()
+ {
+ return isSerializableCalled;
+ }
+
+ public boolean isNullableCalled()
+ {
+ return isNullableCalled;
+ }
+
+ public boolean isGetBeanClassCalled()
+ {
+ return isGetBeanClassCalled;
+ }
+
+ public boolean isGetStereotypesCalled()
+ {
+ return getStereotypesCalled;
+ }
+
+ public void afterDiscovery(@Observes AfterBeanDiscovery event) {
+ event.addBean(bean);
+ }
+}
Added: cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/beans.xml
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/beans.xml (rev 0)
+++ cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/beans.xml 2009-12-16 15:59:30 UTC (rev 5308)
@@ -0,0 +1,5 @@
+<beans>
+ <alternatives>
+ <stereotype>org.jboss.jsr299.tck.tests.definition.bean.custom.AlternativeStereotype</stereotype>
+ </alternatives>
+</beans>
Modified: cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/javax.enterprise.inject.spi.Extension
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/javax.enterprise.inject.spi.Extension 2009-12-16 15:57:52 UTC (rev 5307)
+++ cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/javax.enterprise.inject.spi.Extension 2009-12-16 15:59:30 UTC (rev 5308)
@@ -1 +1 @@
-org.jboss.jsr299.tck.tests.definition.bean.custom.CatBean
\ No newline at end of file
+org.jboss.jsr299.tck.tests.definition.bean.custom.IntegerBean
\ No newline at end of file
14 years, 11 months
Weld SVN: r5307 - in cdi-tck/trunk/impl/src/main: resources/org/jboss/jsr299/tck/tests/definition/bean/custom and 1 other directory.
by weld-commits@lists.jboss.org
Author: jharting
Date: 2009-12-16 10:57:52 -0500 (Wed, 16 Dec 2009)
New Revision: 5307
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/AlternativeStereotype.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/IntegerBean.java
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/beans.xml
Removed:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/Cat.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CatBean.java
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/House.java
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/javax.enterprise.inject.spi.Extension
Log:
CDITCK-57
Added: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/AlternativeStereotype.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/AlternativeStereotype.java (rev 0)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/AlternativeStereotype.java 2009-12-16 15:57:52 UTC (rev 5307)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.definition.bean.custom;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import javax.enterprise.inject.Alternative;
+import javax.enterprise.inject.Stereotype;
+
+@Alternative
+@Stereotype
+@Target(TYPE)
+@Retention(RUNTIME)
+@interface AlternativeStereotype
+{
+}
Deleted: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/Cat.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/Cat.java 2009-12-16 14:06:05 UTC (rev 5306)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/Cat.java 2009-12-16 15:57:52 UTC (rev 5307)
@@ -1,13 +0,0 @@
-package org.jboss.jsr299.tck.tests.definition.bean.custom;
-
-class Cat
-{
-
- @SuppressWarnings("unused")
- private String name;
-
- public Cat(String name)
- {
- this.name = name;
- }
-}
Deleted: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CatBean.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CatBean.java 2009-12-16 14:06:05 UTC (rev 5306)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CatBean.java 2009-12-16 15:57:52 UTC (rev 5307)
@@ -1,163 +0,0 @@
-package org.jboss.jsr299.tck.tests.definition.bean.custom;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.context.Dependent;
-import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.Extension;
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.jboss.jsr299.tck.literals.DefaultLiteral;
-
-public class CatBean implements Bean<Cat>, Extension
-{
- public static final CatBean bean = new CatBean();
-
- private boolean getBindingsCalled = false;
- private boolean getInjectionPointsCalled = false;
- private boolean getNameCalled = false;
- private boolean getScopeTypeCalled = false;
- private boolean getTypesCalled = false;
- private boolean isPolicyCalled = false;
- private boolean isSerializableCalled = false;
- private boolean isNullableCalled = false;
- private boolean isGetBeanClassCalled = false;
- private boolean getStereotypesCalled = false;
-
-
- @SuppressWarnings("serial")
- public Set<Annotation> getQualifiers()
- {
- getBindingsCalled = true;
- return new HashSet<Annotation>(){{ add(new DefaultLiteral());}};
- }
-
- public Set<InjectionPoint> getInjectionPoints()
- {
- getInjectionPointsCalled = true;
- return new HashSet<InjectionPoint>();
- }
-
- public String getName()
- {
- getNameCalled = true;
- return "cat";
- }
-
- public Set<Class<? extends Annotation>> getStereotypes() {
- getStereotypesCalled = true;
- return new HashSet<Class<? extends Annotation>>();
- }
-
- public Class<? extends Annotation> getScope()
- {
- getScopeTypeCalled = true;
- return Dependent.class;
- }
-
- @SuppressWarnings("serial")
- public Set<Type> getTypes()
- {
- getTypesCalled = true;
- return new HashSet<Type>() {{ add(Cat.class); add(Object.class); }};
- }
-
- public boolean isNullable()
- {
- isNullableCalled = true;
- return false;
- }
-
- public boolean isSerializable()
- {
- isSerializableCalled = true;
- return false;
- }
-
- public Class<?> getBeanClass()
- {
- isGetBeanClassCalled = true;
- return Cat.class;
- }
-
- public boolean isAlternative()
- {
- isPolicyCalled = true;
- return false;
- }
-
- public Cat create(CreationalContext<Cat> creationalContext)
- {
- return new Cat("kitty");
- }
-
- public void destroy(Cat instance, CreationalContext<Cat> creationalContext)
- {
- creationalContext.release();
- }
-
- public boolean isGetBindingsCalled()
- {
- return getBindingsCalled;
- }
-
- public boolean isGetInjectionPointsCalled()
- {
- return getInjectionPointsCalled;
- }
-
- public boolean isGetNameCalled()
- {
- return getNameCalled;
- }
-
- public boolean isGetScopeTypeCalled()
- {
- return getScopeTypeCalled;
- }
-
- public boolean isGetTypesCalled()
- {
- return getTypesCalled;
- }
-
- public boolean isPolicyCalled()
- {
- return isPolicyCalled;
- }
-
- public boolean isSerializableCalled()
- {
- return isSerializableCalled;
- }
-
- public boolean isNullableCalled()
- {
- return isNullableCalled;
- }
-
- public static CatBean getBean()
- {
- return bean;
- }
-
- public boolean isGetBeanClassCalled()
- {
- return isGetBeanClassCalled;
- }
-
- public boolean isGetStereotypesCalled()
- {
- return getStereotypesCalled;
- }
-
- public void afterDiscovery(@Observes AfterBeanDiscovery event) {
- event.addBean(bean);
- }
-}
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java 2009-12-16 14:06:05 UTC (rev 5306)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java 2009-12-16 15:57:52 UTC (rev 5307)
@@ -42,7 +42,7 @@
})
public void testGetBeanClassCalled()
{
- assert CatBean.bean.isGetBeanClassCalled();
+ assert IntegerBean.bean.isGetBeanClassCalled();
}
@Test(groups = { "ri-broken" })
@@ -50,56 +50,55 @@
// WBRI-328
public void testGetStereotypesCalled()
{
- assert CatBean.bean.isGetStereotypesCalled();
+ assert IntegerBean.bean.isGetStereotypesCalled();
}
@Test
@SpecAssertion(section = "5.1.1", id = "k")
public void testIsPolicyCalled()
{
- assert CatBean.bean.isPolicyCalled();
+ assert IntegerBean.bean.isAlternativeCalled();
}
@Test
@SpecAssertion(section = "5.2", id = "na")
public void testGetTypesCalled()
{
- assert CatBean.bean.isGetTypesCalled();
+ assert IntegerBean.bean.isGetTypesCalled();
}
@Test
@SpecAssertion(section = "5.2", id = "nb")
public void testGetBindingsCalled()
{
- assert CatBean.bean.isGetBindingsCalled();
+ assert IntegerBean.bean.isGetQualifiersCalled();
}
@Test
@SpecAssertion(section = "5.2.1", id = "b")
public void testGetInjectionPointsCalled()
{
- assert CatBean.bean.isGetInjectionPointsCalled();
+ assert IntegerBean.bean.isGetInjectionPointsCalled();
}
- @Test(groups = { "ri-broken" })
+ @Test
@SpecAssertion(section = "5.2.4", id = "ba")
- // WBRI-328
public void testIsNullableCalled()
{
- assert CatBean.bean.isNullableCalled();
+ assert IntegerBean.bean.isNullableCalled();
}
@Test
@SpecAssertion(section = "5.3", id = "e")
public void testGetNameCalled()
{
- assert CatBean.bean.isGetNameCalled();
+ assert IntegerBean.bean.isGetNameCalled();
}
@Test
@SpecAssertion(section = "6.5.2", id = "e")
public void testGetScopeTypeCalled()
{
- assert CatBean.bean.isGetScopeTypeCalled();
+ assert IntegerBean.bean.isGetScopeCalled();
}
}
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/House.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/House.java 2009-12-16 14:06:05 UTC (rev 5306)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/House.java 2009-12-16 15:57:52 UTC (rev 5307)
@@ -5,5 +5,5 @@
class House
{
@SuppressWarnings("unused")
- @Inject private Cat cat;
+ @Inject private int one;
}
Added: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/IntegerBean.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/IntegerBean.java (rev 0)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/IntegerBean.java 2009-12-16 15:57:52 UTC (rev 5307)
@@ -0,0 +1,162 @@
+package org.jboss.jsr299.tck.tests.definition.bean.custom;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.enterprise.context.Dependent;
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.AfterBeanDiscovery;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.Extension;
+import javax.enterprise.inject.spi.InjectionPoint;
+
+import org.jboss.jsr299.tck.literals.DefaultLiteral;
+
+public class IntegerBean implements Bean<Integer>, Extension
+{
+
+ public static final IntegerBean bean = new IntegerBean();
+
+ private boolean getQualifiersCalled = false;
+ private boolean getInjectionPointsCalled = false;
+ private boolean getNameCalled = false;
+ private boolean getScopeCalled = false;
+ private boolean getTypesCalled = false;
+ private boolean isAlternativeCalled = false;
+ private boolean isSerializableCalled = false;
+ private boolean isNullableCalled = false;
+ private boolean isGetBeanClassCalled = false;
+ private boolean getStereotypesCalled = false;
+
+ public Class<?> getBeanClass()
+ {
+ isGetBeanClassCalled = true;
+ return Integer.class;
+ }
+
+ public Set<InjectionPoint> getInjectionPoints()
+ {
+ getInjectionPointsCalled = true;
+ return Collections.emptySet();
+ }
+
+ public String getName()
+ {
+ getNameCalled = true;
+ return "one";
+ }
+
+ @SuppressWarnings("serial")
+ public Set<Annotation> getQualifiers()
+ {
+ getQualifiersCalled = true;
+ return new HashSet<Annotation>() {
+ {
+ add(new DefaultLiteral());
+ }
+ };
+ }
+
+ public Class<? extends Annotation> getScope()
+ {
+ getScopeCalled = true;
+ return Dependent.class;
+ }
+
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ getStereotypesCalled = true;
+ return Collections.emptySet();
+ }
+
+ public Set<Type> getTypes()
+ {
+ HashSet<Type> types = new HashSet<Type>();
+ types.add(Object.class);
+ types.add(Number.class);
+ types.add(Integer.class);
+
+ getTypesCalled = true;
+ return types;
+ }
+
+ public boolean isAlternative()
+ {
+ isAlternativeCalled = true;
+ return false;
+ }
+
+ public boolean isNullable()
+ {
+ isNullableCalled = true;
+ return false;
+ }
+
+ public Integer create(CreationalContext<Integer> creationalContext)
+ {
+ return new Integer(1);
+ }
+
+ public void destroy(Integer instance, CreationalContext<Integer> creationalContext)
+ {
+ creationalContext.release();
+ }
+
+ public boolean isGetQualifiersCalled()
+ {
+ return getQualifiersCalled;
+ }
+
+ public boolean isGetInjectionPointsCalled()
+ {
+ return getInjectionPointsCalled;
+ }
+
+ public boolean isGetNameCalled()
+ {
+ return getNameCalled;
+ }
+
+ public boolean isGetScopeCalled()
+ {
+ return getScopeCalled;
+ }
+
+ public boolean isGetTypesCalled()
+ {
+ return getTypesCalled;
+ }
+
+ public boolean isAlternativeCalled()
+ {
+ return isAlternativeCalled;
+ }
+
+ public boolean isSerializableCalled()
+ {
+ return isSerializableCalled;
+ }
+
+ public boolean isNullableCalled()
+ {
+ return isNullableCalled;
+ }
+
+ public boolean isGetBeanClassCalled()
+ {
+ return isGetBeanClassCalled;
+ }
+
+ public boolean isGetStereotypesCalled()
+ {
+ return getStereotypesCalled;
+ }
+
+ public void afterDiscovery(@Observes AfterBeanDiscovery event) {
+ event.addBean(bean);
+ }
+}
Added: cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/beans.xml
===================================================================
--- cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/beans.xml (rev 0)
+++ cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/beans.xml 2009-12-16 15:57:52 UTC (rev 5307)
@@ -0,0 +1,5 @@
+<beans>
+ <alternatives>
+ <stereotype>org.jboss.jsr299.tck.tests.definition.bean.custom.AlternativeStereotype</stereotype>
+ </alternatives>
+</beans>
Modified: cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/javax.enterprise.inject.spi.Extension
===================================================================
--- cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/javax.enterprise.inject.spi.Extension 2009-12-16 14:06:05 UTC (rev 5306)
+++ cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/bean/custom/javax.enterprise.inject.spi.Extension 2009-12-16 15:57:52 UTC (rev 5307)
@@ -1 +1 @@
-org.jboss.jsr299.tck.tests.definition.bean.custom.CatBean
\ No newline at end of file
+org.jboss.jsr299.tck.tests.definition.bean.custom.IntegerBean
\ No newline at end of file
14 years, 11 months
Weld SVN: r5306 - cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating.
by weld-commits@lists.jboss.org
Author: jharting
Date: 2009-12-16 09:06:05 -0500 (Wed, 16 Dec 2009)
New Revision: 5306
Modified:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/KokkolaInterceptor.java
Log:
CDITCK-82
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/KokkolaInterceptor.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/KokkolaInterceptor.java 2009-12-16 14:05:03 UTC (rev 5305)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/KokkolaInterceptor.java 2009-12-16 14:06:05 UTC (rev 5306)
@@ -9,7 +9,7 @@
public class KokkolaInterceptor implements Serializable
{
@AroundInvoke
- public Object intercept(InvocationContext context)
+ public Object intercept(InvocationContext context) throws Exception
{
// do nothing
return null;
14 years, 11 months
Weld SVN: r5305 - cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating.
by weld-commits@lists.jboss.org
Author: jharting
Date: 2009-12-16 09:05:03 -0500 (Wed, 16 Dec 2009)
New Revision: 5305
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/KokkolaInterceptor.java
Log:
CDITCK-82
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/KokkolaInterceptor.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/KokkolaInterceptor.java 2009-12-16 12:51:24 UTC (rev 5304)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/KokkolaInterceptor.java 2009-12-16 14:05:03 UTC (rev 5305)
@@ -9,7 +9,7 @@
public class KokkolaInterceptor implements Serializable
{
@AroundInvoke
- public Object intercept(InvocationContext context)
+ public Object intercept(InvocationContext context) throws Exception
{
// do nothing
return null;
14 years, 11 months
Weld SVN: r5304 - cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual.
by weld-commits@lists.jboss.org
Author: jharting
Date: 2009-12-16 07:51:24 -0500 (Wed, 16 Dec 2009)
New Revision: 5304
Modified:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/Farm.java
Log:
CDITCK-70 fixed tests for ProcessAnnotatedType events.
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java 2009-12-16 12:48:27 UTC (rev 5303)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java 2009-12-16 12:51:24 UTC (rev 5304)
@@ -19,6 +19,8 @@
import java.util.EventListener;
import javax.enterprise.inject.Any;
+import javax.enterprise.inject.spi.AnnotatedField;
+import javax.enterprise.inject.spi.AnnotatedMethod;
import javax.enterprise.inject.spi.AnnotatedType;
import javax.inject.Inject;
import javax.servlet.Filter;
@@ -72,7 +74,7 @@
validateServletListenerAnnotatedType(ProcessInjectionTargetObserver.getListenerEvent().getAnnotatedType());
}
- @Test(groups = "jboss-as-broken")
+ @Test
@SpecAssertions({
@SpecAssertion(section = "11.5.6", id = "aad"),
@SpecAssertion(section = "11.5.6", id = "abd"),
@@ -119,9 +121,8 @@
validateFilterAnnotatedType(ProcessInjectionTargetObserver.getFilterEvent().getAnnotatedType());
}
- @Test(groups = "jboss-as-broken")
+ @Test
@SpecAssertion(section = "12.3", id = "dd")
- // WELDINT-22
public void testProcessInjectionTargetEventFiredForJsfManagedBean()
{
assert ProcessInjectionTargetObserver.getJsfManagedBeanEvent() != null;
@@ -144,24 +145,22 @@
assert !ProcessInjectionTargetObserver.isListenerSuperTypeObserved();
}
- @Test(groups = "jboss-as-broken")
+ @Test
@SpecAssertion(section = "12.3", id = "be")
- // WELDINT-23
public void testProcessAnnotatedTypeEventFiredForServletListener() {
assert ProcessAnnotatedTypeObserver.getListenerEvent() != null;
validateServletListenerAnnotatedType(ProcessAnnotatedTypeObserver.getListenerEvent().getAnnotatedType());
}
- @Test(groups = "jboss-as-broken")
+ @Test
@SpecAssertion(section = "12.3", id = "bf")
public void testProcessAnnotatedTypeEventFiredForTagHandler() {
assert ProcessAnnotatedTypeObserver.getTagHandlerEvent() != null;
validateTagHandlerAnnotatedType(ProcessAnnotatedTypeObserver.getTagHandlerEvent().getAnnotatedType());
}
- @Test(groups = "jboss-as-broken")
+ @Test
@SpecAssertion(section = "12.3", id = "bg")
- // WELDINT-23
public void testProcessAnnotatedTypeEventFiredForTagLibraryListener() {
assert ProcessAnnotatedTypeObserver.getTagLibraryListenerEvent() != null;
validateTagLibraryListenerAnnotatedType(ProcessAnnotatedTypeObserver.getTagLibraryListenerEvent().getAnnotatedType());
@@ -174,17 +173,15 @@
validateServletAnnotatedType(ProcessAnnotatedTypeObserver.getServletEvent().getAnnotatedType());
}
- @Test(groups = "jboss-as-broken")
+ @Test
@SpecAssertion(section = "12.3", id = "bk")
- // WELDINT-23
public void testProcessAnnotatedTypeEventFiredForFilter() {
assert ProcessAnnotatedTypeObserver.getFilterEvent() != null;
validateFilterAnnotatedType(ProcessAnnotatedTypeObserver.getFilterEvent().getAnnotatedType());
}
- @Test(groups = "jboss-as-broken")
+ @Test
@SpecAssertion(section = "12.3", id = "bd")
- // WELDINT-23
public void testProcessAnnotatedTypeEventFiredForJsfManagedBean() {
assert ProcessAnnotatedTypeObserver.getJsfManagedBeanEvent() != null;
validateJsfManagedBeanAnnotatedType(ProcessAnnotatedTypeObserver.getJsfManagedBeanEvent().getAnnotatedType());
@@ -193,9 +190,19 @@
private void validateServletListenerAnnotatedType(AnnotatedType<TestListener> type) {
assert type.getBaseType().equals(TestListener.class);
assert type.getAnnotations().isEmpty();
- assert type.getMethods().size() == 2;
- assert type.getFields().iterator().next().isAnnotationPresent(Inject.class);
- assert type.getAnnotations().isEmpty();
+ assert type.getFields().size() == 2;
+ assert type.getMethods().size() == 3;
+
+ int initializers = 0;
+ for (AnnotatedMethod<?> method : type.getMethods()) {
+ assert method.getParameters().size() == 1;
+ assert method.getBaseType().equals(void.class);
+ if (method.isAnnotationPresent(Inject.class))
+ {
+ initializers++;
+ }
+ }
+ assert initializers == 1;
}
private void validateTagHandlerAnnotatedType(AnnotatedType<TestTagHandler> type) {
@@ -208,10 +215,9 @@
private void validateTagLibraryListenerAnnotatedType(AnnotatedType<TagLibraryListener> type) {
assert type.getBaseType().equals(TagLibraryListener.class);
assert rawTypeSetMatches(type.getTypeClosure(), TagLibraryListener.class, ServletContextListener.class, EventListener.class, Object.class);
- assert type.getFields().size() == 1;
- assert type.getFields().iterator().next().getJavaMember().getName().equals("sheep");
+ assert type.getFields().size() == 2;
assert type.getConstructors().size() == 1;
- assert type.getMethods().size() == 2;
+ assert type.getMethods().size() == 3;
}
private void validateServletAnnotatedType(AnnotatedType<TestServlet> type) {
@@ -223,17 +229,32 @@
private void validateFilterAnnotatedType(AnnotatedType<TestFilter> type) {
assert type.getBaseType().equals(TestFilter.class);
assert rawTypeSetMatches(type.getTypeClosure(), TestFilter.class, Filter.class, Object.class);
- assert type.getFields().size() == 2;
+ assert type.getFields().size() == 4;
assert type.getConstructors().size() == 1;
assert type.getConstructors().iterator().next().getParameters().isEmpty();
- assert type.getMethods().size() == 3;
+ assert type.getMethods().size() == 4;
}
- private void validateJsfManagedBeanAnnotatedType(AnnotatedType<Farm> type) {
- assert type.getFields().size() == 1;
- assert type.getFields().iterator().next().getJavaMember().getName().equals("sheep");
- assert type.getFields().iterator().next().isAnnotationPresent(Inject.class);
- assert type.getMethods().size() == 1;
- assert type.getMethods().iterator().next().getBaseType().equals(boolean.class);
+ private void validateJsfManagedBeanAnnotatedType(AnnotatedType<Farm> type)
+ {
+ assert type.getFields().size() == 2;
+ for (AnnotatedField<?> field : type.getFields())
+ {
+ if (field.getJavaMember().getName().equals("sheep"))
+ {
+ assert field.isAnnotationPresent(Inject.class);
+ assert !field.isStatic();
+ }
+ else if (field.getJavaMember().getName().equals("initializerCalled"))
+ {
+ assert !field.isStatic();
+ assert field.getBaseType().equals(boolean.class);
+ }
+ else
+ {
+ assert false; // there is no other field
+ }
+ }
+ assert type.getMethods().size() == 3;
}
}
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/Farm.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/Farm.java 2009-12-16 12:48:27 UTC (rev 5303)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/Farm.java 2009-12-16 12:51:24 UTC (rev 5304)
@@ -18,24 +18,25 @@
import javax.inject.Inject;
-
public class Farm
{
@Inject
private Sheep sheep;
private boolean initializerCalled = false;
-
+
@Inject
- public void initialize(Sheep sheep) {
+ public void initialize(Sheep sheep)
+ {
initializerCalled = sheep != null;
}
-
+
public boolean isInitializerCalled()
{
return initializerCalled;
}
- public boolean isSheepInjected() {
+ public boolean isSheepInjected()
+ {
return sheep != null;
}
}
14 years, 11 months