use of org.jboss.weld.environment.se.Weld in project cxf by apache.
the class ClassUnwrapperTest method setUp.
@Before
public void setUp() {
final Weld weld = new Weld();
container = weld.initialize();
bus = getBeanReference(Bus.class);
}
use of org.jboss.weld.environment.se.Weld in project drools by kiegroup.
the class CDIExample method main.
public static void main(String[] args) {
Weld w = new Weld();
WeldContainer wc = w.initialize();
CDIExample bean = wc.instance().select(CDIExample.class).get();
bean.go(System.out);
w.shutdown();
}
use of org.jboss.weld.environment.se.Weld in project drools by kiegroup.
the class CDIExampleWithInclusionTest method testGo.
@Test
public void testGo() {
Weld w = new Weld();
WeldContainer wc = w.initialize();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(baos);
CDIExampleWithInclusion bean = wc.instance().select(CDIExampleWithInclusion.class).get();
bean.go(ps);
ps.close();
String actual = new String(baos.toByteArray());
String expected = "" + "Dave: Hello, HAL. Do you read me, HAL?" + NL + "HAL: Dave. I read you." + NL + "Dave: Open the pod bay doors, HAL." + NL + "HAL: I'm sorry, Dave. I'm afraid I can't do that." + NL;
assertEquals(expected, actual);
w.shutdown();
}
use of org.jboss.weld.environment.se.Weld in project drools by kiegroup.
the class CDIExampleTest method testGo.
@Test
public void testGo() {
Weld w = new Weld();
WeldContainer wc = w.initialize();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(baos);
CDIExample bean = wc.instance().select(CDIExample.class).get();
bean.go(ps);
ps.close();
String actual = new String(baos.toByteArray());
String expected = "" + "Dave: Hello, HAL. Do you read me, HAL?" + NL + "HAL: Dave. I read you." + NL;
assertEquals(expected, actual);
w.shutdown();
}
use of org.jboss.weld.environment.se.Weld in project drools by kiegroup.
the class CDIInstanceExampleTest method testGo.
@Test
public void testGo() {
Weld w = new Weld();
WeldContainer wc = w.initialize();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(baos);
CDIInstanceExample bean = wc.instance().select(CDIInstanceExample.class).get();
bean.go(ps);
ps.close();
String actual = new String(baos.toByteArray());
String expected = "" + "Dave: Hello, HAL. Do you read me, HAL?" + NL + "HAL: Dave. I read you." + NL;
assertEquals(expected, actual);
w.shutdown();
}
Aggregations