Author: shane.bryzak(a)jboss.com
Date: 2009-08-04 21:03:49 -0400 (Tue, 04 Aug 2009)
New Revision: 3401
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/Broken_Record.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/FooScoped.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/NonPassivationCapableProducerFieldTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/RecordProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/British.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/Cow.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/CowProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/EnterpriseBeanWithIllegalDependencyTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/MaarianHaminaLocal_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/Maarianhamina_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/EnterpriseBeanWithNonPassivatingDecoratorTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/MaarianHaminaLocal_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/MaarianhaminaDecorator.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/Maarianhamina_Broken.java
Log:
more passivating context tests
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/Broken_Record.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/Broken_Record.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/Broken_Record.java 2009-08-05
01:03:49 UTC (rev 3401)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken25;
+
+class Broken_Record
+{
+ public Broken_Record(String foo) {}
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/FooScoped.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/FooScoped.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/FooScoped.java 2009-08-05
01:03:49 UTC (rev 3401)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken25;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.context.ScopeType;
+
+@Target( { TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+@Documented
+@ScopeType(passivating = true)
+@interface FooScoped
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/NonPassivationCapableProducerFieldTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/NonPassivationCapableProducerFieldTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/NonPassivationCapableProducerFieldTest.java 2009-08-05
01:03:49 UTC (rev 3401)
@@ -0,0 +1,34 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken25;
+
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.test.audit.annotations.SpecAssertion;
+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.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * @author Shane Bryzak
+ */
+@Artifact
+(a)Packaging(PackagingType.EAR)
+@SpecVersion("20090625")
+(a)ExpectedDeploymentException(DeploymentError.class)
+public class NonPassivationCapableProducerFieldTest
+{
+ @Test(groups = { "passivation", "ri-broken" })
+ @SpecAssertions({
+ @SpecAssertion(section = "6.6.1", id = "db"),
+ @SpecAssertion(section = "6.6.3", id = "a"),
+ @SpecAssertion(section = "6.6.3", id = "b"),
+ @SpecAssertion(section = "6.6.4", id = "d")
+ })
+ public void testNonPassivationCapableProducerFieldNotOk()
+ {
+ assert false;
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/RecordProducer.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/RecordProducer.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken25/RecordProducer.java 2009-08-05
01:03:49 UTC (rev 3401)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken25;
+
+import javax.enterprise.inject.Produces;
+
+class RecordProducer
+{
+ public final @Produces @FooScoped Broken_Record record = new Broken_Record(null);
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/British.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/British.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/British.java 2009-08-05
01:03:49 UTC (rev 3401)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken26;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.BindingType;
+
+
+@BindingType
+@Target( { FIELD, PARAMETER, METHOD, TYPE })
+@Retention(RUNTIME)
+@interface British
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/Cow.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/Cow.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/Cow.java 2009-08-05
01:03:49 UTC (rev 3401)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken26;
+
+class Cow
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/CowProducer.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/CowProducer.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/CowProducer.java 2009-08-05
01:03:49 UTC (rev 3401)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken26;
+
+import javax.enterprise.inject.Produces;
+
+public class CowProducer
+{
+ @Produces @British public Cow cow = new Cow();
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/EnterpriseBeanWithIllegalDependencyTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/EnterpriseBeanWithIllegalDependencyTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/EnterpriseBeanWithIllegalDependencyTest.java 2009-08-05
01:03:49 UTC (rev 3401)
@@ -0,0 +1,28 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken26;
+
+import javax.enterprise.inject.IllegalProductException;
+
+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.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.testng.annotations.Test;
+
+@Artifact
+@IntegrationTest
+(a)Packaging(PackagingType.EAR)
+(a)ExpectedDeploymentException(IllegalProductException.class)
+@SpecVersion("20090625")
+public class EnterpriseBeanWithIllegalDependencyTest extends AbstractJSR299Test
+{
+ @Test(groups = { "contexts", "passivation",
"integration"})
+ @SpecAssertion(section = "6.6.4", id = "fb")
+ public void
testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails()
+ {
+ assert false;
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/MaarianHaminaLocal_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/MaarianHaminaLocal_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/MaarianHaminaLocal_Broken.java 2009-08-05
01:03:49 UTC (rev 3401)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken26;
+
+import javax.ejb.Local;
+
+@Local
+public interface MaarianHaminaLocal_Broken
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/Maarianhamina_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/Maarianhamina_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken26/Maarianhamina_Broken.java 2009-08-05
01:03:49 UTC (rev 3401)
@@ -0,0 +1,15 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken26;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+@Stateful
+public class Maarianhamina_Broken implements MaarianHaminaLocal_Broken
+{
+ @SuppressWarnings("unused")
+ @British Cow cow;
+
+ @Remove
+ public void bye() {
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/EnterpriseBeanWithNonPassivatingDecoratorTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/EnterpriseBeanWithNonPassivatingDecoratorTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/EnterpriseBeanWithNonPassivatingDecoratorTest.java 2009-08-05
01:03:49 UTC (rev 3401)
@@ -0,0 +1,29 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken27;
+
+import javax.enterprise.inject.IllegalProductException;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.api.DeploymentException;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.testng.annotations.Test;
+
+@Artifact
+@IntegrationTest
+(a)Packaging(PackagingType.EAR)
+(a)ExpectedDeploymentException(DeploymentException.class)
+@SpecVersion("20090625")
+public class EnterpriseBeanWithNonPassivatingDecoratorTest extends AbstractJSR299Test
+{
+ @Test(groups = { "contexts", "passivation",
"integration"})
+ @SpecAssertion(section = "6.6.4", id = "hb")
+ public void testEnterpriseBeanWithNonPassivatingDecoratorFails()
+ {
+ assert false;
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/MaarianHaminaLocal_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/MaarianHaminaLocal_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/MaarianHaminaLocal_Broken.java 2009-08-05
01:03:49 UTC (rev 3401)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken27;
+
+import javax.ejb.Local;
+
+@Local
+public interface MaarianHaminaLocal_Broken
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/MaarianhaminaDecorator.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/MaarianhaminaDecorator.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/MaarianhaminaDecorator.java 2009-08-05
01:03:49 UTC (rev 3401)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken27;
+
+import javax.decorator.Decorates;
+import javax.decorator.Decorator;
+
+@Decorator
+class MaarianhaminaDecorator implements MaarianHaminaLocal_Broken
+{
+ public MaarianhaminaDecorator(String foo) {}
+
+ @Decorates MaarianHaminaLocal_Broken maarianHamina;
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/Maarianhamina_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/Maarianhamina_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken27/Maarianhamina_Broken.java 2009-08-05
01:03:49 UTC (rev 3401)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken27;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+@Stateful
+public class Maarianhamina_Broken implements MaarianHaminaLocal_Broken
+{
+ @Remove
+ public void bye() {
+ }
+}