3031323334353637
String expected = "" + "Dave: Hello, HAL. Do you read me, HAL?" + NL + "HAL: Dave. I read you." + NL; assertEquals(expected, actual); w.shutdown(); } }
3233343536373839
"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(); } }
252627282930313233
WeldContainer wc = w.initialize(); CDIExample bean = wc.instance().select(CDIExample.class).get(); bean.go(System.out); w.shutdown(); } }
6869707172737475767778
WeldContainer wc = w.initialize(); CDIBean bean = wc.instance().select(CDIBean.class).get(); bean.test(env); w.shutdown(); } public static class CDIBean { @Inject @KBase("cdiexample") KieBase kBase;
2930313233343536
Book book = bookService.createBook("H2G2", 12.5f, "Geeky scifi Book"); assertTrue(book.getNumber().startsWith("MOCK")); weld.shutdown(); } }
2122232425262728
Book book = bookService.createBook("H2G2", 12.5f, "Geeky scifi Book"); System.out.println(book); weld.shutdown(); } }
112113114115116117118119120121122
bean = (Bean) beans.toArray()[0]; KProjectTestClass o4 = (KProjectTestClass) bean.create( container.getBeanManager().createCreationalContext( null ) ); assertNotNull( o4 ); testEntry(o4, "fol4"); weld.shutdown(); } finally { Thread.currentThread().setContextClassLoader( origCl ); } }
7071727374757677787980
weld.initialize(); this.startup(); super.run(notifier); weld.shutdown(); } protected Object createTest() throws Exception { return Beans.getReference(getTestClass().getJavaClass()); }
3839404142434445
// Do your things app.doSomething(); // Close container weld.shutdown(); } }