Package org.apache.openejb.testing

Examples of org.apache.openejb.testing.ApplicationComposers.before()


public class EnsureRequestScopeThreadLocalIsCleanUpTest {
    @Test
    public void runAndCheckThreadLocal() throws Exception {
        final ApplicationComposers composers = new ApplicationComposers(EnsureRequestScopeThreadLocalIsCleanUpTest.class);
        composers.before(this);
        final CdiAppContextsService contextsService = CdiAppContextsService.class.cast(WebBeansContext.currentInstance().getService(ContextsService.class));
        assertNotNull(contextsService.getCurrentContext(RequestScoped.class));
        assertNotNull(contextsService.getCurrentContext(SessionScoped.class));
        composers.after();
        assertNull(contextsService.getCurrentContext(RequestScoped.class));
View Full Code Here


    }

    @Test
    public void ensureRequestContextCanBeRestarted() throws Exception {
        final ApplicationComposers composers = new ApplicationComposers(EnsureRequestScopeThreadLocalIsCleanUpTest.class);
        composers.before(this);
        final CdiAppContextsService contextsService = CdiAppContextsService.class.cast(WebBeansContext.currentInstance().getService(ContextsService.class));
        final Context req1 = contextsService.getCurrentContext(RequestScoped.class);
        assertNotNull(req1);
        final Context session1 = contextsService.getCurrentContext(SessionScoped.class);
        assertNotNull(session1);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.