Search in sources :

Example 1 with StartMain

use of org.jboss.weld.environment.se.StartMain in project kie-wb-common by kiegroup.

the class PackageDataModelDeclaredTypesTest method setUp.

@Before
public void setUp() throws Exception {
    // Bootstrap WELD container
    StartMain startMain = new StartMain(new String[0]);
    beanManager = startMain.go().getBeanManager();
    // Instantiate Paths used in tests for Path conversion
    final Bean pathsBean = (Bean) beanManager.getBeans(Paths.class).iterator().next();
    final CreationalContext cc = beanManager.createCreationalContext(pathsBean);
    paths = (Paths) beanManager.getReference(pathsBean, Paths.class, cc);
    // Ensure URLs use the default:// scheme
    fs.forceAsDefault();
}
Also used : CreationalContext(javax.enterprise.context.spi.CreationalContext) Paths(org.uberfire.backend.server.util.Paths) StartMain(org.jboss.weld.environment.se.StartMain) Bean(javax.enterprise.inject.spi.Bean) Before(org.junit.Before)

Aggregations

CreationalContext (javax.enterprise.context.spi.CreationalContext)1 Bean (javax.enterprise.inject.spi.Bean)1 StartMain (org.jboss.weld.environment.se.StartMain)1 Before (org.junit.Before)1 Paths (org.uberfire.backend.server.util.Paths)1