Author: danielc.roth
Date: 2009-03-31 03:38:46 -0400 (Tue, 31 Mar 2009)
New Revision: 2280
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/AnotherDeploymentType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/MultipleDisposeParametersDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/Spider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/SpiderProducer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/beans.xml
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/AnotherDeploymentType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/ProducesUnallowedDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/Spider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/SpiderProducer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/beans.xml
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/AnotherDeploymentType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/InitializerUnallowedDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/Spider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/SpiderProducer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/beans.xml
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/AnotherDeploymentType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/ObserverParameterUnallowedDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/Spider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/SpiderProducer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/beans.xml
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/AnotherDeploymentType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/Cat.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/Spider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/SpiderProducer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/UnresolvedDisposalMethodDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/beans.xml
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/ProducerMethodLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/SpiderProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/SpiderProducer_Broken.java
Log:
Initial Disposal Method commit
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/AnotherDeploymentType.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/AnotherDeploymentType.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/AnotherDeploymentType.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken1;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.DeploymentType;
+
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+@Documented
+@DeploymentType
+@interface AnotherDeploymentType
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/MultipleDisposeParametersDefinitionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/MultipleDisposeParametersDefinitionTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/MultipleDisposeParametersDefinitionTest.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,27 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken1;
+
+import javax.inject.DefinitionException;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
+@Artifact
+(a)ExpectedDeploymentException(DefinitionException.class)
+public class MultipleDisposeParametersDefinitionTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertion(section = "3.4.8", id = "a")
+ public void testMultipleDisposeParameters()
+ {
+ assert false;
+ }
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/Spider.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/Spider.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/Spider.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken1;
+
+
+class Spider
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/SpiderProducer_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/SpiderProducer_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/SpiderProducer_Broken.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken1;
+
+import javax.inject.Disposes;
+import javax.inject.Produces;
+
+@AnotherDeploymentType
+class SpiderProducer_Broken
+{
+
+ @Produces
+ public static Spider getSpider()
+ {
+ return new Spider();
+ }
+
+ public static void destorySpider(@Disposes Spider spider, @Disposes Spider another)
+ {
+
+ }
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/beans.xml
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/beans.xml
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/beans.xml 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,8 @@
+<Beans xmlns="urn:java:ee"
+
xmlns:test="urn:java:org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken1"
>
+ <Deploy>
+ <Standard />
+ <Production />
+ <test:AnotherDeploymentType />
+ </Deploy>
+</Beans>
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/AnotherDeploymentType.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/AnotherDeploymentType.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/AnotherDeploymentType.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken2;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.DeploymentType;
+
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+@Documented
+@DeploymentType
+@interface AnotherDeploymentType
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/ProducesUnallowedDefinitionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/ProducesUnallowedDefinitionTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/ProducesUnallowedDefinitionTest.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,27 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken2;
+
+import javax.inject.DefinitionException;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
+@Artifact
+(a)ExpectedDeploymentException(DefinitionException.class)
+public class ProducesUnallowedDefinitionTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertion(section = "3.4.8", id = "b")
+ public void testProducesUnallowed()
+ {
+ assert false;
+ }
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/Spider.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/Spider.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/Spider.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken2;
+
+
+class Spider
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/SpiderProducer_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/SpiderProducer_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/SpiderProducer_Broken.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken2;
+
+import javax.inject.Disposes;
+import javax.inject.Produces;
+
+@AnotherDeploymentType
+class SpiderProducer_Broken
+{
+
+ @Produces
+ public static Spider getSpider()
+ {
+ return new Spider();
+ }
+
+ @Produces
+ public static void destorySpider(@Disposes Spider spider)
+ {
+
+ }
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/beans.xml
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/beans.xml
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/beans.xml 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,8 @@
+<Beans xmlns="urn:java:ee"
+
xmlns:test="urn:java:org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken2"
>
+ <Deploy>
+ <Standard />
+ <Production />
+ <test:AnotherDeploymentType />
+ </Deploy>
+</Beans>
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/AnotherDeploymentType.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/AnotherDeploymentType.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/AnotherDeploymentType.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken3;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.DeploymentType;
+
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+@Documented
+@DeploymentType
+@interface AnotherDeploymentType
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/InitializerUnallowedDefinitionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/InitializerUnallowedDefinitionTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/InitializerUnallowedDefinitionTest.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,29 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken3;
+
+import javax.inject.DefinitionException;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+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;
+
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
+@Artifact
+(a)ExpectedDeploymentException(DefinitionException.class)
+(a)BeansXml("beans.xml")
+public class InitializerUnallowedDefinitionTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertion(section = "3.4.8", id = "c")
+ public void testInitializerUnallowed()
+ {
+ assert false;
+ }
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/Spider.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/Spider.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/Spider.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken3;
+
+
+class Spider
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/SpiderProducer_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/SpiderProducer_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/SpiderProducer_Broken.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,23 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken3;
+
+import javax.inject.Disposes;
+import javax.inject.Initializer;
+import javax.inject.Produces;
+
+@AnotherDeploymentType
+class SpiderProducer_Broken
+{
+
+ @Produces
+ public static Spider getSpider()
+ {
+ return new Spider();
+ }
+
+ @Initializer
+ public static void destorySpider(@Disposes Spider spider)
+ {
+
+ }
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/beans.xml
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/beans.xml
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/beans.xml 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,8 @@
+<Beans xmlns="urn:java:ee"
+
xmlns:test="urn:java:org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken3"
>
+ <Deploy>
+ <Standard />
+ <Production />
+ <test:AnotherDeploymentType />
+ </Deploy>
+</Beans>
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/AnotherDeploymentType.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/AnotherDeploymentType.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/AnotherDeploymentType.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken4;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.DeploymentType;
+
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+@Documented
+@DeploymentType
+@interface AnotherDeploymentType
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/ObserverParameterUnallowedDefinitionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/ObserverParameterUnallowedDefinitionTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/ObserverParameterUnallowedDefinitionTest.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,29 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken4;
+
+import javax.inject.DefinitionException;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+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;
+
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
+@Artifact
+(a)ExpectedDeploymentException(DefinitionException.class)
+(a)BeansXml("beans.xml")
+public class ObserverParameterUnallowedDefinitionTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertion(section = "3.4.8", id = "d")
+ public void testObserverParameterUnallowed()
+ {
+ assert false;
+ }
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/Spider.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/Spider.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/Spider.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken4;
+
+
+class Spider
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/SpiderProducer_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/SpiderProducer_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/SpiderProducer_Broken.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken4;
+
+import javax.event.Observes;
+import javax.inject.Disposes;
+import javax.inject.Produces;
+
+@AnotherDeploymentType
+class SpiderProducer_Broken
+{
+
+ @Produces
+ public static Spider getSpider()
+ {
+ return new Spider();
+ }
+
+ public static void destorySpider(@Disposes @Observes Spider spider)
+ {
+
+ }
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/beans.xml
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/beans.xml
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/beans.xml 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,8 @@
+<Beans xmlns="urn:java:ee"
+
xmlns:test="urn:java:org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken4"
>
+ <Deploy>
+ <Standard />
+ <Production />
+ <test:AnotherDeploymentType />
+ </Deploy>
+</Beans>
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/AnotherDeploymentType.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/AnotherDeploymentType.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/AnotherDeploymentType.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken5;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.DeploymentType;
+
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+@Documented
+@DeploymentType
+@interface AnotherDeploymentType
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/Cat.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/Cat.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/Cat.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken5;
+
+
+class Cat
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/Spider.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/Spider.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/Spider.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken5;
+
+
+class Spider
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/SpiderProducer_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/SpiderProducer_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/SpiderProducer_Broken.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,27 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken5;
+
+import javax.inject.Disposes;
+import javax.inject.Produces;
+
+@AnotherDeploymentType
+class SpiderProducer_Broken
+{
+
+ @Produces
+ public static Spider getSpider()
+ {
+ return new Spider();
+ }
+
+ public static void destorySpider(@Disposes Spider spider)
+ {
+
+ }
+
+ public static void destorySpider2(@Disposes Cat cat)
+ {
+
+ }
+
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/UnresolvedDisposalMethodDefinitionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/UnresolvedDisposalMethodDefinitionTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/UnresolvedDisposalMethodDefinitionTest.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,29 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken5;
+
+import javax.inject.UnsatisfiedDependencyException;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+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;
+
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
+@Artifact
+(a)ExpectedDeploymentException(UnsatisfiedDependencyException.class)
+(a)BeansXml("beans.xml")
+public class UnresolvedDisposalMethodDefinitionTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertion(section = "3.4.7", id = "a")
+ public void testUnresolvedDisposalMethod()
+ {
+ assert false;
+ }
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/beans.xml
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/beans.xml
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/beans.xml 2009-03-31
07:38:46 UTC (rev 2280)
@@ -0,0 +1,8 @@
+<Beans xmlns="urn:java:ee"
+
xmlns:test="urn:java:org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken5"
>
+ <Deploy>
+ <Standard />
+ <Production />
+ <test:AnotherDeploymentType />
+ </Deploy>
+</Beans>
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/ProducerMethodLifecycleTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/ProducerMethodLifecycleTest.java 2009-03-31
07:38:18 UTC (rev 2279)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/ProducerMethodLifecycleTest.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -1,153 +1,45 @@
-package org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle;
-
-import javax.context.CreationalContext;
-import javax.inject.AnnotationLiteral;
-import javax.inject.CreationException;
-import javax.inject.IllegalProductException;
-import javax.inject.manager.Bean;
-
-import org.hibernate.tck.annotations.SpecAssertion;
-import org.hibernate.tck.annotations.SpecAssertions;
-import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
-import org.testng.annotations.Test;
-
-/**
- *
- * Spec version: PRD2
- *
- */
-@Artifact
-(a)BeansXml("beans.xml")
-public class ProducerMethodLifecycleTest extends AbstractJSR299Test
-{
-
- @Test(groups = { "producerMethod" })
- @SpecAssertions({
- @SpecAssertion(section = "3.4", id = "c"),
- @SpecAssertion(section = "3.4", id = "k"),
- @SpecAssertion(section = "3.4.2", id = "a"),
- @SpecAssertion(section = "6", id = "b"),
- @SpecAssertion(section = "6.7", id = "e")
- })
- public void testProducerMethodBeanCreate() throws Exception
- {
- Tarantula tarantula = getCurrentManager().getInstanceByType(Tarantula.class);
- assert tarantula != null : "Producer method did not produce product";
- assert tarantula.getValue().equals("Pete") : "Producer method not
used to create Tarantula";
- }
-
- @Test(groups = { "producerMethod", "disposalMethod",
"ri-broken" })
- @SpecAssertions({
- @SpecAssertion(section = "6", id = "f")
- })
- public void testProducerMethodBeanDestroy() throws Exception
- {
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- SpiderProducer.setTarantulaDestroyed(false);
- Tarantula tarantula =
getCurrentManager().getInstanceByType(Tarantula.class);
- Bean<Tarantula> tarantulaBean =
getCurrentManager().resolveByType(Tarantula.class).iterator().next();
- tarantulaBean.destroy(tarantula);
- assert SpiderProducer.isTarantulaDestroyed();
- }
-
- }.run();
- }
-
- @Test(groups = { "specialization" })
- @SpecAssertions({
- @SpecAssertion(section = "6.7", id = "g"),
- @SpecAssertion(section = "4.3.2", id = "c")
- })
- public void testSpecializedBeanAlwaysUsed() throws Exception
- {
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- Egg egg = getCurrentManager().getInstanceByType(Egg.class);
- assert egg != null;
- assert egg.equals(AndalusianChicken.egg);
- }
-
- }.run();
- }
-
- @Test(groups = { "stub", "disposalMethod",
"beanLifecycle" })
- @SpecAssertion(section = "6.7", id = "m")
- public void testDisposalMethodCalled()
- {
- // TODO Placeholder
- assert false;
- }
-
- @Test(groups = { "producerMethod" })
- @SpecAssertions({
- @SpecAssertion(section = "3.4", id = "e"),
- @SpecAssertion(section = "6.7", id = "k")
- })
- public void testProducerMethodReturnsNullIsDependent() throws Exception
- {
- Bean<Spider> spiderBean = getCurrentManager().resolveByType(Spider.class, new
AnnotationLiteral<Null>() {}).iterator().next();
- CreationalContext<Spider> creationalContext = new
MockCreationalContext<Spider>();
- assert spiderBean.create(creationalContext) == null;
- }
-
- @Test(groups = "producerMethod", expectedExceptions =
IllegalProductException.class)
- @SpecAssertions({
- @SpecAssertion(section = "3.4", id = "f"),
- @SpecAssertion(section = "6.7", id = "l")
- })
- public void testProducerMethodReturnsNullIsNotDependent() throws Exception
- {
- assert getCurrentManager().resolveByType(Spider.class, new
AnnotationLiteral<Request>() {}).size() == 1;
- Bean<Spider> spider = getCurrentManager().resolveByType(Spider.class, new
AnnotationLiteral<Request>() {}).iterator().next();
- // Do the create ourselves, otherwise we may get a proxy back...
- spider.create(new CreationalContext<Spider>() {
-
- public void push(Spider incompleteInstance)
- {
- // TODO Auto-generated method stub
-
- }});
- }
-
- @Test(expectedExceptions = CreationException.class)
- @SpecAssertion(section="6.2", id="h")
- public void testCreationExceptionWrapsCheckedExceptionThrownFromCreate() throws
Exception
- {
- new RunInDependentContext()
- {
-
- protected void execute() throws Exception
- {
- getCurrentManager().getInstanceByType(Lorry.class);
- }
-
- }.run();
- }
-
- @Test(expectedExceptions = FooException.class)
- @SpecAssertion(section="6.2", id="g")
- public void testUncheckedExceptionThrownFromCreateNotWrapped() throws Exception
- {
- new RunInDependentContext()
- {
-
- protected void execute() throws Exception
- {
- getCurrentManager().getInstanceByType(Ship.class);
- }
-
- }.run();
- }
-
-}
+package org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle;
+
+import javax.inject.manager.Bean;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
+@Artifact
+(a)BeansXml("beans.xml")
+public class ProducerMethodLifecycleTest extends AbstractJSR299Test
+{
+
+ @Test(groups = { "producerMethod", "disposalMethod",
"ri-broken" })
+ @SpecAssertions({
+ @SpecAssertion(section = "6", id = "f")
+ })
+ public void testProducerMethodBeanDestroy() throws Exception
+ {
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ SpiderProducer.setTarantulaDestroyed(false);
+ Tarantula tarantula =
getCurrentManager().getInstanceByType(Tarantula.class);
+ Bean<Tarantula> tarantulaBean =
getCurrentManager().resolveByType(Tarantula.class).iterator().next();
+ tarantulaBean.destroy(tarantula);
+ assert SpiderProducer.isTarantulaDestroyed();
+ }
+
+ }.run();
+ }
+
+
+}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/SpiderProducer.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/SpiderProducer.java 2009-03-31
07:38:18 UTC (rev 2279)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/SpiderProducer.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -1,35 +1,35 @@
-package org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle;
-
-import javax.inject.Disposes;
-import javax.inject.Produces;
-
-@AnotherDeploymentType
-class SpiderProducer
-{
- private static boolean tarantulaDestroyed;
-
- @Produces public Tarantula produceTarantula()
- {
- return new Tarantula("Pete");
- }
-
- @Produces @Null public Spider getNullSpider()
- {
- return null;
- }
-
- public void destroyTarantula(@Disposes Tarantula spider)
- {
- tarantulaDestroyed = true;
- }
-
- public static boolean isTarantulaDestroyed()
- {
- return tarantulaDestroyed;
- }
-
- public static void setTarantulaDestroyed(boolean tarantulaDestroyed)
- {
- SpiderProducer.tarantulaDestroyed = tarantulaDestroyed;
- }
-}
+package org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle;
+
+import javax.inject.Disposes;
+import javax.inject.Produces;
+
+@AnotherDeploymentType
+class SpiderProducer
+{
+ private static boolean tarantulaDestroyed;
+
+ @Produces public Tarantula produceTarantula()
+ {
+ return new Tarantula("Pete");
+ }
+
+ @Produces @Null public Spider getNullSpider()
+ {
+ return null;
+ }
+
+ public static void destroyTarantula(@Disposes Tarantula spider)
+ {
+ tarantulaDestroyed = true;
+ }
+
+ public static boolean isTarantulaDestroyed()
+ {
+ return tarantulaDestroyed;
+ }
+
+ public static void setTarantulaDestroyed(boolean tarantulaDestroyed)
+ {
+ SpiderProducer.tarantulaDestroyed = tarantulaDestroyed;
+ }
+}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/SpiderProducer_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/SpiderProducer_Broken.java 2009-03-31
07:38:18 UTC (rev 2279)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/SpiderProducer_Broken.java 2009-03-31
07:38:46 UTC (rev 2280)
@@ -1,15 +1,18 @@
-package org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle;
-
-import javax.context.RequestScoped;
-import javax.inject.Produces;
-
-@AnotherDeploymentType
-class SpiderProducer_Broken
-{
-
- @Produces @RequestScoped @Request public Spider getRequestScopedSpider()
- {
- return null;
- }
-
-}
+package org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle;
+
+import javax.context.RequestScoped;
+import javax.inject.Produces;
+
+@AnotherDeploymentType
+class SpiderProducer_Broken
+{
+
+ @Produces
+ @RequestScoped
+ @Request
+ public Spider getRequestScopedSpider()
+ {
+ return null;
+ }
+
+}