Weld SVN: r4151 - in cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests: lookup/typesafe/resolution and 1 other directory.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-10-16 13:31:46 -0400 (Fri, 16 Oct 2009)
New Revision: 4151
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java
Log:
remove stub, readd tests
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java 2009-10-16 17:25:19 UTC (rev 4150)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java 2009-10-16 17:31:46 UTC (rev 4151)
@@ -148,16 +148,6 @@
assert interfaces.contains(NeueStadt.class);
assert interfaces.contains(GeschichtslosStadt.class);
}
-
- @Test(groups = { "enterpriseBeans", "clientProxy", "lifecycle", "integration" })
- @SpecAssertions({
- @SpecAssertion(section = "7.3.3", id = "c")
- })
- public void testDestroyDiscardsSLSB() throws Exception
- {
- // stub for test
- assert false;
- }
@Test(groups = { "enterpriseBeans", "lifecycle", "integration" })
@SpecAssertion(section = "3.9.2", id = "b")
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java 2009-10-16 17:25:19 UTC (rev 4150)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java 2009-10-16 17:31:46 UTC (rev 4151)
@@ -209,4 +209,38 @@
assert getCurrentManager().getBeans("crabSpider").size() == 0;
}
+
+ @Test
+ @SpecAssertion(section = "TBD", id = "TBD")
+ public void testBeanTypesOnManagedBean()
+ {
+ assert getBeans(Canary.class).size() == 1;
+ Set<Bean<Bird>> beans = getBeans(Bird.class);
+ Bean<Canary> bean = getUniqueBean(Canary.class);
+ assert getBeans(Bird.class).isEmpty();
+ assert bean.getTypes().size() == 1;
+ assert bean.getTypes().iterator().next().equals(Canary.class);
+ }
+
+ @Test
+ @SpecAssertion(section = "TBD", id = "TBD")
+ public void testBeanTypesOnProducerMethod()
+ {
+ assert getBeans(Parrot.class).size() == 1;
+ assert getBeans(Bird.class).isEmpty();
+ Bean<Parrot> bean = getUniqueBean(Parrot.class);
+ assert bean.getTypes().size() == 1;
+ assert bean.getTypes().iterator().next().equals(Parrot.class);
+ }
+
+ @Test
+ @SpecAssertion(section = "TBD", id = "TBD")
+ public void testBeanTypesOnProducerField()
+ {
+ assert getBeans(Dove.class).size() == 1;
+ assert getBeans(Bird.class).isEmpty();
+ Bean<Dove> bean = getUniqueBean(Dove.class);
+ assert bean.getTypes().size() == 1;
+ assert bean.getTypes().iterator().next().equals(Dove.class);
+ }
}
15 years, 1 month
Weld SVN: r4150 - cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle.
by weld-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-10-16 13:25:19 -0400 (Fri, 16 Oct 2009)
New Revision: 4150
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/TunaProducer.java
Log:
add producer
Added: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/TunaProducer.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/TunaProducer.java (rev 0)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/TunaProducer.java 2009-10-16 17:25:19 UTC (rev 4150)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.lifecycle;
+
+import javax.enterprise.inject.Produces;
+
+public class TunaProducer {
+
+ @Produces @Tame Tuna createQualifiedTuna() {
+ return new Tuna() {
+ public String getName() {
+ return "qualifiedTuna";
+ }
+ };
+ }
+}
15 years, 1 month
Weld SVN: r4149 - in cdi-tck/trunk: doc/reference/en-US and 1 other directory.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-10-16 12:52:50 -0400 (Fri, 16 Oct 2009)
New Revision: 4149
Modified:
cdi-tck/trunk/dist/readme.txt
cdi-tck/trunk/doc/reference/en-US/configuration.xml
cdi-tck/trunk/doc/reference/en-US/eclipse-running.xml
cdi-tck/trunk/doc/reference/en-US/executing.xml
cdi-tck/trunk/doc/reference/en-US/installation.xml
cdi-tck/trunk/doc/reference/en-US/introduction.xml
Log:
CDITCK-40
Modified: cdi-tck/trunk/dist/readme.txt
===================================================================
--- cdi-tck/trunk/dist/readme.txt 2009-10-16 15:12:28 UTC (rev 4148)
+++ cdi-tck/trunk/dist/readme.txt 2009-10-16 16:52:50 UTC (rev 4149)
@@ -13,15 +13,29 @@
This distribution consists of:
-src/
- -- TCK sources (tests porting package API)
+artifacts/
+ -- TCK binaries, sources, javadoc, packaged as jars
+ -- specification audit (source and report)
+ -- TestNG suite.xml file for running the TCK
+doc/
+ -- Reference guide for the TCK
+
lib/
- -- Libraries for running the TCK including binaries of the TCK
+ -- Libraries dependencies for running the TCK
+
+weld/
+ -- TCK runner for using Weld (the CDI RI) with JBoss AS
+
+ jboss-as/
+ -- configuration for running the TCK with JBoss AS
-coverage.html
- -- Test coverage report
+ jboss-tck-runner/
+ -- maven based TCK runner for JBoss AS
+ lib/
+ -- all libraries for the Weld implementation of the CDI porting package
+
Generating the TCK audit coverage report
----------------------------------------
Modified: cdi-tck/trunk/doc/reference/en-US/configuration.xml
===================================================================
--- cdi-tck/trunk/doc/reference/en-US/configuration.xml 2009-10-16 15:12:28 UTC (rev 4148)
+++ cdi-tck/trunk/doc/reference/en-US/configuration.xml 2009-10-16 16:52:50 UTC (rev 4149)
@@ -104,7 +104,7 @@
To run the full TCK you must additionally implement
<literal>org.jboss.testharness.spi.Containers</literal>,
which handles deploying the test artifact to the container. An
- implementations of this API is already available for JBoss AS 5.1.
+ implementations of this API is already available for JBoss AS 5.2.
Therefore, you only need to implement this part of the porting package
if you wish to use another container.
</para>
Modified: cdi-tck/trunk/doc/reference/en-US/eclipse-running.xml
===================================================================
--- cdi-tck/trunk/doc/reference/en-US/eclipse-running.xml 2009-10-16 15:12:28 UTC (rev 4148)
+++ cdi-tck/trunk/doc/reference/en-US/eclipse-running.xml 2009-10-16 16:52:50 UTC (rev 4149)
@@ -76,7 +76,7 @@
<para>
<emphasis role="bold">Weld JBoss TCK Runner</emphasis> -
Groups the porting package implementation and TCK runner projects
- that are configured to certify Weld deployed on JBoss AS 5.1
+ that are configured to certify Weld deployed on JBoss AS 5.2
</para>
</listitem>
</orderedlist>
@@ -238,7 +238,7 @@
<para>
Let's see what has to be done to execute an integration test. This
will result in the artifact being deployed to the container, which is
- JBoss AS 5.1 if you are using the JBoss TCK runner.
+ JBoss AS 5.2 if you are using the JBoss TCK runner.
</para>
</section>
<section id="eclipse-in-container">
@@ -275,7 +275,7 @@
- the relative path from the jboss-tck-impl project to a
directory that contains a build.properties or
local.build.properties file defining the location of a JBoss AS
- 5.1 installation in the
+ 5.2 installation in the
<literal>jboss.home</literal>
property
</para>
@@ -373,7 +373,7 @@
</orderedlist>
<para>
When you run the test this time, it should pass. If you get a
- failure that the container (e.g., JBoss AS 5.1) must be run with
+ failure that the container (e.g., JBoss AS 5.2) must be run with
assertions enabled, you need to stop the container and start it with
the -ea flag (or just leave it stopped and the test will start it
appropriately).
Modified: cdi-tck/trunk/doc/reference/en-US/executing.xml
===================================================================
--- cdi-tck/trunk/doc/reference/en-US/executing.xml 2009-10-16 15:12:28 UTC (rev 4148)
+++ cdi-tck/trunk/doc/reference/en-US/executing.xml 2009-10-16 16:52:50 UTC (rev 4149)
@@ -17,7 +17,7 @@
phase of the Maven 2 life cycle. The execution happens within a TCK
runner project (as opposed to the TCK project itself). Weld
includes a TCK runner project that executes the CDI TCK on Weld
- running inside JBoss AS 5.1. To execute the CDI TCK on your own CDI
+ running inside JBoss AS 5.2. To execute the CDI TCK on your own CDI
implementation, you could modify the TCK runner project included with
Weld to use your CDI implementation as described in <xref
linkend="configuration" />.
@@ -88,7 +88,7 @@
deploy the test artifact to the container and execute the test in a
true Java EE life cycle. The JBoss TCK runner has a dependency on the
library that provides an implementation of this interface for JBoss AS
- 5.1.
+ 5.2.
</para>
<para>
Since in-container tests are executed in a remote JVM, the results of
Modified: cdi-tck/trunk/doc/reference/en-US/installation.xml
===================================================================
--- cdi-tck/trunk/doc/reference/en-US/installation.xml 2009-10-16 15:12:28 UTC (rev 4148)
+++ cdi-tck/trunk/doc/reference/en-US/installation.xml 2009-10-16 16:52:50 UTC (rev 4149)
@@ -21,7 +21,7 @@
<code>/lib</code>.
</para>
<para>
- You can also download the currnet source code from
+ You can also download the current source code from
<ulink url="http://anonsvn.jboss.org/repos/weld/cdi-tck/trunk">JBoss SVN repository</ulink>.
</para>
<para>
@@ -37,14 +37,14 @@
</para>
<para>
The JSR-299: Contexts and Dependency Injection for Java EE 1.0
- reference implementation (RI) project is named . You can
+ reference implementation (RI) project is named Weld. You can
obtain the latest release from the
<ulink url="http://seamframework.org/Download">download page</ulink>
on Seam Framework website.
</para>
<note>
<para>
- is not required for running the CDI TCK, but it can be
+ Weld is not required for running the CDI TCK, but it can be
used as a reference for familiarizing yourself with the TCK before
testing your own CDI implementation.
</para>
@@ -72,7 +72,7 @@
</listitem>
<listitem>
<para>
- Java EE 5 or better (e.g., JBoss AS 5.x or GlassFish V3)
+ Java EE 6 preview or better (e.g., JBoss AS 5.2.x or GlassFish V3)
</para>
</listitem>
</itemizedlist>
@@ -111,26 +111,25 @@
<tip id="tck-in-jboss-as">
<title>
- Running the TCK against the CDI RI () and JBoss AS
+ Running the TCK against the CDI RI (Weld) and JBoss AS
</title>
<para>
- is built as a modular library, and as such can be
- retro-fitted to Java EE 5 products as required. JBoss AS 5.1 and
- above releases bundle . JBoss AS 5.1 also allows you to
- upgrade the module to the current release (though some
- functionality may be disabled).
+ 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
+ above releases bundle Weld. To run the TCK with JBoss AS, you must
+ use JBoss AS 5.2 or above.
</para>
<para>
- To install JBoss AS 5.1 and update to the latest
+ To install JBoss AS 5.2 and update to the latest
release:
</para>
<itemizedlist>
<listitem>
<para>
- First, you should download JBoss AS 5.1 from the JBoss AS
+ First, you should download JBoss AS 5.2 from the JBoss AS
<ulink url="http://jboss.org/jbossas/downloads">project page</ulink>.
</para>
</listitem>
@@ -143,33 +142,22 @@
</listitem>
<listitem>
<para>
- Change to the weld directory.
+ Change to the <literal>weld</literal> directory in the TCK.
</para>
</listitem>
<listitem>
<para>
- Make sure the
+ Create a file called <literal>local.build.properties</literal>
+ in <literal>weld/jboss-as</literal> and make sure the
<literal>jboss.home</literal>
- property in the local.build.properties file in the jboss-as
- directory references a JBoss AS 5.1 installation:
+ property references a JBoss AS 5.2 installation:
</para>
- <programlisting>jboss.home=/path/to/jboss-as-5.1</programlisting>
+ <programlisting>jboss.home=/path/to/jboss-as-5.2</programlisting>
</listitem>
- <listitem>
- <para>
- Then, run Ant from the jboss-as directory to install the
- deployer:
- </para>
- <programlisting>ant update</programlisting>
- <para>
- The libraries needed by the deployer are fetched from the
- Maven 2 repository on demand.
- </para>
- </listitem>
</itemizedlist>
<para>
- includes a TCK runner that executes the TCK using Web
+ 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.
To run the tck:
</para>
@@ -181,17 +169,14 @@
install Maven 2 in the
<ulink
url="http://www.sonatype.com/books/maven-book/reference/installation-sect-mave...">Maven: The Definitive Guide</ulink>
- book published by Sonatype. bundles a copy of Maven
- in the
- <code>lib/maven</code>
- directory.
+ book published by Sonatype.
</para>
</listitem>
<listitem>
<para>
Next, instruct Maven to run the TCK:
</para>
- <programlisting><![CDATA[cd jboss-tck-runner
+ <programlisting><![CDATA[cd weld/jboss-tck-runner
mvn test -Dincontainer]]></programlisting>
</listitem>
<listitem>
Modified: cdi-tck/trunk/doc/reference/en-US/introduction.xml
===================================================================
--- cdi-tck/trunk/doc/reference/en-US/introduction.xml 2009-10-16 15:12:28 UTC (rev 4148)
+++ cdi-tck/trunk/doc/reference/en-US/introduction.xml 2009-10-16 16:52:50 UTC (rev 4149)
@@ -270,14 +270,14 @@
<para>
Sun Microsystems, Inc. will implement the porting package for the
CDI RI and test the CDI RI on the Java EE Reference
- Implementation as well as other platforms.
+ Implementation .
</para>
</note>
<para>The CDI TCK has been tested run on following platforms:</para>
<itemizedlist>
<listitem>
<para>
- JBoss AS 5.1.0.GA using Sun Java SE 6 on Red Hat Enterprise
+ JBoss AS 5.2.0.Beta1 using Sun Java SE 6 on Red Hat Enterprise
Linux 5.2
</para>
</listitem>
15 years, 1 month
Weld SVN: r4148 - cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition.
by weld-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-10-16 11:12:28 -0400 (Fri, 16 Oct 2009)
New Revision: 4148
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java
Log:
correct overwritten tests
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java 2009-10-16 14:01:13 UTC (rev 4147)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java 2009-10-16 15:12:28 UTC (rev 4148)
@@ -20,15 +20,14 @@
import java.lang.annotation.Annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
-import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import java.util.ArrayList;
import javax.enterprise.inject.AnnotationLiteral;
-import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.InterceptionType;
import javax.enterprise.inject.spi.Interceptor;
@@ -37,6 +36,8 @@
import org.jboss.test.audit.annotations.SpecAssertions;
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;
/**
@@ -44,23 +45,24 @@
* their execution.
*
* @author David Allen
- *
+ * @author Marius Bogoevici
*/
@Artifact
-@SpecVersion(spec="cdi", version="PFD2")
+@SpecVersion(spec = "cdi", version = "PFD2")
+@BeansXml("beans.xml")
public class InterceptorDefinitionTest extends AbstractJSR299Test
{
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertions({
- @SpecAssertion(section = "11.1.2", id = "a")
+ @SpecAssertion(section = "11.1.2", id = "a")
})
// WBRI-59
public void testInterceptorsImplementInterceptorInterface()
{
boolean interfaceFound = false;
- for (Type type : getInterfacesImplemented(getBeans(TransactionalInterceptor.class).iterator().next().getClass()))
+ for (Type type : getInterfacesImplemented(getTransactionalInterceptor().getClass()))
{
- if (type.equals(Interceptor.class))
+ if (type instanceof ParameterizedTypeImpl && ((ParameterizedTypeImpl)type).getRawType().equals(Interceptor.class))
{
interfaceFound = true;
break;
@@ -68,35 +70,28 @@
}
assert interfaceFound;
}
-
- private Set<Type> getInterfacesImplemented(Class<?> clazz)
- {
- Set<Type> interfaces = new HashSet<Type>();
- interfaces.addAll(new HierarchyDiscovery(clazz).getFlattenedTypes());
- return interfaces;
- }
-
- @Test(groups = "ri-broken")
+
+ @Test
@SpecAssertions({
- @SpecAssertion(section = "11.1.2", id = "b")
+ @SpecAssertion(section = "11.1.2", id = "b")
})
// WBRI-59
public void testInterceptorBindingTypes()
{
- Interceptor<?> interceptorBean = (Interceptor<?>) getBeans(TransactionalInterceptor.class).iterator().next();
+ Interceptor<?> interceptorBean = getTransactionalInterceptor();
assert interceptorBean.getInterceptorBindingTypes().size() == 1;
- assert interceptorBean.getInterceptorBindingTypes().contains(Transactional.class);
+ assert interceptorBean.getInterceptorBindingTypes().contains(new AnnotationLiteral<Transactional>(){});
}
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertions({
- @SpecAssertion(section = "11.1.2", id = "c"),
- @SpecAssertion(section = "11.1.2", id = "e")
+ @SpecAssertion(section = "11.1.2", id = "c"),
+ @SpecAssertion(section = "11.1.2", id = "e")
})
// WBRI-59
public void testInterceptionType()
{
- Interceptor<?> interceptorBean = (Interceptor<?>) getBeans(TransactionalInterceptor.class).iterator().next();
+ Interceptor<?> interceptorBean = getTransactionalInterceptor();
assert interceptorBean.intercepts(InterceptionType.AROUND_INVOKE);
assert !interceptorBean.intercepts(InterceptionType.POST_ACTIVATE);
assert !interceptorBean.intercepts(InterceptionType.POST_CONSTRUCT);
@@ -104,24 +99,61 @@
assert !interceptorBean.intercepts(InterceptionType.PRE_PASSIVATE);
}
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertion(section = "11.1.2", id = "f")
// WBRI-59
public void testInstanceOfInterceptorForEveryEnabledInterceptor()
{
- assert !getBeans(TransactionalInterceptor.class).isEmpty();
- assert !getBeans(SecureInterceptor.class).isEmpty();
+ List<AnnotationLiteral<?>> annotationLiterals = Arrays.<AnnotationLiteral<?>>asList(
+ new AnnotationLiteral<Transactional>(){},
+ new AnnotationLiteral<Secure>(){},
+ new AnnotationLiteral<MissileBinding>(){},
+ new AnnotationLiteral<Logged>(){});
+
+ List<Class<?>> interceptorClasses = new ArrayList<Class<?>>(Arrays.<Class<?>>asList(
+ AtomicInterceptor.class,
+ MissileInterceptor.class,
+ SecureInterceptor.class,
+ TransactionalInterceptor.class,
+ NetworkLogger.class,
+ FileLogger.class,
+ NotEnabledAtomicInterceptor.class
+ ));
+
+ for (AnnotationLiteral<?> annotationLiteral: annotationLiterals)
+ {
+ List<Interceptor<?>> interceptors = getCurrentManager().resolveInterceptors(InterceptionType.AROUND_INVOKE, annotationLiteral);
+ for (Interceptor<?> interceptor: interceptors)
+ {
+ interceptorClasses.remove(interceptor.getBeanClass());
+ }
+ }
+
+ List<Interceptor<?>> interceptors = getCurrentManager().resolveInterceptors(InterceptionType.AROUND_INVOKE,
+ new AnnotationLiteral<Atomic>(){},
+ new AnnotationLiteral<MissileBinding>(){});
+ for (Interceptor<?> interceptor : interceptors)
+ {
+ interceptorClasses.remove(interceptor.getBeanClass());
+ }
+
+ assert interceptorClasses.size() == 1;
+ assert interceptorClasses.get(0).equals(NotEnabledAtomicInterceptor.class);
}
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertions({
- @SpecAssertion(section = "11.3.12", id = "a")
+ @SpecAssertion(section = "11.3.12", id = "a")
})
// WBRI-59
public void testResolveInterceptorsReturnsOrderedList()
{
- Annotation transactionalBinding = new AnnotationLiteral<Transactional>() {};
- Annotation secureBinding = new AnnotationLiteral<Secure>() {};
+ Annotation transactionalBinding = new AnnotationLiteral<Transactional>()
+ {
+ };
+ Annotation secureBinding = new AnnotationLiteral<Secure>()
+ {
+ };
List<Interceptor<?>> interceptors = getCurrentManager().resolveInterceptors(
InterceptionType.AROUND_INVOKE,
transactionalBinding,
@@ -129,126 +161,158 @@
);
assert interceptors.size() == 2;
assert interceptors.get(0).getInterceptorBindingTypes().size() == 1;
- assert interceptors.get(0).getInterceptorBindingTypes().contains(transactionalBinding);
+ assert interceptors.get(0).getInterceptorBindingTypes().contains(secureBinding);
assert interceptors.get(1).getInterceptorBindingTypes().size() == 1;
- assert interceptors.get(1).getInterceptorBindingTypes().contains(secureBinding);
+ assert interceptors.get(1).getInterceptorBindingTypes().contains(transactionalBinding);
}
-
- @Test(groups = "ri-broken")
+
+ @Test(expectedExceptions = {IllegalArgumentException.class})
@SpecAssertions({
- @SpecAssertion(section = "11.3.12", id = "b")
+ @SpecAssertion(section = "11.3.12", id = "b")
})
// WBRI-59
public void testSameBindingTypesToResolveInterceptorsFails()
{
- Annotation transactionalBinding = new AnnotationLiteral<Transactional>() {};
+ Annotation transactionalBinding = new AnnotationLiteral<Transactional>()
+ {
+ };
getCurrentManager().resolveInterceptors(InterceptionType.AROUND_INVOKE, transactionalBinding, transactionalBinding);
}
-
- @Test(groups = "ri-broken")
+
+ @Test(expectedExceptions = {IllegalArgumentException.class})
@SpecAssertions({
- @SpecAssertion(section = "11.3.12", id = "c")
+ @SpecAssertion(section = "11.3.12", id = "c")
})
// WBRI-59
public void testNoBindingTypesToResolveInterceptorsFails()
{
getCurrentManager().resolveInterceptors(InterceptionType.AROUND_INVOKE);
}
-
- @Test(groups = "ri-broken")
+
+ @Test(expectedExceptions = {IllegalArgumentException.class})
@SpecAssertions({
- @SpecAssertion(section = "11.3.12", id = "d")
+ @SpecAssertion(section = "11.3.12", id = "d")
})
// WBRI-59
public void testNonBindingTypeToResolveInterceptorsFails()
{
- Annotation nonBinding = new AnnotationLiteral<NonBindingType>() {};
+ Annotation nonBinding = new AnnotationLiteral<NonBindingType>()
+ {
+ };
getCurrentManager().resolveInterceptors(InterceptionType.AROUND_INVOKE, nonBinding);
}
-
- @Test(groups = "ri-broken")
+
+ @Test
@SpecAssertions({
- @SpecAssertion(section = "7.2", id = "a"),
- @SpecAssertion(section = "9.2", id = "a"),
- @SpecAssertion(section = "12.3", id = "kb")
+ @SpecAssertion(section = "7.2", id = "a"),
+ @SpecAssertion(section = "9.2", id = "a"),
+ @SpecAssertion(section = "12.3", id = "kb")
})
public void testManagedBeanIsIntercepted()
{
MissileInterceptor.intercepted = false;
-
+
Missile missile = getInstanceByType(Missile.class);
missile.fire();
-
+
assert MissileInterceptor.intercepted;
}
-
+
@Test
@SpecAssertion(section = "7.2", id = "a1")
public void testInitializerMethodsNotIntercepted()
{
MissileInterceptor.intercepted = false;
-
- Missile missile = getInstanceByType(Missile.class);
- assert missile.initCalled;
+
+ getInstanceByType(Missile.class);
+
assert !MissileInterceptor.intercepted;
}
-
- @Test(groups = "ri-broken")
+
+ @Test
@SpecAssertion(section = "7.2", id = "ia")
public void testProducerMethodsAreIntercepted()
{
MissileInterceptor.intercepted = false;
-
+
getInstanceByType(Wheat.class);
-
+
assert MissileInterceptor.intercepted;
}
-
- @Test(groups = "ri-broken")
+
+ @Test
@SpecAssertions({
- @SpecAssertion(section = "9.1", id = "a"),
- @SpecAssertion(section = "9.1", id = "b"),
- @SpecAssertion(section = "9.1", id = "c"),
- @SpecAssertion(section = "9.3", id = "a")
+ @SpecAssertion(section = "9.1", id = "a"),
+ @SpecAssertion(section = "9.1", id = "b"),
+ @SpecAssertion(section = "9.1", id = "c"),
+ @SpecAssertion(section = "9.3", id = "a")
})
public void testInterceptorBindingAnnotation()
- {
- Interceptor<?> interceptorBean = (Interceptor<?>) getBeans(FileLogger.class).iterator().next();
+ {
+ Interceptor<?> interceptorBean = getLoggedInterceptors().iterator().next();
assert interceptorBean.getInterceptorBindingTypes().size() == 1;
- assert interceptorBean.getInterceptorBindingTypes().contains(Logged.class);
+ assert interceptorBean.getInterceptorBindingTypes().contains(new AnnotationLiteral<Logged>(){});
- Target target = ((AnnotatedElement) interceptorBean.getInterceptorBindingTypes().iterator().next()).getAnnotation(Target.class);
+ Target target = (interceptorBean.getInterceptorBindingTypes().iterator().next()).annotationType().getAnnotation(Target.class);
List<ElementType> elements = Arrays.asList(target.value());
assert elements.contains(ElementType.TYPE);
- assert elements.contains(ElementType.METHOD);
+ assert elements.contains(ElementType.METHOD);
}
-
- @Test(groups = "ri-broken")
+
+ @Test
@SpecAssertions({
- @SpecAssertion(section = "9.1.2", id = "a"),
- @SpecAssertion(section = "9.1.2", id = "b"),
- @SpecAssertion(section = "2.7.1.2", id = "b")
+ @SpecAssertion(section = "9.1.2", id = "a"),
+ @SpecAssertion(section = "9.1.2", id = "b"),
+ @SpecAssertion(section = "2.7.1.2", id = "b")
})
public void testStereotypeInterceptorBindings()
- {
- Bean<SecureTransaction> bean = getBeans(SecureTransaction.class).iterator().next();
- assert bean.getQualifiers().contains(Logged.class);
+ {
+ FileLogger.intercepted = false;
+ NetworkLogger.intercepted = false;
+
+ SecureTransaction secureTransaction = getInstanceByType(SecureTransaction.class);
+ secureTransaction.transact();
+
+ assert FileLogger.intercepted;
+ assert NetworkLogger.intercepted;
}
-
- @Test(groups = "ri-broken")
+
+ @Test
@SpecAssertions({
- @SpecAssertion(section = "9.1.1", id = "a"),
- @SpecAssertion(section = "9.1.1", id = "b")
+ @SpecAssertion(section = "9.1.1", id = "a"),
+ @SpecAssertion(section = "9.1.1", id = "b")
})
public void testInterceptorBindingsCanDeclareOtherInterceptorBindings()
{
AtomicInterceptor.intercepted = false;
MissileInterceptor.intercepted = false;
-
+
AtomicFoo foo = getInstanceByType(AtomicFoo.class);
foo.doAction();
-
+
assert AtomicInterceptor.intercepted;
assert MissileInterceptor.intercepted;
}
+
+ private Interceptor<?> getTransactionalInterceptor()
+ {
+ return getCurrentManager().resolveInterceptors(InterceptionType.AROUND_INVOKE, new AnnotationLiteral<Transactional>()
+ {
+ }).iterator().next();
+ }
+
+ private List<Interceptor<?>> getLoggedInterceptors()
+ {
+ return getCurrentManager().resolveInterceptors(InterceptionType.AROUND_INVOKE, new AnnotationLiteral<Logged>()
+ {
+ });
+ }
+
+ private Set<Type> getInterfacesImplemented(Class<?> clazz)
+ {
+ Set<Type> interfaces = new HashSet<Type>();
+ interfaces.addAll(new HierarchyDiscovery(clazz).getFlattenedTypes());
+ return interfaces;
+ }
+
}
15 years, 1 month
Weld SVN: r4147 - cdi-tck/trunk/doc/reference.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-10-16 10:01:13 -0400 (Fri, 16 Oct 2009)
New Revision: 4147
Modified:
cdi-tck/trunk/doc/reference/pom.xml
Log:
newer parent pom
Modified: cdi-tck/trunk/doc/reference/pom.xml
===================================================================
--- cdi-tck/trunk/doc/reference/pom.xml 2009-10-16 14:00:27 UTC (rev 4146)
+++ cdi-tck/trunk/doc/reference/pom.xml 2009-10-16 14:01:13 UTC (rev 4147)
@@ -1,18 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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.
+ 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.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -20,7 +22,7 @@
<artifactId>jsr299-tck-reference-guide</artifactId>
<packaging>jdocbook</packaging>
<name>JSR-299 TCK Reference Guide</name>
-
+
<parent>
<groupId>org.jboss.jsr299.tck</groupId>
<artifactId>jsr299-tck-parent</artifactId>
@@ -28,104 +30,12 @@
<relativePath>../../pom.xml</relativePath>
</parent>
- <pluginRepositories>
- <pluginRepository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2</url>
- </pluginRepository>
- </pluginRepositories>
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2</url>
- </repository>
- </repositories>
-
- <properties>
- <mpjdocbook.version>2.1.1</mpjdocbook.version>
- </properties>
-
<build>
<defaultGoal>process-classes</defaultGoal>
<plugins>
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
- <version>${mpjdocbook.version}</version>
- <extensions>true</extensions>
- <dependencies>
- <dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-docbook-xslt</artifactId>
- <version>1.1.1.BETA2</version>
- <exclusions>
- <exclusion>
- <groupId>org.eclipse.wst.css</groupId>
- <artifactId>core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.wst.sse</groupId>
- <artifactId>core</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>seam-jdocbook-style</artifactId>
- <version>1.1.0.GA</version>
- <type>jdocbook-style</type>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jbossorg-jdocbook-style</artifactId>
- <version>1.1.0</version>
- <type>jdocbook-style</type>
- </dependency>
- </dependencies>
- <configuration>
- <sourceDirectory>${pom.basedir}</sourceDirectory>
- <sourceDocumentName>master.xml</sourceDocumentName>
- <masterTranslation>en-US</masterTranslation>
- <imageResource>
- <directory>${pom.basedir}/en-US</directory>
- <includes>
- <include>images/*.png</include>
- </includes>
- </imageResource>
- <formats>
- <format>
- <formatName>pdf</formatName>
- <stylesheetResource>
- classpath:/xslt/org/jboss/webbeans/pdf.xsl
- </stylesheetResource>
- <finalName>jsr299-tck-reference.pdf</finalName>
- </format>
- <format>
- <formatName>html</formatName>
- <stylesheetResource>
- classpath:/xslt/org/jboss/webbeans/xhtml.xsl
- </stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- <format>
- <formatName>html_single</formatName>
- <stylesheetResource>
- classpath:/xslt/org/jboss/webbeans/xhtml-single.xsl
- </stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- </formats>
- <options>
- <xincludeSupported>true</xincludeSupported>
- <xmlTransformerType>saxon</xmlTransformerType>
- <!-- needed for uri-resolvers; can be ommitted if using 'current' uri scheme -->
- <!-- could also locate the docbook dependency and inspect its version... -->
- <docbookVersion>1.72.0</docbookVersion>
- <localeSeparator>-</localeSeparator>
- </options>
- </configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -151,26 +61,9 @@
</plugins>
</build>
- <ciManagement>
- <system>Hudson</system>
- <url />
-
- </ciManagement>
-
- <issueManagement>
- <system>JIRA</system>
- <url>http://jira.jboss.org/browse/WBRI</url>
- </issueManagement>
-
- <inceptionYear>2008</inceptionYear>
-
<scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/weld/cdi-tck/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/cdi-tck/trunk</developerConnection>
+ </scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/weld/cdi-tck/trunk
- </connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/cdi-tck/trunk
- </developerConnection>
- <url>scm:svn:https://svn.jboss.org/repos/weld/cdi-tck/trunk/jsr299-tck-referen...</url>
- </scm>
-
</project>
15 years, 1 month
Weld SVN: r4146 - in cdi-tck/trunk: doc/reference/en-US and 1 other directory.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-10-16 10:00:27 -0400 (Fri, 16 Oct 2009)
New Revision: 4146
Modified:
cdi-tck/trunk/doc/reference/en-US/
cdi-tck/trunk/pom.xml
Log:
use non-snapshot version, newer release activation
Property changes on: cdi-tck/trunk/doc/reference/en-US
___________________________________________________________________
Name: svn:externals
-
harness http://anonsvn.jboss.org/repos/test-utils/jboss-test-harness/trunk/doc/re...
+ harness http://anonsvn.jboss.org/repos/test-utils/jboss-test-harness/tags/1.1.0-C...
Modified: cdi-tck/trunk/pom.xml
===================================================================
--- cdi-tck/trunk/pom.xml 2009-10-16 13:51:22 UTC (rev 4145)
+++ cdi-tck/trunk/pom.xml 2009-10-16 14:00:27 UTC (rev 4146)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-parent</artifactId>
- <version>2</version>
+ <version>3</version>
</parent>
<!-- Metadata -->
@@ -56,7 +56,7 @@
<issueManagement>
<system>JIRA</system>
- <url>http://jira.jboss.org/browse/WBTCK</url>
+ <url>http://jira.jboss.org/browse/CDITCK</url>
</issueManagement>
<inceptionYear>2008</inceptionYear>
@@ -75,7 +75,7 @@
<properties>
<jboss.test.audit.version>1.0.0</jboss.test.audit.version>
- <jboss.test.harness.version>1.1.0-SNAPSHOT</jboss.test.harness.version>
+ <jboss.test.harness.version>1.1.0-CR2</jboss.test.harness.version>
<testng.version>5.10</testng.version>
<jsr250.api.version>1.0</jsr250.api.version>
<cdi.api.version>1.0-CR1</cdi.api.version>
@@ -294,7 +294,6 @@
<artifactId>maven-release-plugin</artifactId>
<configuration>
<tagBase>https://svn.jboss.org/repos/weld/cdi-tck/tags</tagBase>
- <arguments>-Pdocs -Dtck-audit -Prelease -Pdist</arguments>
<preparationGoals>install</preparationGoals>
</configuration>
</plugin>
@@ -313,6 +312,11 @@
<profiles>
<profile>
<id>docs</id>
+ <activation>
+ <property>
+ <name>release</name>
+ </property>
+ </activation>
<modules>
<module>doc/reference</module>
</modules>
@@ -320,6 +324,11 @@
<profile>
<id>dist</id>
+ <activation>
+ <property>
+ <name>release</name>
+ </property>
+ </activation>
<modules>
<module>dist</module>
</modules>
15 years, 1 month
Weld SVN: r4144 - doc/tags.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-10-16 09:51:15 -0400 (Fri, 16 Oct 2009)
New Revision: 4144
Added:
doc/tags/weld-docbook-xslt-1.1.1-Beta3/
Log:
[maven-scm] copy for tag weld-docbook-xslt-1.1.1-Beta3
Copied: doc/tags/weld-docbook-xslt-1.1.1-Beta3 (from rev 4143, doc/trunk/xslt)
15 years, 1 month