Skip to content

Commit

Permalink
make tests pass i/c, slight reorg
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@2916 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
pmuir committed Jun 28, 2009
1 parent 9a7c754 commit d158131
Show file tree
Hide file tree
Showing 25 changed files with 49 additions and 50 deletions.
Expand Up @@ -23,7 +23,6 @@
import org.jboss.webbeans.bean.ForwardingBean;
import org.jboss.webbeans.literal.CurrentLiteral;
import org.jboss.webbeans.test.AbstractWebBeansTest;
import org.jboss.webbeans.test.unit.implementation.enterprise.lifecycle.MockCreationalContext;
import org.testng.annotations.Test;


Expand Down Expand Up @@ -190,7 +189,7 @@ public void testBeanBelongingToParentActivityCanBeInjectedIntoChildActivityBean(
BeanManager childActivity = getCurrentManager().createActivity();
Bean<?> dummyBean = createDummyBean(childActivity, Cow.class);
childActivity.addBean(dummyBean);
assert childActivity.getInjectableReference(dummyBean.getInjectionPoints().iterator().next(), new MockCreationalContext<Cow>()) != null;
assert childActivity.getInjectableReference(dummyBean.getInjectionPoints().iterator().next(), childActivity.createCreationalContext(dummyBean)) != null;
}

@Test
Expand Down
Expand Up @@ -11,7 +11,7 @@ class Donkey

public Donkey() throws NamingException
{
beanManager = (BeanManager) new InitialContext().lookup("java:app/Manager");
beanManager = (BeanManager) new InitialContext().lookup("java:app/BeanManager");
}

public BeanManager getManager()
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -0,0 +1,6 @@
package org.jboss.webbeans.test.unit.environments.servlet;

interface Animal
{

}
@@ -0,0 +1,6 @@
package org.jboss.webbeans.test.unit.environments.servlet;

interface DeadlyAnimal
{

}
@@ -0,0 +1,6 @@
package org.jboss.webbeans.test.unit.environments.servlet;

interface DeadlySpider extends DeadlyAnimal
{

}
@@ -0,0 +1,6 @@
package org.jboss.webbeans.test.unit.environments.servlet;

class DefangedTarantula extends Tarantula
{

}
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.bootstrap.environments;
package org.jboss.webbeans.test.unit.environments.servlet;

import javax.ejb.Remove;
import javax.ejb.Stateful;
Expand Down
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.bootstrap.environments;
package org.jboss.webbeans.test.unit.environments.servlet;

import javax.ejb.Local;

Expand Down
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.bootstrap.environments;
package org.jboss.webbeans.test.unit.environments.servlet;

import javax.enterprise.inject.Named;
import javax.enterprise.inject.deployment.Production;
Expand Down
@@ -0,0 +1,6 @@
package org.jboss.webbeans.test.unit.environments.servlet;

interface ScottishFish extends Animal
{

}
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.bootstrap.environments;
package org.jboss.webbeans.test.unit.environments.servlet;

import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.deployment.Production;
Expand Down
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.bootstrap.environments;
package org.jboss.webbeans.test.unit.environments.servlet;

import java.util.Arrays;
import java.util.HashMap;
Expand Down
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.servlet;
package org.jboss.webbeans.test.unit.environments.servlet;

import javax.servlet.http.HttpSession;

Expand Down Expand Up @@ -26,7 +26,7 @@
@Classes(ConversationManager.class)
public class ServletLifecycleTest extends AbstractWebBeansTest
{
@Test(groups = "contexts")
@Test(groups = "incontainer-broken")
public void testEndSessionWithActiveRequestAndSessionContexts()
{
ServletLifecycle servletLifecycle = new ServletLifecycle(new ContextLifecycle());
Expand All @@ -44,7 +44,7 @@ public void testEndSessionWithActiveRequestAndSessionContexts()
assert Boolean.TRUE.equals(RequestContext.instance().isActive()) : "Request context should still be active";
}

@Test(groups = "contexts")
@Test(groups = "incontainer-broken")
public void testEndSessionWithActiveRequestContextOnly()
{
ServletLifecycle servletLifecycle = new ServletLifecycle(new ContextLifecycle());
Expand All @@ -58,7 +58,7 @@ public void testEndSessionWithActiveRequestContextOnly()
assert Boolean.TRUE.equals(RequestContext.instance().isActive()) : "Request context should still be active";
}

@Test(groups = "contexts")
@Test(groups = "incontainer-broken")
public void testEndSessionWithNoActiveRequestOrSessionContexts()
{
ServletLifecycle servletLifecycle = new ServletLifecycle(new ContextLifecycle());
Expand All @@ -69,7 +69,7 @@ public void testEndSessionWithNoActiveRequestOrSessionContexts()
assert Boolean.FALSE.equals(RequestContext.instance().isActive()) : "Temporary request context should have been deactivated";
}

@BeforeMethod(groups = "contexts")
@BeforeMethod(groups = "incontainer-broken")
public void beforeMethod()
{
RequestContext.instance().setBeanStore(null);
Expand Down
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.bootstrap.environments;
package org.jboss.webbeans.test.unit.environments.servlet;

import javax.ejb.EJB;
import javax.enterprise.inject.Named;
Expand Down
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.bootstrap.environments;
package org.jboss.webbeans.test.unit.environments.servlet;

class Spider implements Animal
{
Expand Down
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.bootstrap.environments;
package org.jboss.webbeans.test.unit.environments.servlet;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
Expand Down
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.bootstrap.environments;
package org.jboss.webbeans.test.unit.environments.servlet;

class Tarantula extends Spider implements DeadlySpider
{
Expand Down
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.bootstrap.environments;
package org.jboss.webbeans.test.unit.environments.servlet;

import javax.enterprise.inject.Produces;

Expand Down
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.bootstrap.environments;
package org.jboss.webbeans.test.unit.environments.servlet;

import javax.enterprise.context.RequestScoped;

Expand Down
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.bootstrap.environments;
package org.jboss.webbeans.test.unit.environments.servlet;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
Expand Down

0 comments on commit d158131

Please sign in to comment.