Author: shane.bryzak(a)jboss.com
Date: 2009-07-28 07:58:46 -0400 (Tue, 28 Jul 2009)
New Revision: 3310
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/CityDecorator.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/UnderwaterCity.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/Interceptor_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/Kokkola_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/NonSerializableTest.java
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/Kokkola2.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/KokkolaInterceptor2.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/City.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/KokkolaInterceptor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
Log:
more passivation tests
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/City.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/City.java 2009-07-28
09:12:16 UTC (rev 3309)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/City.java 2009-07-28
11:58:46 UTC (rev 3310)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.context.passivating;
-class City
+class City
{
public void ping() {
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/CityDecorator.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/CityDecorator.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/CityDecorator.java 2009-07-28
11:58:46 UTC (rev 3310)
@@ -0,0 +1,18 @@
+package org.jboss.jsr299.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.decorator.Decorates;
+import javax.decorator.Decorator;
+import javax.enterprise.inject.Any;
+
+@Decorator
+class CityDecorator implements CityInterface, Serializable
+{
+ @Decorates @Any CityInterface city;
+
+ public void foo()
+ {
+ city.foo();
+ }
+}
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/Kokkola2.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/Kokkola2.java 2009-07-28
09:12:16 UTC (rev 3309)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/Kokkola2.java 2009-07-28
11:58:46 UTC (rev 3310)
@@ -1,14 +0,0 @@
-package org.jboss.jsr299.tck.tests.context.passivating;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.SessionScoped;
-import javax.interceptor.Interceptors;
-
-@SuppressWarnings("serial")
-@SessionScoped
-(a)Interceptors(KokkolaInterceptor2.class)
-public class Kokkola2 implements Serializable
-{
-
-}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/KokkolaInterceptor.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/KokkolaInterceptor.java 2009-07-28
09:12:16 UTC (rev 3309)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/KokkolaInterceptor.java 2009-07-28
11:58:46 UTC (rev 3310)
@@ -5,6 +5,7 @@
import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;
+@SuppressWarnings("serial")
public class KokkolaInterceptor implements Serializable
{
@AroundInvoke
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/KokkolaInterceptor2.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/KokkolaInterceptor2.java 2009-07-28
09:12:16 UTC (rev 3309)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/KokkolaInterceptor2.java 2009-07-28
11:58:46 UTC (rev 3310)
@@ -1,14 +0,0 @@
-package org.jboss.jsr299.tck.tests.context.passivating;
-
-import javax.interceptor.AroundInvoke;
-import javax.interceptor.InvocationContext;
-
-public class KokkolaInterceptor2
-{
- @AroundInvoke
- public Object intercept(InvocationContext context)
- {
- // do nothing
- return null;
- }
-}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-07-28
09:12:16 UTC (rev 3309)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-07-28
11:58:46 UTC (rev 3310)
@@ -6,16 +6,13 @@
import javax.enterprise.context.SessionScoped;
import javax.enterprise.context.spi.Context;
-import javax.enterprise.context.spi.Contextual;
-import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.IllegalProductException;
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.SpecAssertions;
import org.jboss.test.audit.annotations.SpecVersion;
-import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.jsr299.tck.impl.MockCreationalContext;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.Packaging;
import org.jboss.testharness.impl.packaging.PackagingType;
@@ -50,12 +47,12 @@
assert !beans.isEmpty();
}
- @Test(groups = { "contexts", "passivation",
"ri-broken"})
- @SpecAssertion(section = "6.6.1", id = "bb")
- public void testManagedBeanWithNonSerializableInterceptorClassNotOK()
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "6.6.1", id = "bc")
+ public void testManagedBeanWithSerializableDecoratorOK()
{
- Set<Bean<Kokkola2>> beans = getBeans(Kokkola2.class);
- assert beans.isEmpty();
+ Set<Bean<CityDecorator>> beans = getBeans(CityDecorator.class);
+ assert !beans.isEmpty();
}
@Test @SpecAssertion(section="6.6.2", id = "c")
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/UnderwaterCity.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/UnderwaterCity.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/UnderwaterCity.java 2009-07-28
11:58:46 UTC (rev 3310)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.context.passivating;
+
+class UnderwaterCity implements CityInterface
+{
+
+ public void foo()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/Interceptor_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/Interceptor_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/Interceptor_Broken.java 2009-07-28
11:58:46 UTC (rev 3310)
@@ -0,0 +1,13 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken15;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.InvocationContext;
+
+class Interceptor_Broken
+{
+ @AroundInvoke
+ public Object intercept(InvocationContext context) throws Exception
+ {
+ return context.proceed();
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/Kokkola_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/Kokkola_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/Kokkola_Broken.java 2009-07-28
11:58:46 UTC (rev 3310)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken15;
+
+import java.io.Serializable;
+
+import javax.enterprise.context.SessionScoped;
+import javax.interceptor.Interceptors;
+
+@SuppressWarnings("serial")
+@SessionScoped
+(a)Interceptors(Interceptor_Broken.class)
+class Kokkola_Broken implements Serializable
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/NonSerializableTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/NonSerializableTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/NonSerializableTest.java 2009-07-28
11:58:46 UTC (rev 3310)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken15;
+
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.testng.annotations.Test;
+
+public class NonSerializableTest
+{
+ @Test(groups = { "contexts", "passivation",
"ri-broken"})
+ @SpecAssertion(section = "6.6.1", id = "bb")
+ public void testManagedBeanWithNonSerializableInterceptorClassNotOK()
+ {
+ assert false;
+ }
+}
Show replies by date