X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;ds=inline;f=wicket%2Fjoe%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Fwicket%2Finject%2FComponentInstantiationInjectorTest.java;h=59d59f69fdc4a305edf93aba45491a26ad35d1d7;hb=a7ad3d8ca1cc0f40662282cbda9922e95aaf8821;hp=5824c6dc2755ccb063956616142ac3fa85c13abb;hpb=dcf3471d580d722a81680d0d2431e2027b4e9932;p=utils diff --git a/wicket/joe/src/test/java/org/wamblee/wicket/inject/ComponentInstantiationInjectorTest.java b/wicket/joe/src/test/java/org/wamblee/wicket/inject/ComponentInstantiationInjectorTest.java index 5824c6dc..59d59f69 100644 --- a/wicket/joe/src/test/java/org/wamblee/wicket/inject/ComponentInstantiationInjectorTest.java +++ b/wicket/joe/src/test/java/org/wamblee/wicket/inject/ComponentInstantiationInjectorTest.java @@ -23,21 +23,21 @@ import org.apache.wicket.util.tester.WicketTester; import org.junit.Test; import org.wamblee.inject.Injector; - public class ComponentInstantiationInjectorTest { - + @Test - public void testListener() { + public void testListener() { WicketTester tester = new WicketTester(); - tester.getApplication().addComponentInstantiationListener(new ComponentInstantiationInjector()); - - Injector injector = mock(Injector.class); - TestInjectorFactory.setMockInjector(injector); - + tester.getApplication().addComponentInstantiationListener( + new ComponentInstantiationInjector()); + + Injector injector = mock(Injector.class); + TestInjectorFactory.setMockInjector(injector); + Component component = new WebMarkupContainer("hello"); - - // Verify the injector was called with the component as an argument. - verify(injector).inject(same(component)); + + // Verify the injector was called with the component as an argument. + verify(injector).inject(same(component)); } }