[webbeans-commits] Webbeans SVN: r276 - ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Fri Nov 7 12:49:48 EST 2008
Author: gavin.king at jboss.com
Date: 2008-11-07 12:49:48 -0500 (Fri, 07 Nov 2008)
New Revision: 276
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionTests.java
Log:
test @PostConstruct after injection
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionTests.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionTests.java 2008-11-07 17:49:25 UTC (rev 275)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionTests.java 2008-11-07 17:49:48 UTC (rev 276)
@@ -13,6 +13,8 @@
import org.jboss.webbeans.bean.SimpleBean;
import org.jboss.webbeans.contexts.RequestContext;
+import org.jboss.webbeans.test.beans.Farm;
+import org.jboss.webbeans.test.beans.FarmOffice;
import org.jboss.webbeans.test.beans.Fox;
import org.jboss.webbeans.test.beans.FoxRun;
import org.jboss.webbeans.test.beans.SpiderNest;
@@ -49,6 +51,18 @@
farmHouseBean.create();
}
+ @Test(groups={"injection", "postConstruct"}) @SpecAssertion(section="4.2")
+ public void testPostConstruct() throws Exception
+ {
+ Bean<FarmOffice> farmOfficeBean = createSimpleWebBean(FarmOffice.class, manager);
+ Bean<Farm> farmBean = createSimpleWebBean(Farm.class, manager);
+ manager.addBean(farmOfficeBean);
+ manager.addBean(farmBean);
+ Farm farm = farmBean.create();
+ assert farm.founded!=null;
+ assert farm.initialStaff==20;
+ }
+
@Test(groups={"injection", "clientProxy"}, expectedExceptions=ContextNotActiveException.class) @SpecAssertion(section="4.3")
public void testInvokeNormalInjectedWebBeanWhenContextNotActive()
{
More information about the weld-commits
mailing list