Skip to content

Commit

Permalink
use BeanManagerLocator
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Nov 3, 2009
1 parent c5f5a2f commit 8465867
Showing 1 changed file with 1 addition and 7 deletions.
Expand Up @@ -21,9 +21,7 @@
import org.jboss.testharness.AbstractTest;
import org.jboss.testharness.impl.runner.servlet.ServletTestRunner;
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.mock.MockServletContext;
import org.jboss.weld.mock.el.EL;
import org.jboss.weld.servlet.ServletHelper;
import org.jboss.weld.util.collections.EnumerationList;
import org.testng.ITestContext;
import org.testng.annotations.AfterClass;
Expand Down Expand Up @@ -57,10 +55,6 @@ public void beforeClass() throws Throwable
{
servletContext = ServletTestRunner.getCurrentServletContext();
}
else
{
servletContext = new MockServletContext("");
}

}

Expand Down Expand Up @@ -133,7 +127,7 @@ protected Object deserialize(byte[] bytes) throws IOException, ClassNotFoundExce

protected BeanManagerImpl getCurrentManager()
{
return ServletHelper.getModuleBeanManager(servletContext);
return BeanManagerLocator.INSTANCE.locate();
}

public boolean isExceptionInHierarchy(Throwable exception, Class<? extends Throwable> expectedException )
Expand Down

0 comments on commit 8465867

Please sign in to comment.