Package org.apache.webbeans.test.component.intercept.webbeans

Examples of org.apache.webbeans.test.component.intercept.webbeans.SecureAndTransactionalComponent


    {
        ContextFactory.initSessionContext(new MockHttpSession());
        defineSimpleWebBeanInterceptor(SecureAndTransactionalInterceptor.class);
       
        Bean<SecureAndTransactionalComponent> bean = defineSimpleWebBean(SecureAndTransactionalComponent.class);
        SecureAndTransactionalComponent payment = getManager().getInstance(bean);
       
        Assert.assertFalse(SecureAndTransactionalComponent.CALL);
       
        payment.pay();
       
        Assert.assertTrue(SecureAndTransactionalComponent.CALL);
       
               
        ContextFactory.destroySessionContext(new MockHttpSession());
View Full Code Here


    {
        ContextFactory.initSessionContext(null);
        defineInterceptor(SecureAndTransactionalInterceptor.class);
       
        Bean<SecureAndTransactionalComponent> bean = defineManagedBean(SecureAndTransactionalComponent.class);
        SecureAndTransactionalComponent payment = getManager().getInstance(bean);
       
        Assert.assertFalse(SecureAndTransactionalComponent.getCALL());
       
        payment.pay();
       
        Assert.assertTrue(SecureAndTransactionalComponent.getCALL());
       
               
        ContextFactory.destroySessionContext(null);
View Full Code Here

    {
        ContextFactory.initSessionContext(new MockHttpSession());
        defineInterceptor(SecureAndTransactionalInterceptor.class);
       
        Bean<SecureAndTransactionalComponent> bean = defineManagedBean(SecureAndTransactionalComponent.class);
        SecureAndTransactionalComponent payment = getManager().getInstance(bean);
       
        Assert.assertFalse(SecureAndTransactionalComponent.getCALL());
       
        payment.pay();
       
        Assert.assertTrue(SecureAndTransactionalComponent.getCALL());
       
               
        ContextFactory.destroySessionContext(new MockHttpSession());
View Full Code Here

    {
        ContextFactory.initSessionContext(new MockHttpSession());
        defineSimpleWebBeanInterceptor(SecureAndTransactionalInterceptor.class);
       
        Bean<SecureAndTransactionalComponent> bean = defineSimpleWebBean(SecureAndTransactionalComponent.class);
        SecureAndTransactionalComponent payment = getManager().getInstance(bean);
       
        Assert.assertFalse(SecureAndTransactionalComponent.getCALL());
       
        payment.pay();
       
        Assert.assertTrue(SecureAndTransactionalComponent.getCALL());
       
               
        ContextFactory.destroySessionContext(new MockHttpSession());
View Full Code Here

        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
        contextFactory.initSessionContext(null);
        defineInterceptor(SecureAndTransactionalInterceptor.class);
       
        Bean<SecureAndTransactionalComponent> bean = defineManagedBean(SecureAndTransactionalComponent.class);
        SecureAndTransactionalComponent payment = getManager().getInstance(bean);
       
        Assert.assertFalse(SecureAndTransactionalComponent.getCALL());
       
        payment.pay();
       
        Assert.assertTrue(SecureAndTransactionalComponent.getCALL());


        contextFactory.destroySessionContext(null);
View Full Code Here

        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
        contextFactory.initSessionContext(null);
        defineInterceptor(SecureAndTransactionalInterceptor.class);
       
        Bean<SecureAndTransactionalComponent> bean = defineManagedBean(SecureAndTransactionalComponent.class);
        SecureAndTransactionalComponent payment = getManager().getInstance(bean);
       
        Assert.assertFalse(SecureAndTransactionalComponent.getCALL());
       
        payment.pay();
       
        Assert.assertTrue(SecureAndTransactionalComponent.getCALL());


        contextFactory.destroySessionContext(null);
View Full Code Here

TOP

Related Classes of org.apache.webbeans.test.component.intercept.webbeans.SecureAndTransactionalComponent

Copyright © 2018 www.massapicom. 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.