Examples of CreationalContextImpl


Examples of org.apache.webbeans.context.creational.CreationalContextImpl

        ContextFactory.initRequestContext(null);

        Assert.assertEquals(2, comps.size());

        Object object = getContext(RequestScoped.class).get(comps.get(0), new CreationalContextImpl());
        Object object2 = getContext(RequestScoped.class).get(comps.get(1), new CreationalContextImpl());

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

        PreDestroyComponent pcc = (PreDestroyComponent) object2;
View Full Code Here

Examples of org.apache.webbeans.context.creational.CreationalContextImpl

        ContextFactory.initRequestContext(null);

        Assert.assertEquals(3, comps.size());

        getContext(RequestScoped.class).get(comps.get(0), new CreationalContextImpl());
        getContext(RequestScoped.class).get(comps.get(1), new CreationalContextImpl());

        Object object = getContext(RequestScoped.class).get(comps.get(2), new CreationalContextImpl());
        Assert.assertNotNull(object);
        Assert.assertTrue(object instanceof PaymentProcessorComponent);

        PaymentProcessorComponent uc = (PaymentProcessorComponent) object;
        IPayment p = uc.getPaymentCheck();
View Full Code Here

Examples of org.apache.webbeans.context.creational.CreationalContextImpl

        ContextFactory.initRequestContext(null);
        ContextFactory.initSessionContext(session);

        Assert.assertEquals(3, comps.size());

        ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(0), new CreationalContextImpl());
        ManagerImpl.getManager().getContext(RequestScoped.class).get(comps.get(1), new CreationalContextImpl());

        Object object = ManagerImpl.getManager().getContext(RequestScoped.class).get(comps.get(2), new CreationalContextImpl());

        Assert.assertTrue(object instanceof ContaintsCurrentComponent);

        ContaintsCurrentComponent i = (ContaintsCurrentComponent) object;
View Full Code Here

Examples of org.apache.webbeans.context.creational.CreationalContextImpl

        HttpSession session = getSession();
        ContextFactory.initSessionContext(session);

        Assert.assertEquals(2, comps.size());

        getContext(SessionScoped.class).get(comps.get(0), new CreationalContextImpl());
        Object object = getContext(SessionScoped.class).get(comps.get(1), new CreationalContextImpl());

        Assert.assertTrue(object instanceof NonBindingComponent);

        NonBindingComponent comp = (NonBindingComponent) object;
        BindingComponent bc = comp.getComponent();
View Full Code Here

Examples of org.apache.webbeans.context.creational.CreationalContextImpl

        List<AbstractComponent<?>> comps = getComponents();

        Assert.assertEquals(3, comps.size());

        NewComponent comp = (NewComponent) getContext(RequestScoped.class).get(comps.get(2), new CreationalContextImpl());

        DependentOwnerComponent own = comp.owner();

        Assert.assertNotNull(own);
View Full Code Here

Examples of org.apache.webbeans.context.creational.CreationalContextImpl

        ContextFactory.initRequestContext(null);
        ContextFactory.initSessionContext(session);

        Assert.assertEquals(2, comps.size());

        UserComponent userComponent = (UserComponent) ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(0), new CreationalContextImpl());
        userComponent.setName("Gurkan");
        userComponent.setSurname("Erdogdu");

        Assert.assertNotNull(userComponent);

        Object object = ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(1), new CreationalContextImpl());
        Assert.assertNotNull(object);
        Assert.assertTrue(object instanceof ContainUserComponent);

        ContainUserComponent uc = (ContainUserComponent) object;
View Full Code Here

Examples of org.apache.webbeans.context.creational.CreationalContextImpl

        ContextFactory.initSessionContext(session);

        Assert.assertEquals(2, comps.size());

        getContext(SessionScoped.class).get(comps.get(0), new CreationalContextImpl());

        Object object = getContext(SessionScoped.class).get(comps.get(1), new CreationalContextImpl());

        Assert.assertTrue(object instanceof TypedInjection);

        TypedInjection i = (TypedInjection) object;
View Full Code Here

Examples of org.apache.webbeans.context.creational.CreationalContextImpl

        ContextFactory.initSessionContext(session);

        Assert.assertEquals(2, comps.size());

        getContext(SessionScoped.class).get(comps.get(0), new CreationalContextImpl());
        Object object = getContext(SessionScoped.class).get(comps.get(1), new CreationalContextImpl());

        Assert.assertTrue(object instanceof TypedInjectionWithoutArguments);

        TypedInjectionWithoutArguments i = (TypedInjectionWithoutArguments) object;
View Full Code Here

Examples of org.apache.webbeans.context.creational.CreationalContextImpl

        ContextFactory.initRequestContext(null);
        ContextFactory.initApplicationContext(null);

        Assert.assertEquals(2, comps.size());

        Object producerResult = getContext(ApplicationScoped.class).get(getManager().resolveByName("service").iterator().next(), new CreationalContextImpl());
       
        IService producverService = (IService)producerResult;
       
        Object disposalComp = getContext(RequestScoped.class).get(comps.get(1));
        Object object = getContext(ApplicationScoped.class).get(comps.get(0), new CreationalContextImpl());

        Assert.assertTrue(object instanceof ServiceImpl1);
        Assert.assertTrue(disposalComp instanceof DisposalMethodComponent);

        DisposalMethodComponent mc = (DisposalMethodComponent) disposalComp;
View Full Code Here

Examples of org.apache.webbeans.context.creational.CreationalContextImpl

        List<AbstractComponent<?>> comps = getComponents();

        Assert.assertEquals(2, comps.size());

        DependentOwnerComponent comp = (DependentOwnerComponent) getContext(RequestScoped.class).get(comps.get(1), new CreationalContextImpl());

        DependentComponent dc = comp.getDependent();

        Assert.assertNotNull(dc);
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.