Search in sources :

Example 1 with Foo

use of org.apache.deltaspike.cdise.openejb.bean.Foo in project deltaspike by apache.

the class OpenEJbContainerControlConfigurationTest method basicInjection.

@Test
public // useless because of tcks but nice to have when working on this specific container
void basicInjection() {
    final CdiContainer container = CdiContainerLoader.getCdiContainer();
    container.boot();
    try {
        final BeanManager beanManager = container.getBeanManager();
        assertEquals("foo", Foo.class.cast(beanManager.getReference(beanManager.resolve(beanManager.getBeans(Foo.class)), Foo.class, null)).name());
    } finally {
        container.shutdown();
    }
}
Also used : Foo(org.apache.deltaspike.cdise.openejb.bean.Foo) BeanManager(javax.enterprise.inject.spi.BeanManager) CdiContainer(org.apache.deltaspike.cdise.api.CdiContainer) Test(org.junit.Test)

Aggregations

BeanManager (javax.enterprise.inject.spi.BeanManager)1 CdiContainer (org.apache.deltaspike.cdise.api.CdiContainer)1 Foo (org.apache.deltaspike.cdise.openejb.bean.Foo)1 Test (org.junit.Test)1