use of org.jboss.weld.environment.se.Weld in project jersey by jersey.
the class RequestScopedResourceTest method before.
@BeforeClass
public static void before() throws Exception {
weld = new Weld();
weld.initialize();
}
use of org.jboss.weld.environment.se.Weld in project jetty.project by eclipse.
the class AbstractWeldTest method initWeld.
@BeforeClass
public static void initWeld() {
weld = new Weld();
container = weld.initialize();
}
use of org.jboss.weld.environment.se.Weld in project indy by Commonjava.
the class WeldJUnit4Runner method createTest.
@Override
protected Object createTest() throws Exception {
this.weld = new Weld();
this.container = weld.initialize();
return container.instance().select(getTestClass().getJavaClass()).get();
}
use of org.jboss.weld.environment.se.Weld in project indy by Commonjava.
the class DefaultIndyConfigFactoryTest method weldInjection_IterateIndyConfigurators.
@Test
public void weldInjection_IterateIndyConfigurators() {
Weld weld = new Weld();
WeldContainer container = weld.initialize();
List<String> sections = new ArrayList<>();
container.instance().select(IndyConfigInfo.class).iterator().forEachRemaining((instance) -> {
String section = ConfigUtils.getSectionName(instance);
System.out.printf("Got instance: %s with section: %s\n", instance, section);
sections.add(section);
});
System.out.println(sections);
assertThat(sections.contains(ConfigurationSectionListener.DEFAULT_SECTION), equalTo(true));
assertThat(sections.contains("flatfiles"), equalTo(true));
assertThat(sections.contains("ui"), equalTo(true));
assertThat(sections.contains("storage-default"), equalTo(true));
}
use of org.jboss.weld.environment.se.Weld in project indy by Commonjava.
the class DefaultIndyConfigFactoryTest method weldInjection_writeDefaults.
@Test
public void weldInjection_writeDefaults() throws IOException, ConfigurationException {
Weld weld = new Weld();
WeldContainer container = weld.initialize();
DefaultIndyConfigFactory factory = container.instance().select(DefaultIndyConfigFactory.class).get();
File dir = temp.newFolder("indy-config");
dir.mkdirs();
factory.writeDefaultConfigs(dir);
assertThat(new File(dir, "main.conf").exists(), equalTo(true));
}
Aggregations