Package org.apache.webbeans.cditest

Examples of org.apache.webbeans.cditest.CdiTestContainer.shutdownContainer()


        assertReq(cdi, 0);
        assertSess(cdi, DEFAULT_VAL);
        assertApp(cdi, DEFAULT_VAL);

        cdi.shutdownContainer();
    }

    private void assertAll(CdiTestContainer cdi, int value) {
        assertReq(cdi, value);
        assertSess(cdi, value);
View Full Code Here


            TestBean tb2 = bmp.getContextualReference(TestBean.class, "extraNameBean");
            Assert.assertNotNull(tb2);
        }
        finally
        {
            cdiContainer.shutdownContainer();
        }
    }
}
View Full Code Here

        final TwoSeconds bean = TwoSeconds.class.cast(beanManager.getReference(beanManager.resolve(beanManager.getBeans(type)), type, null));

        bean.twoSeconds();

        container.stopApplicationScope();
        container.shutdownContainer();

        final Counter perf = Repository.INSTANCE.getCounter(new Counter.Key(Role.PERFORMANCES, type.getName() + ".twoSeconds"));
        assertNotNull(perf);
        assertEquals(2000, TimeUnit.NANOSECONDS.toMillis((int) perf.getMax()), 200);
    }
View Full Code Here

        cdi.bootContainer();

        SessionScopedTestBean testReference = cdi.getInstance(SessionScopedTestBean.class);
        Assert.assertNotNull(testReference);

        cdi.shutdownContainer();
    }
}
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.