Mark, I think Aslak watches this list loosely, you're probably best off to ask on the Arquillian forums at community.jboss.org.
Sent from my iPhone On Nov 29, 2011, at 8:59, Mark Struberg <[email protected]> wrote: > Hi folks! > > I'm not sure if this is the right list, but I have some Arquillian questions. > > I have a testng test for services which use a @RequestScoped EntityManager: > > > MyTest extends Arquillian { > > private @Inject EntityManager em; > private @Inject MyService mySvc; > > @BeforeClass > public void setupTests() { > em.getTransaction().begin(); > em.delete(em.find(MyEntity.class, TEST_ID)); > em.getTransaction().commit(); > } > > @Test > public void test1() { > mySvc.doDbStuff1(); > } > > @Test > public void test2() { > mySvc.doDbStuff2(); > } > } > > Since my service methods in the tests and @BeforeClass @AfterClass, etc all > use the @RequestScoped EntityManager, each of those methods needs to get > treated like an own Request. > > Also: is there some way to manually restart the RequestContext? This is e.g. > needed to simulate some issues with detached entities. I basically need full > programmatical control over the various Context start/stop in my unit tests! > > LieGrue, > strub > > _______________________________________________ > seam-dev mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/seam-dev _______________________________________________ seam-dev mailing list [email protected] https://lists.jboss.org/mailman/listinfo/seam-dev
