File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/main/java/org/javawebstack/framework/testing Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 22
33import org .javawebstack .framework .WebApplication ;
44import org .javawebstack .httpserver .test .HTTPTest ;
5+ import org .javawebstack .injector .Injector ;
56
67public abstract class WebFrameworkTest extends HTTPTest {
78
@@ -15,4 +16,16 @@ public WebFrameworkTest(WebApplication webApplication){
1516 public WebApplication getWebApplication () {
1617 return webApplication ;
1718 }
19+
20+ public Injector getInjector (){
21+ return webApplication .getInjector ();
22+ }
23+
24+ public <T > T inject (Class <T > clazz ){
25+ return webApplication .getInjector ().getInstance (clazz );
26+ }
27+
28+ public <T > T inject (Class <T > clazz , String name ){
29+ return webApplication .getInjector ().getInstance (clazz , name );
30+ }
1831}
You can’t perform that action at this time.
0 commit comments