Skip to content

Commit

Permalink
Enable and fix client proxy tests
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@269 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
pmuir committed Nov 6, 2008
1 parent 029b9cb commit 1ae5766
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
Expand Up @@ -8,14 +8,17 @@
import javax.webbeans.DefinitionException;
import javax.webbeans.NonexistentFieldException;
import javax.webbeans.NullableDependencyException;
import javax.webbeans.RequestScoped;
import javax.webbeans.manager.Bean;

import org.jboss.webbeans.bean.SimpleBean;
import org.jboss.webbeans.contexts.RequestContext;
import org.jboss.webbeans.test.beans.Fox;
import org.jboss.webbeans.test.beans.FoxRun;
import org.jboss.webbeans.test.beans.SpiderNest;
import org.jboss.webbeans.test.beans.SpiderProducer;
import org.jboss.webbeans.test.beans.Tuna;
import org.jboss.webbeans.test.beans.TunaFarm;
import org.jboss.webbeans.test.beans.broken.BeanWithFinalBoundField;
import org.jboss.webbeans.test.beans.broken.BeanWithStaticBoundField;
import org.jboss.webbeans.test.beans.broken.FarmHouse;
Expand Down Expand Up @@ -49,7 +52,14 @@ public void testPrimitiveInjectionPointResolvesToNullableWebBean() throws Except
@Test(groups={"injection", "clientProxy"}, expectedExceptions=ContextNotActiveException.class) @SpecAssertion(section="4.3")
public void testInvokeNormalInjectedWebBeanWhenContextNotActive()
{

SimpleBean<TunaFarm> tunaFarmBean = createSimpleWebBean(TunaFarm.class, manager);
Bean<Tuna> tunaBean = createSimpleWebBean(Tuna.class, manager);
manager.addBean(tunaBean);
TunaFarm tunaFarm = tunaFarmBean.create();
assert tunaFarm.tuna != null;
RequestContext requestContext = (RequestContext) manager.getContext(RequestScoped.class);
requestContext.setActive(false);
tunaFarm.tuna.getName();
}

@Test(groups="injection") @SpecAssertion(section="4.3")
Expand Down
Expand Up @@ -8,5 +8,10 @@
@RequestScoped
public class Tuna
{

public String getName()
{
return "Ophir";
}

}
2 changes: 1 addition & 1 deletion webbeans-ri/testng.xml
Expand Up @@ -20,7 +20,7 @@
<exclude name="interceptors" />
<exclude name="decorators" />
<exclude name="servlet" />
<exclude name="clientProxy" />

<exclude name="passivation" />
<exclude name="enterpriseBeans" />
<exclude name="removeMethod" />
Expand Down

0 comments on commit 1ae5766

Please sign in to comment.