openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1413537 - in /openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/lifecycle: LifecycleBean.java LifecycleTest.java
Date Mon, 26 Nov 2012 10:08:56 GMT
Author: struberg
Date: Mon Nov 26 10:08:55 2012
New Revision: 1413537

URL: http://svn.apache.org/viewvc?rev=1413537&view=rev
Log:
cleanup lifecycle test 

Modified:
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/lifecycle/LifecycleBean.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/lifecycle/LifecycleTest.java

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/lifecycle/LifecycleBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/lifecycle/LifecycleBean.java?rev=1413537&r1=1413536&r2=1413537&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/lifecycle/LifecycleBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/lifecycle/LifecycleBean.java
Mon Nov 26 10:08:55 2012
@@ -23,7 +23,6 @@ import javax.inject.Inject;
 import javax.inject.Named;
 
 @LifecycleBinding
-@Named("org.apache.webbeans.newtests.interceptors.lifecycle.LifecycleBean")
 public class LifecycleBean
 {
     public static String CONSTRUCTOR_INJECTED = null; 

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/lifecycle/LifecycleTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/lifecycle/LifecycleTest.java?rev=1413537&r1=1413536&r2=1413537&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/lifecycle/LifecycleTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/lifecycle/LifecycleTest.java
Mon Nov 26 10:08:55 2012
@@ -54,13 +54,13 @@ public class LifecycleTest extends Abstr
 
         startContainer(beanClasses, beanXmls);        
         
-        Set<Bean<?>> beans = getBeanManager().getBeans("org.apache.webbeans.newtests.interceptors.lifecycle.LifecycleBean");
-        Assert.assertNotNull(beans);        
+        Set<Bean<?>> beans = getBeanManager().getBeans(LifecycleBean.class);
+        Assert.assertNotNull(beans);
         Bean<LifecycleBean> lifecycleBean = (Bean<LifecycleBean>)beans.iterator().next();
+
+        CreationalContext<LifecycleBean> creationalContext = getBeanManager().createCreationalContext(lifecycleBean);
         
-        CreationalContext<LifecycleBean> ctx = getBeanManager().createCreationalContext(lifecycleBean);
-        
-        Object reference = getBeanManager().getReference(lifecycleBean, LifecycleBean.class,
ctx);
+        Object reference = getBeanManager().getReference(lifecycleBean, LifecycleBean.class,
creationalContext);
         Assert.assertNotNull(reference);
         
         Assert.assertTrue(reference instanceof LifecycleBean);
@@ -71,7 +71,7 @@ public class LifecycleTest extends Abstr
         
         Assert.assertTrue(!LifecycleInterceptor.PRE_DESTROY);
         
-        lifecycleBean.destroy((LifecycleBean)reference, ctx);
+        lifecycleBean.destroy((LifecycleBean)reference, creationalContext);
         
         shutDownContainer();
         



Mime
View raw message