(no commit message)
[utils] / support / cdi / src / test / java / org / wamblee / cdi / SimpleInjectorTest.java
index 93f260e2d3f170ba889a83640b9919820e577bed..7c4bd11297225477778b773942c1d80007c10325 100644 (file)
@@ -43,7 +43,7 @@ public class SimpleInjectorTest extends BaseTestFixture {
         StubInitialContextFactory.register();
         InitialContext ctx = new InitialContext();
         ctx.bind(BeanManagerLookup.BEAN_MANAGER_JNDI, setup.getBeanManager());
-        MySingleton.reset();        
+        MySingleton.reset();
     }
 
     @After
@@ -56,7 +56,8 @@ public class SimpleInjectorTest extends BaseTestFixture {
     @Test
     public void testGetSingleton() {
         MyPojo pojo = new MyPojo();
-        SimpleInjector injector = new SimpleInjector(new CdiInjectorFactory(BeanManagerLookup.lookup()));
+        SimpleInjector injector = new SimpleInjector(new CdiInjectorFactory(
+            BeanManagerLookup.lookup()));
         injector.inject(pojo);
 
         MySingleton obj = pojo.getSingleton();
@@ -82,37 +83,38 @@ public class SimpleInjectorTest extends BaseTestFixture {
             @Override
             public void inject(Object aComponent) {
                 MyPojo pojo2 = (MyPojo) aComponent;
-                pojo2.setSingleton(singleton); 
+                pojo2.setSingleton(singleton);
             }
         });
-        
+
         injector.inject(pojo);
-        // verify the custom injector was called. 
+        // verify the custom injector was called.
         assertSame(singleton, pojo.getSingleton());
     }
-    
+
     @RequestScoped
-    public static class Y { 
-        
+    public static class Y {
+
     }
-    public static class X { 
+
+    public static class X {
         @Inject
-        private Y y; 
-        
+        private Y y;
+
     }
-    
-    @Test 
-    public void testInjectStorage() throws Exception { 
-        X x = new X(); 
+
+    @Test
+    public void testInjectStorage() throws Exception {
+        X x = new X();
         InjectorBuilder.setInjectorFactory(null);
         InjectorBuilder.getInjector().inject(x);
     }
-    
-    @Test 
-    public void testInjectStorage2() { 
-        X x = new X(); 
+
+    @Test
+    public void testInjectStorage2() {
+        X x = new X();
         InjectorBuilder.setInjectorFactory(null);
         InjectorBuilder.getInjector().inject(x);
     }
-    
+
 }