File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/main/java/org/javawebstack/framework/testing Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ public abstract class WebFrameworkTest extends HTTPTest {
1212
1313 public WebFrameworkTest (WebApplication webApplication ){
1414 super (webApplication .getServer ());
15- webApplication .getInjector ().inject (getClass () );
15+ webApplication .getInjector ().inject (this );
1616
1717 this .webApplication = webApplication ;
1818 }
@@ -25,6 +25,14 @@ public Injector getInjector(){
2525 return webApplication .getInjector ();
2626 }
2727
28+ public <T > T inject (Class <T > clazz ){
29+ return webApplication .getInjector ().getInstance (clazz );
30+ }
31+
32+ public <T > T inject (Class <T > clazz , String name ){
33+ return webApplication .getInjector ().getInstance (clazz , name );
34+ }
35+
2836 public void seed (String name ){
2937 webApplication .getSeeder (name ).seed ();
3038 }
You can’t perform that action at this time.
0 commit comments