Package org.apache.webbeans.test.component

Examples of org.apache.webbeans.test.component.PostConstructComponent


        Object object2 = getManager().getInstance(comps.get(1));

        Assert.assertTrue(object instanceof CheckWithCheckPayment);
        Assert.assertTrue(object2 instanceof PostConstructComponent);

        PostConstructComponent pcc = (PostConstructComponent) object2;

        pcc.getP();

        ComponentImpl<PostConstructComponent> s = (ComponentImpl<PostConstructComponent>) comps.get(1);
        List<InterceptorData> stack = s.getInterceptorStack();

        Assert.assertEquals(1, stack.size());

        Assert.assertNotNull(pcc.getP());
        Assert.assertSame(object, pcc.getP());

        ContextFactory.destroyRequestContext(null);
    }
View Full Code Here


        Object object2 = getManager().getInstance(comps.get(1));

        Assert.assertTrue(object instanceof CheckWithCheckPayment);
        Assert.assertTrue(object2 instanceof PostConstructComponent);

        PostConstructComponent pcc = (PostConstructComponent) object2;

        CheckWithCheckPayment chk = (CheckWithCheckPayment) pcc.getP();

        ManagedBean<PostConstructComponent> s = (ManagedBean<PostConstructComponent>) comps.get(1);
        List<InterceptorData> stack = s.getInterceptorStack();

        Assert.assertEquals(1, stack.size());

        Assert.assertNotNull(pcc.getP());
        Assert.assertSame(object.getValue(), chk.getValue());

        ContextFactory.destroyRequestContext(null);
    }
View Full Code Here

        Object object2 = getManager().getInstance(comps.get(1));

        Assert.assertTrue(object instanceof CheckWithCheckPayment);
        Assert.assertTrue(object2 instanceof PostConstructComponent);

        PostConstructComponent pcc = (PostConstructComponent) object2;

        CheckWithCheckPayment chk = (CheckWithCheckPayment) pcc.getP();

        ManagedBean<PostConstructComponent> s = (ManagedBean<PostConstructComponent>) comps.get(1);
        List<InterceptorData> stack = s.getInterceptorStack();

        Assert.assertEquals(1, stack.size());

        Assert.assertNotNull(pcc.getP());
        Assert.assertSame(object.getValue(), chk.getValue());

        ContextFactory.destroyRequestContext(null);
    }
View Full Code Here

        Object object2 = getManager().getInstance(comps.get(1));

        Assert.assertTrue(object instanceof CheckWithCheckPayment);
        Assert.assertTrue(object2 instanceof PostConstructComponent);

        PostConstructComponent pcc = (PostConstructComponent) object2;

        pcc.getP();

        ManagedBean<PostConstructComponent> s = (ManagedBean<PostConstructComponent>) comps.get(1);
        List<InterceptorData> stack = s.getInterceptorStack();

        Assert.assertEquals(1, stack.size());

        Assert.assertNotNull(pcc.getP());
        Assert.assertSame(object, pcc.getP());

        ContextFactory.destroyRequestContext(null);
    }
View Full Code Here

        Object object2 = getManager().getInstance(comps.get(1));

        Assert.assertTrue(object instanceof CheckWithCheckPayment);
        Assert.assertTrue(object2 instanceof PostConstructComponent);

        PostConstructComponent pcc = (PostConstructComponent) object2;

        pcc.getP();

        ComponentImpl<PostConstructComponent> s = (ComponentImpl<PostConstructComponent>) comps.get(1);
        List<InterceptorData> stack = s.getInterceptorStack();

        Assert.assertEquals(1, stack.size());

        Assert.assertNotNull(pcc.getP());
        Assert.assertEquals(object, pcc.getP());

        ContextFactory.destroyRequestContext(null);
    }
View Full Code Here

    public void testTypedComponent() throws Throwable
    {
        startContainer(CheckWithCheckPayment.class, PostConstructComponent.class);

        CheckWithCheckPayment object = getInstance("checkWithCheckPayment");
        PostConstructComponent pcc = getInstance(PostConstructComponent.class);

        CheckWithCheckPayment chk = (CheckWithCheckPayment) pcc.getP();

        Assert.assertNotNull(pcc.getP());
        Assert.assertSame(object.getValue(), chk.getValue());
    }
View Full Code Here

        Object object2 = getManager().getInstance(comps.get(1));

        Assert.assertTrue(object instanceof CheckWithCheckPayment);
        Assert.assertTrue(object2 instanceof PostConstructComponent);

        PostConstructComponent pcc = (PostConstructComponent) object2;

        CheckWithCheckPayment chk = (CheckWithCheckPayment) pcc.getP();

        ManagedBean<PostConstructComponent> s = (ManagedBean<PostConstructComponent>) comps.get(1);
        List<InterceptorData> stack = s.getInterceptorStack();

        Assert.assertEquals(1, stack.size());

        Assert.assertNotNull(pcc.getP());
        Assert.assertSame(object.getValue(), chk.getValue());

        contextFactory.destroyRequestContext(null);
    }
View Full Code Here

TOP

Related Classes of org.apache.webbeans.test.component.PostConstructComponent

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.