[weld-commits] Weld SVN: r6170 - core/trunk/tests/src/test/java/org/jboss/weld/tests/serialization.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Wed Apr 28 04:19:39 EDT 2010


Author: nickarls
Date: 2010-04-28 04:19:38 -0400 (Wed, 28 Apr 2010)
New Revision: 6170

Added:
   core/trunk/tests/src/test/java/org/jboss/weld/tests/serialization/Mock.java
Modified:
   core/trunk/tests/src/test/java/org/jboss/weld/tests/serialization/SerializationTest.java
   core/trunk/tests/src/test/java/org/jboss/weld/tests/serialization/TestConversationManager.java
Log:
unbreak test. why can't I use specialize on the TCM?

Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/serialization/Mock.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/serialization/Mock.java	                        (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/serialization/Mock.java	2010-04-28 08:19:38 UTC (rev 6170)
@@ -0,0 +1,22 @@
+package org.jboss.weld.tests.serialization;
+
+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.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+ at Target( { TYPE, METHOD, PARAMETER, FIELD })
+ at Retention(RUNTIME)
+ at Documented
+ at Qualifier
+ at Inherited
+public @interface Mock {
+}
\ No newline at end of file

Modified: core/trunk/tests/src/test/java/org/jboss/weld/tests/serialization/SerializationTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/serialization/SerializationTest.java	2010-04-27 23:32:18 UTC (rev 6169)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/serialization/SerializationTest.java	2010-04-28 08:19:38 UTC (rev 6170)
@@ -19,6 +19,7 @@
 import java.io.Serializable;
 
 import javax.enterprise.inject.IllegalProductException;
+import javax.enterprise.util.AnnotationLiteral;
 
 import org.jboss.testharness.impl.packaging.Artifact;
 import org.jboss.weld.test.AbstractWeldTest;
@@ -33,7 +34,9 @@
    public void testConversationManagerSerializable()
       throws Exception
    {
-      TestConversationManager cMgr = getReference(TestConversationManager.class);
+      TestConversationManager cMgr = getReference(TestConversationManager.class, new AnnotationLiteral<Mock>()
+      {
+      });
       
       assert cMgr.getConversationInstance() != null;
       

Modified: core/trunk/tests/src/test/java/org/jboss/weld/tests/serialization/TestConversationManager.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/serialization/TestConversationManager.java	2010-04-27 23:32:18 UTC (rev 6169)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/serialization/TestConversationManager.java	2010-04-28 08:19:38 UTC (rev 6170)
@@ -18,13 +18,11 @@
 
 import java.lang.reflect.Field;
 
-import javax.enterprise.context.Dependent;
-
 import org.jboss.weld.conversation.AbstractConversationManager;
 import org.jboss.weld.conversation.ConversationImpl;
 import org.jboss.weld.conversation.ServletConversationManager;
 
- at Dependent
+ at Mock
 public class TestConversationManager extends ServletConversationManager
 {
    private static final long serialVersionUID = 2;



More information about the weld-commits mailing list