Package org.apache.webbeans.test.component.service

Examples of org.apache.webbeans.test.component.service.IService


        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;

        IService s = mc.service();

        Assert.assertNotNull(s);

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


        Assert.assertTrue(object instanceof Producer1ConsumerComponent);

        Producer1ConsumerComponent single = (Producer1ConsumerComponent) object;

        IService service = single.getService();

        Assert.assertNotNull(service);
        Assert.assertEquals(service, obj);

        ContextFactory.destroyApplicationContext(null);
View Full Code Here

        Assert.assertTrue(object instanceof Producer1ConsumerComponent);

        Producer1ConsumerComponent single = (Producer1ConsumerComponent) object;

        IService service = single.getService();

        Assert.assertNotNull(service);

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

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

        Object producerResult = getManager().getInstanceByName("service");
       
        IService producverService = (IService)producerResult;
       
        Assert.assertNotNull(producverService);
       
        Object disposalComp = getManager().getInstance(comps.get(1));
        Object object = getManager().getInstance(comps.get(0));

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

        DisposalMethodComponent mc = (DisposalMethodComponent) disposalComp;

        IService s = mc.service();

        Assert.assertNotNull(s);

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

        Assert.assertTrue(object instanceof Producer1ConsumerComponent);

        Producer1ConsumerComponent single = (Producer1ConsumerComponent) object;

        IService service = single.getService();

        Assert.assertNotNull(service);

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

        classes.add(ServiceImpl1.class);

        startContainer(classes, null);


        IService producedService = getInstance("service");
       
        Assert.assertNotNull(producedService);
       
        IService service = getInstance(IService.class);

        Assert.assertEquals("ServiceImpl1", service.service());

        DisposalMethodComponent mc = getInstance(DisposalMethodComponent.class);

        IService s = mc.service();

        Assert.assertNotNull(s);


        shutDownContainer();
View Full Code Here

TOP

Related Classes of org.apache.webbeans.test.component.service.IService

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.