openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1361719 - /openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/injectiontarget/ReplaceInjectionTargetTest.java
Date Sun, 15 Jul 2012 16:01:52 GMT
Author: rmannibucau
Date: Sun Jul 15 16:01:51 2012
New Revision: 1361719

URL: http://svn.apache.org/viewvc?rev=1361719&view=rev
Log:
OWB-673 the test was false (the extension was not correct). Thanks Mark

Modified:
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/injectiontarget/ReplaceInjectionTargetTest.java

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/injectiontarget/ReplaceInjectionTargetTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/injectiontarget/ReplaceInjectionTargetTest.java?rev=1361719&r1=1361718&r2=1361719&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/injectiontarget/ReplaceInjectionTargetTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/injectiontarget/ReplaceInjectionTargetTest.java
Sun Jul 15 16:01:51 2012
@@ -24,6 +24,7 @@ import java.util.Set;
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.event.Observes;
 import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.Extension;
 import javax.enterprise.inject.spi.InjectionPoint;
 import javax.enterprise.inject.spi.InjectionTarget;
 import javax.enterprise.inject.spi.ProcessInjectionTarget;
@@ -81,7 +82,7 @@ public class ReplaceInjectionTargetTest 
         }
     }
 
-    public static class InjectionTargetReplacer {
+    public static class InjectionTargetReplacer implements Extension {
         public void replaceInjectionTarget(@Observes ProcessInjectionTarget<IJBean>
event) {
             event.setInjectionTarget(new MyInjectionTarget(event.getInjectionTarget()));
         }
@@ -89,12 +90,13 @@ public class ReplaceInjectionTargetTest 
 
     @Test
     public void checkCustomWrapperIsUsed() {
+        addExtension(new InjectionTargetReplacer());
+
         final Collection<String> beanXmls = new ArrayList<String>();
 
         final Collection<Class<?>> beanClasses = new ArrayList<Class<?>>();
         beanClasses.add(IJBean.class);
         beanClasses.add(InjectedBean.class);
-        beanClasses.add(InjectionTargetReplacer.class);
 
         startContainer(beanClasses, beanXmls);
 



Mime
View raw message