Weld SVN: r5303 - cdi-tck/trunk/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:48:27 -0500 (Wed, 16 Dec 2009)
New Revision: 5303
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java
cdi-tck/trunk/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/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java 2009-12-15 17:23:49 UTC (rev 5302)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java 2009-12-16 12:48:27 UTC (rev 5303)
@@ -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/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/Farm.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/Farm.java 2009-12-15 17:23:49 UTC (rev 5302)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/Farm.java 2009-12-16 12:48:27 UTC (rev 5303)
@@ -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;
}
}
15 years, 9 months
Weld SVN: r5302 - examples/trunk/jsf/numberguess.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-12-15 12:23:49 -0500 (Tue, 15 Dec 2009)
New Revision: 5302
Modified:
examples/trunk/jsf/numberguess/readme.txt
Log:
minor
Modified: examples/trunk/jsf/numberguess/readme.txt
===================================================================
--- examples/trunk/jsf/numberguess/readme.txt 2009-12-15 17:23:04 UTC (rev 5301)
+++ examples/trunk/jsf/numberguess/readme.txt 2009-12-15 17:23:49 UTC (rev 5302)
@@ -25,7 +25,7 @@
Make sure you have assigned the path of your JBoss AS installation to the
jboss.home property key in the following file, relative to this directory:
-../../local.build.properties
+../../build.properties
(This file is located in the examples directory of the Weld distribution).
15 years, 9 months
Weld SVN: r5301 - build/trunk/dist.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-12-15 12:23:04 -0500 (Tue, 15 Dec 2009)
New Revision: 5301
Modified:
build/trunk/dist/readme.txt
Log:
minor
Modified: build/trunk/dist/readme.txt
===================================================================
--- build/trunk/dist/readme.txt 2009-12-15 15:01:42 UTC (rev 5300)
+++ build/trunk/dist/readme.txt 2009-12-15 17:23:04 UTC (rev 5301)
@@ -11,7 +11,7 @@
Status
=======
- This is a preproduction release of Weld.
+ This is feature complete release of the CDI specification.
System requirements
===================
15 years, 9 months
Weld SVN: r5300 - build/trunk/dist-tck.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-12-15 10:01:42 -0500 (Tue, 15 Dec 2009)
New Revision: 5300
Modified:
build/trunk/dist-tck/assembly.xml
Log:
CDITCK-50
Modified: build/trunk/dist-tck/assembly.xml
===================================================================
--- build/trunk/dist-tck/assembly.xml 2009-12-15 14:51:32 UTC (rev 5299)
+++ build/trunk/dist-tck/assembly.xml 2009-12-15 15:01:42 UTC (rev 5300)
@@ -59,6 +59,11 @@
<include>org.jboss.jsr299.tck:jsr299-tck-reference-guide</include>
</includes>
<unpack>true</unpack>
+ <unpackOptions>
+ <excludes>
+ <exclude>META-INF/</exclude>
+ </excludes>
+ </unpackOptions>
<outputDirectory>doc</outputDirectory>
<useProjectArtifact>false</useProjectArtifact>
</dependencySet>
15 years, 9 months
Weld SVN: r5299 - build/trunk/dist-tck/porting-package.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-12-15 09:51:32 -0500 (Tue, 15 Dec 2009)
New Revision: 5299
Modified:
build/trunk/dist-tck/porting-package/pom.xml
Log:
CDITCK-72
Modified: build/trunk/dist-tck/porting-package/pom.xml
===================================================================
--- build/trunk/dist-tck/porting-package/pom.xml 2009-12-15 14:44:06 UTC (rev 5298)
+++ build/trunk/dist-tck/porting-package/pom.xml 2009-12-15 14:51:32 UTC (rev 5299)
@@ -32,6 +32,32 @@
<scope>compile</scope>
<type>test-jar</type>
</dependency>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-jboss-tck-runner</artifactId>
+ <version>${weld.version}</version>
+ <optional>true</optional>
+ <scope>compile</scope>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-inject-tck-runner</artifactId>
+ <version>${weld.version}</version>
+ <optional>true</optional>
+ <scope>compile</scope>
+ <type>test-jar</type>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-porting-package</artifactId>
+ <version>${weld.version}</version>
+ <optional>true</optional>
+ <scope>compile</scope>
+ <type>test-jar</type>
+ <classifier>sources</classifier>
+ </dependency>
</dependencies>
<build>
15 years, 9 months
Weld SVN: r5298 - cdi-tck/branches/1.0/doc/reference/en-US.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-12-15 09:44:06 -0500 (Tue, 15 Dec 2009)
New Revision: 5298
Modified:
cdi-tck/branches/1.0/doc/reference/en-US/Author_Group.xml
cdi-tck/branches/1.0/doc/reference/en-US/installation.xml
cdi-tck/branches/1.0/doc/reference/en-US/introduction.xml
cdi-tck/branches/1.0/doc/reference/en-US/reporting.xml
Log:
CDITCK-39, CDITCK-48, CDITCK-54, CDITCK-55
Modified: cdi-tck/branches/1.0/doc/reference/en-US/Author_Group.xml
===================================================================
--- cdi-tck/branches/1.0/doc/reference/en-US/Author_Group.xml 2009-12-15 14:28:09 UTC (rev 5297)
+++ cdi-tck/branches/1.0/doc/reference/en-US/Author_Group.xml 2009-12-15 14:44:06 UTC (rev 5298)
@@ -6,24 +6,22 @@
<surname>King</surname>
<affiliation>
<jobtitle>JSR-299: Contexts and Dependency Injection (CDI) for Java EE
- specification lead</jobtitle>
- <orgname>Red Hat Inc.</orgname>
+ specification lead (Red Hat, Inc.)</jobtitle>
+ <shortaffil></shortaffil>
</affiliation>
</author>
<author>
<firstname>Pete</firstname>
<surname>Muir</surname>
<affiliation>
- <jobtitle>CDI TCK lead</jobtitle>
- <orgname>Red Hat Inc.</orgname>
+ <jobtitle>CDI TCK lead (Red Hat, Inc.)</jobtitle>
</affiliation>
</author>
<author>
<firstname>Dan</firstname>
<surname>Allen</surname>
<affiliation>
- <jobtitle>CDI TCK developer</jobtitle>
- <orgname>Red Hat Inc.</orgname>
+ <jobtitle>CDI TCK developer (Red Hat, Inc.)</jobtitle>
</affiliation>
</author>
<!--
Modified: cdi-tck/branches/1.0/doc/reference/en-US/installation.xml
===================================================================
--- cdi-tck/branches/1.0/doc/reference/en-US/installation.xml 2009-12-15 14:28:09 UTC (rev 5297)
+++ cdi-tck/branches/1.0/doc/reference/en-US/installation.xml 2009-12-15 14:44:06 UTC (rev 5298)
@@ -115,21 +115,19 @@
</title>
<para>
- Weld is built as a modular library, and as such can be
- retro-fitted to Java EE 5 products as required. JBoss AS 5.2 and
+ JBoss AS 6.0.0 M1 and
above releases bundle Weld. To run the TCK with JBoss AS, you must
- use JBoss AS 5.2 or above.
+ use JBoss AS 6.0.0.M1 or above.
</para>
<para>
- To install JBoss AS 5.2 and update to the latest
- release:
+ To install JBoss AS 6:
</para>
<itemizedlist>
<listitem>
<para>
- First, you should download JBoss AS 5.2 from the JBoss AS
+ First, you should download JBoss AS 6 from the JBoss AS
<ulink url="http://jboss.org/jbossas/downloads">project page</ulink>.
</para>
</listitem>
@@ -157,15 +155,15 @@
</itemizedlist>
<para>
- The CDI TCK includes a TCK runner that executes the TCK using Web
- Beans as the CDI implementation and JBoss AS as the Java EE runtime.
+ The CDI TCK includes a TCK runner that executes the TCK using Weld
+ as the CDI implementation and JBoss AS as the Java EE runtime.
To run the tck:
</para>
<itemizedlist>
<listitem>
<para>
- You need to install Maven. You can find documention on how to
+ You need to install Maven 2.0.10. You can find documention on how to
install Maven 2 in the
<ulink
url="http://www.sonatype.com/books/maven-book/reference/installation-sect-mave...">Maven: The Definitive Guide</ulink>
Modified: cdi-tck/branches/1.0/doc/reference/en-US/introduction.xml
===================================================================
--- cdi-tck/branches/1.0/doc/reference/en-US/introduction.xml 2009-12-15 14:28:09 UTC (rev 5297)
+++ cdi-tck/branches/1.0/doc/reference/en-US/introduction.xml 2009-12-15 14:44:06 UTC (rev 5298)
@@ -173,7 +173,7 @@
<listitem>
<para>
<emphasis role="bold">JBoss Test Harness</emphasis>
- - The CDI TCK requires version 1.0.0 of the JBoss Test
+ - The CDI TCK requires version 1.1.0-CR3 of the JBoss Test
Harness. The Harness is based on TestNG 5.x
(<ulink url="http://testng.org">http://testng.org</ulink>).
You can read more about the harness in
Modified: cdi-tck/branches/1.0/doc/reference/en-US/reporting.xml
===================================================================
--- cdi-tck/branches/1.0/doc/reference/en-US/reporting.xml 2009-12-15 14:28:09 UTC (rev 5297)
+++ cdi-tck/branches/1.0/doc/reference/en-US/reporting.xml 2009-12-15 14:44:06 UTC (rev 5298)
@@ -73,7 +73,7 @@
so we'll start there.
</para>
<section>
- <title>CDK TCK Assertions</title>
+ <title>CDI TCK Assertions</title>
<para>
The CDI TCK developers have analyzed the JSR-299 specification
document and identified the assertions that are present in each
@@ -377,7 +377,7 @@
<title>Test Results in the TestNG Plugin View</title>
<para>
- Aftering running a test in Eclipse, as described in <xhref
+ After running a test in Eclipse, as described in <xref
linkend="eclipse-standalone"/> and <xref
linkend="eclipse-in-container"/>, the test results are displayed
in the TestNG plugin view, as shown below.
15 years, 9 months
Weld SVN: r5297 - cdi-tck/branches/1.0/doc/reference/en-US.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-12-15 09:28:09 -0500 (Tue, 15 Dec 2009)
New Revision: 5297
Modified:
cdi-tck/branches/1.0/doc/reference/en-US/eclipse-running.xml
cdi-tck/branches/1.0/doc/reference/en-US/installation.xml
Log:
CDITCK-39
Modified: cdi-tck/branches/1.0/doc/reference/en-US/eclipse-running.xml
===================================================================
--- cdi-tck/branches/1.0/doc/reference/en-US/eclipse-running.xml 2009-12-15 13:36:13 UTC (rev 5296)
+++ cdi-tck/branches/1.0/doc/reference/en-US/eclipse-running.xml 2009-12-15 14:28:09 UTC (rev 5297)
@@ -41,7 +41,7 @@
You should also import the Weld projects if you want to debug into
that code, which is covered later.
</para>
- <tip>
+ <note>
<para>
If you choose to use the Maven 2 Eclipse plugin
(<literal>maven-eclipse-plugin</literal>), you should execute the
@@ -51,7 +51,7 @@
mvn clean eclipse:clean eclipse:eclipse -DdownloadSources -DdownloadJavadocs
cd ../weld
mvn clean eclipse:clean eclipse:eclipse -DdownloadSources -DdownloadJavadocs]]></programlisting>
- </tip>
+ </note>
</section>
<section>
<title>Readying the Eclipse workspace</title>
Modified: cdi-tck/branches/1.0/doc/reference/en-US/installation.xml
===================================================================
--- cdi-tck/branches/1.0/doc/reference/en-US/installation.xml 2009-12-15 13:36:13 UTC (rev 5296)
+++ cdi-tck/branches/1.0/doc/reference/en-US/installation.xml 2009-12-15 14:28:09 UTC (rev 5297)
@@ -109,7 +109,7 @@
each test method in the class.
</para>
- <tip id="tck-in-jboss-as">
+ <note id="tck-in-jboss-as">
<title>
Running the TCK against the CDI RI (Weld) and JBoss AS
</title>
@@ -189,7 +189,7 @@
</listitem>
</itemizedlist>
- </tip>
+ </note>
</section>
<section id="eclipse-plugins">
<title>Eclipse Plugins</title>
15 years, 9 months
Weld SVN: r5296 - in cdi-tck/branches/1.0/impl/src/main: java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator and 2 other directories.
by weld-commits@lists.jboss.org
Author: jharting
Date: 2009-12-15 08:36:13 -0500 (Tue, 15 Dec 2009)
New Revision: 5296
Added:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalDecorator.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Animal.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/AnimalDecorator.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotInjectedTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/House.java
Removed:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/CatDecorator.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/CatDecorator.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotResolvedTest.java
Modified:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Animal.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Cat.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Cat.java
cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injectionpoint/beans.xml
cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/beans.xml
Log:
CDITCK-83
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Animal.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Animal.java 2009-12-15 13:23:38 UTC (rev 5295)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Animal.java 2009-12-15 13:36:13 UTC (rev 5296)
@@ -2,5 +2,5 @@
interface Animal
{
-
+ String hello();
}
Added: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalDecorator.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalDecorator.java (rev 0)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalDecorator.java 2009-12-15 13:36:13 UTC (rev 5296)
@@ -0,0 +1,16 @@
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+@Decorator
+class AnimalDecorator implements Animal {
+
+ @Inject @Delegate
+ private Animal bean;
+
+ public String hello() {
+ return bean.hello() + " world!";
+ }
+}
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Cat.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Cat.java 2009-12-15 13:23:38 UTC (rev 5295)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Cat.java 2009-12-15 13:36:13 UTC (rev 5296)
@@ -4,7 +4,7 @@
import javax.enterprise.inject.spi.InjectionPoint;
import javax.inject.Inject;
-class Cat
+class Cat implements Animal
{
@Inject private InjectionPoint injectionPoint;
Deleted: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/CatDecorator.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/CatDecorator.java 2009-12-15 13:23:38 UTC (rev 5295)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/CatDecorator.java 2009-12-15 13:36:13 UTC (rev 5296)
@@ -1,17 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-import javax.inject.Inject;
-
-@Decorator
-class CatDecorator extends Cat
-{
- @Inject @Delegate Cat bean;
-
- @Override
- public String hello()
- {
- return bean.hello() + " world!";
- }
-}
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java 2009-12-15 13:23:38 UTC (rev 5295)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java 2009-12-15 13:36:13 UTC (rev 5296)
@@ -143,7 +143,7 @@
FieldInjectionPointBean beanWithInjectedBean = getInstanceByType(FieldInjectionPointBean.class);
BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert beanWithInjectionPoint.getInjectedMetadata().getAnnotated() instanceof AnnotatedField;
+ assert beanWithInjectionPoint.getInjectedMetadata().getAnnotated() instanceof AnnotatedField<?>;
assert beanWithInjectionPoint.getInjectedMetadata().getAnnotated().isAnnotationPresent(AnimalStereotype.class);
}
@@ -155,7 +155,7 @@
MethodInjectionPointBean beanWithInjectedBean = getInstanceByType(MethodInjectionPointBean.class);
BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert beanWithInjectionPoint.getInjectedMetadata().getAnnotated() instanceof AnnotatedParameter;
+ assert beanWithInjectionPoint.getInjectedMetadata().getAnnotated() instanceof AnnotatedParameter<?>;
assert annotationSetMatches(beanWithInjectionPoint.getInjectedMetadata().getQualifiers(), Default.class);
}
Added: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Animal.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Animal.java (rev 0)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Animal.java 2009-12-15 13:36:13 UTC (rev 5296)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
+
+interface Animal {
+ String hello();
+}
Added: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/AnimalDecorator.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/AnimalDecorator.java (rev 0)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/AnimalDecorator.java 2009-12-15 13:36:13 UTC (rev 5296)
@@ -0,0 +1,16 @@
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+@Decorator
+class AnimalDecorator implements Animal
+{
+ @Inject @Delegate Animal bean;
+
+ public String hello()
+ {
+ return bean.hello() + " world!";
+ }
+}
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Cat.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Cat.java 2009-12-15 13:23:38 UTC (rev 5295)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Cat.java 2009-12-15 13:36:13 UTC (rev 5296)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
-class Cat
+class Cat implements Animal
{
public String hello() {
return "hello";
Deleted: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/CatDecorator.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/CatDecorator.java 2009-12-15 13:23:38 UTC (rev 5295)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/CatDecorator.java 2009-12-15 13:36:13 UTC (rev 5296)
@@ -1,17 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-import javax.inject.Inject;
-
-@Decorator
-class CatDecorator extends Cat
-{
- @Inject @Delegate Cat bean;
-
- @Override
- public String hello()
- {
- return bean.hello() + " world!";
- }
-}
Added: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotInjectedTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotInjectedTest.java (rev 0)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotInjectedTest.java 2009-12-15 13:36:13 UTC (rev 5296)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentFailure;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+@Artifact
+@BeansXml("beans.xml")
+@SpecVersion(spec="cdi", version="20091101")
+(a)ExpectedDeploymentException(DeploymentFailure.class)
+public class DecoratorNotInjectedTest extends AbstractJSR299Test
+{
+
+ @Test(groups = { "injection" })
+ @SpecAssertion(section = "5.1.4", id = "a")
+ public void testDecoratorNotResolved()
+ {
+ assert false;
+ }
+}
Deleted: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotResolvedTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotResolvedTest.java 2009-12-15 13:23:38 UTC (rev 5295)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotResolvedTest.java 2009-12-15 13:36:13 UTC (rev 5296)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
-
-import java.lang.reflect.Type;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.inject.spi.Bean;
-
-import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.test.audit.annotations.SpecAssertion;
-import org.jboss.test.audit.annotations.SpecVersion;
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
-import org.testng.annotations.Test;
-
-@Artifact
-@BeansXml("beans.xml")
-@SpecVersion(spec="cdi", version="20091101")
-public class DecoratorNotResolvedTest extends AbstractJSR299Test
-{
-
- @Test(groups = { "resolution", "rewrite" })
- @SpecAssertion(section = "5.1.4", id = "a")
- // TODO PLM should check injection, not resolution
- public void testDecoratorNotResolved()
- {
- Set<Type> types = new HashSet<Type>();
- for (Bean<Cat> bean : getBeans(Cat.class)) {
- types.addAll(bean.getTypes());
- }
- assert !types.contains(CatDecorator.class);
- assert getInstanceByType(Cat.class) != null;
- }
-}
Added: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/House.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/House.java (rev 0)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/House.java 2009-12-15 13:36:13 UTC (rev 5296)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
+
+import javax.inject.Inject;
+
+class House {
+ @SuppressWarnings("unused")
+ @Inject
+ private AnimalDecorator decorator;
+}
Modified: cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injectionpoint/beans.xml
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injectionpoint/beans.xml 2009-12-15 13:23:38 UTC (rev 5295)
+++ cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injectionpoint/beans.xml 2009-12-15 13:36:13 UTC (rev 5296)
@@ -1,6 +1,6 @@
<beans>
<decorators>
<class>org.jboss.jsr299.tck.tests.lookup.injectionpoint.TimestampLogger</class>
- <class>org.jboss.jsr299.tck.tests.lookup.injectionpoint.CatDecorator</class>
+ <class>org.jboss.jsr299.tck.tests.lookup.injectionpoint.AnimalDecorator</class>
</decorators>
</beans>
Modified: cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/beans.xml
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/beans.xml 2009-12-15 13:23:38 UTC (rev 5295)
+++ cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/beans.xml 2009-12-15 13:36:13 UTC (rev 5296)
@@ -1,5 +1,5 @@
<beans>
<decorators>
- <class>org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator.CatDecorator</class>
+ <class>org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator.AnimalDecorator</class>
</decorators>
</beans>
15 years, 9 months
Weld SVN: r5295 - cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws.
by weld-commits@lists.jboss.org
Author: jharting
Date: 2009-12-15 08:23:38 -0500 (Tue, 15 Dec 2009)
New Revision: 5295
Modified:
cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/web.xml
Log:
CDITCK-76
Modified: cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/web.xml
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/web.xml 2009-12-15 06:39:27 UTC (rev 5294)
+++ cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/web.xml 2009-12-15 13:23:38 UTC (rev 5295)
@@ -3,12 +3,12 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Dependency Injection Test</display-name>
-
- <listener>
- <listener-class>org.jboss.testharness.impl.runner.servlet.HarnessServletListener</listener-class>
- </listener>
+
+ <listener>
+ <listener-class>org.jboss.testharness.impl.runner.servlet.HarnessServletListener</listener-class>
+ </listener>
<servlet>
- <servlet-name>TestWebService</servlet-name>
+ <servlet-name>org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.SheepWSEndPoint</servlet-name>
<servlet-class>org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.SheepWSEndPoint</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
@@ -17,7 +17,7 @@
<servlet-class>org.jboss.testharness.impl.runner.servlet.ServletTestRunner</servlet-class>
</servlet>
<servlet-mapping>
- <servlet-name>TestWebService</servlet-name>
+ <servlet-name>org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.SheepWSEndPoint</servlet-name>
<url-pattern>/TestWebService</url-pattern>
</servlet-mapping>
<servlet-mapping>
15 years, 9 months
Weld SVN: r5294 - in core/trunk: jboss-tck-runner/src/test/resources and 1 other directories.
by weld-commits@lists.jboss.org
Author: marius.bogoevici
Date: 2009-12-15 01:39:27 -0500 (Tue, 15 Dec 2009)
New Revision: 5294
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/Reflections.java
core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml
core/trunk/tests/src/test/java/org/jboss/weld/tests/generic/GenericBeanTest.java
Log:
WELD-339. Generic bean injection fixes + tests enabled in core-test + tests disabled in jboss-tck-runner (must be re-enabled once TCK 1.1.0 is used)
Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/Reflections.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/Reflections.java 2009-12-15 06:07:38 UTC (rev 5293)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/Reflections.java 2009-12-15 06:39:27 UTC (rev 5294)
@@ -699,6 +699,14 @@
return true;
}
}
+ else if (type2 instanceof TypeVariable)
+ {
+ TypeVariable typeVariable = (TypeVariable) type2;
+ if (isTypeBounded(rawType1, actualTypeArguments1, typeVariable.getBounds()))
+ {
+ return true;
+ }
+ }
return false;
}
Modified: core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml
===================================================================
--- core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml 2009-12-15 06:07:38 UTC (rev 5293)
+++ core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml 2009-12-15 06:39:27 UTC (rev 5294)
@@ -13,7 +13,7 @@
<run>
<exclude name="broken" />
<exclude name="ri-broken" />
- <exclude name="jboss-as-broken" />
+ <exclude name="jboss-as-broken" />
</run>
</groups>
<packages>
@@ -27,6 +27,41 @@
<exclude name="testGetTimerMethod" />
</methods>
</class>
+ <!-- T
+ The following tests are broken in TCK 1.0.0 and succeed because of a bug in the 1.0.0 version of the RI
+ The fix for the 1.0.1 version of the RI requires version 1.1.0 of the TCK.
+ The tests must be re-enabled once the 1.1.0 version of the TCK is used.
+ -->
+ <class name="org.jboss.jsr299.tck.tests.implementation.producer.field.definition.ProducerFieldDefinitionTest">
+ <methods>
+ <exclude name="testApiTypeForArrayTypeReturn"/>
+ <exclude name="testApiTypeForClassReturn"/>
+ <exclude name="testApiTypeForInterfaceReturn"/>
+ <exclude name="testApiTypeForPrimitiveReturn"/>
+ <exclude name="testBeanDeclaresMultipleProducerFields"/>
+ <exclude name="testBindingType"/>
+ <exclude name="testDefaultBindingType"/>
+ <exclude name="testDefaultNamedField"/>
+ <exclude name="testNamedField"/>
+ <exclude name="testNonStaticProducerFieldNotIndirectlyInherited"/>
+ <exclude name="testNonStaticProducerFieldNotInherited"/>
+ <exclude name="testParameterizedReturnType"/>
+ <exclude name="testScopeType"/>
+ <exclude name="testStereotype"/>
+ </methods>
+ </class>
+ <class name="org.jboss.jsr299.tck.tests.implementation.producer.method.definition.ProducerMethodDefinitionTest">
+ <methods>
+ <exclude name="testParameterizedReturnType"/>
+ </methods>
+ </class>
+ <class name="org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.ResolutionByTypeTest">
+ <methods>
+ <exclude name="testGenericBeanTypesOnManagedBean"/>
+ <exclude name="testResolveByTypeWithTypeParameter"/>
+ </methods>
+ </class>
+
</classes>
</test>
Modified: core/trunk/tests/src/test/java/org/jboss/weld/tests/generic/GenericBeanTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/generic/GenericBeanTest.java 2009-12-15 06:07:38 UTC (rev 5293)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/generic/GenericBeanTest.java 2009-12-15 06:39:27 UTC (rev 5294)
@@ -28,7 +28,7 @@
public class GenericBeanTest extends AbstractWeldTest
{
- @Test(groups = "broken")
+ @Test
public void testGenericBean()
{
TestBean testBean = getCurrentManager().getInstanceByType(TestBean.class);
15 years, 9 months