Search in sources :

Example 1 with Fabric8Extension

use of io.fabric8.cdi.Fabric8Extension in project fabric8 by fabric8io.

the class EndpointsInternalTest method setUpClass.

@BeforeClass
public static void setUpClass() {
    MockConfigurer.configure();
    weld = new Weld().disableDiscovery().extensions(new Fabric8Extension()).beanClasses(RandomEndpointToUrl.class, ServiceListInstanceWithEndpoint.class, ServiceInstanceWithEndpoint.class, ServiceListWithoutEndpoint.class, ServiceListInstanceWithEndpoint2.class, ServiceListInstanceWithEndpoint.class, ServiceListInstanceWithEndpoint2.class, ServiceInstanceWithMultiPortEndpoint.class, ServiceInstanceUsingFactoryAndEndpoints.class).initialize();
}
Also used : Weld(org.jboss.weld.environment.se.Weld) Fabric8Extension(io.fabric8.cdi.Fabric8Extension) BeforeClass(org.junit.BeforeClass)

Example 2 with Fabric8Extension

use of io.fabric8.cdi.Fabric8Extension in project fabric8 by fabric8io.

the class NoNamespaceTest method createInstance.

void createInstance(Class type) {
    WeldContainer weld = new Weld().disableDiscovery().extensions(new Fabric8Extension()).beanClasses(MyBean.class).initialize();
    CreationalContext ctx = weld.getBeanManager().createCreationalContext(null);
    for (Bean bean : weld.getBeanManager().getBeans(type)) {
        weld.getBeanManager().getReference(bean, type, ctx);
    }
}
Also used : CreationalContext(javax.enterprise.context.spi.CreationalContext) WeldContainer(org.jboss.weld.environment.se.WeldContainer) Weld(org.jboss.weld.environment.se.Weld) Fabric8Extension(io.fabric8.cdi.Fabric8Extension) Bean(javax.enterprise.inject.spi.Bean)

Example 3 with Fabric8Extension

use of io.fabric8.cdi.Fabric8Extension in project fabric8 by fabric8io.

the class BrokenFactoryInternalTest method createInstance.

void createInstance(Class type) {
    WeldContainer weld = new Weld().disableDiscovery().extensions(new Fabric8Extension()).beanClasses(MyFactory.class, MyBean.class).initialize();
    CreationalContext ctx = weld.getBeanManager().createCreationalContext(null);
    for (Bean bean : weld.getBeanManager().getBeans(type)) {
        weld.getBeanManager().getReference(bean, type, ctx);
    }
}
Also used : CreationalContext(javax.enterprise.context.spi.CreationalContext) WeldContainer(org.jboss.weld.environment.se.WeldContainer) Weld(org.jboss.weld.environment.se.Weld) Fabric8Extension(io.fabric8.cdi.Fabric8Extension) Bean(javax.enterprise.inject.spi.Bean)

Aggregations

Fabric8Extension (io.fabric8.cdi.Fabric8Extension)3 Weld (org.jboss.weld.environment.se.Weld)3 CreationalContext (javax.enterprise.context.spi.CreationalContext)2 Bean (javax.enterprise.inject.spi.Bean)2 WeldContainer (org.jboss.weld.environment.se.WeldContainer)2 BeforeClass (org.junit.BeforeClass)1