(no commit message)
authorErik Brakkee <erik@brakkee.org>
Wed, 28 Jul 2010 18:22:43 +0000 (18:22 +0000)
committerErik Brakkee <erik@brakkee.org>
Wed, 28 Jul 2010 18:22:43 +0000 (18:22 +0000)
test/enterprise/src/main/java/org/wamblee/test/inject/JavaEETestInjectorFactory.java
test/enterprise/src/test/java/org/wamblee/test/inject/JavaEETestInjectorFactoryTest.java

index bc0ef25ef1c97a6e738bbe167b1decd9d3fecfa0..c2228b987a9de41c6c2f9ac342df1e6eb1bed5ac 100644 (file)
@@ -19,7 +19,7 @@ import javax.persistence.EntityManager;
 
 import org.wamblee.inject.Injector;
 import org.wamblee.inject.InjectorFactory;
-import org.wamblee.inject.InjectorFactoryBuilder;
+import org.wamblee.inject.InjectorBuilder;
 import org.wamblee.test.persistence.JpaBuilder;
 
 /**
@@ -38,7 +38,7 @@ import org.wamblee.test.persistence.JpaBuilder;
  *
  * <p>
  * To use it, construct the factory using one of the available constructors and set 
- * <code>InjectorFactoryBuilder.setInjectorFactory(InjectorFactory</code>.
+ * <code>InjectorBuilder.setInjectorFactory(InjectorFactory)</code>.
  * </p>
  * 
  * @author Erik Brakkee
@@ -61,7 +61,7 @@ public class JavaEETestInjectorFactory implements InjectorFactory {
 
     /**
      * Constructs the factory with the default injector factory obtained from 
-     * {@link InjectorFactoryBuilder#getInjector()}. 
+     * {@link InjectorBuilder#getInjector()}. 
      * @param aEntityManager Contextual entity manager to inject. 
      */
     public JavaEETestInjectorFactory(EntityManager aEntityManager) {
@@ -69,8 +69,8 @@ public class JavaEETestInjectorFactory implements InjectorFactory {
     }
 
     private static InjectorFactory getDefaultInjectorFactory() {
-        InjectorFactoryBuilder.setInjectorFactory(null);
-        return InjectorFactoryBuilder.getInjectorFactory();
+        InjectorBuilder.setInjectorFactory(null);
+        return InjectorBuilder.getInjectorFactory();
     }
 
     @Override
index 0ca9c0215abc4c900645901f685d02a47ecda86c..682ea88256adb646ad35e7fe9f25809c47d47283 100644 (file)
@@ -4,7 +4,7 @@ import javax.persistence.EntityManager;
 import javax.persistence.PersistenceContext;
 
 import org.junit.Test;
-import org.wamblee.inject.InjectorFactoryBuilder;
+import org.wamblee.inject.InjectorBuilder;
 
 import static org.mockito.Mockito.*;
 import static junit.framework.TestCase.*;
@@ -28,11 +28,11 @@ public class JavaEETestInjectorFactoryTest {
     @Test
     public void testXyz() { 
         EntityManager em = mock(EntityManager.class);
-        InjectorFactoryBuilder.setInjectorFactory(new JavaEETestInjectorFactory(em));
+        InjectorBuilder.setInjectorFactory(new JavaEETestInjectorFactory(em));
        
         assertNull(entityManager);
         assertNull(entityManager2);
-        InjectorFactoryBuilder.getInjector().inject(this);
+        InjectorBuilder.getInjector().inject(this);
         
         assertNotNull(em);
         assertSame(em, entityManager); 
@@ -47,8 +47,8 @@ public class JavaEETestInjectorFactoryTest {
     @Test(expected = IllegalArgumentException.class)
     public void testWrongType() { 
         EntityManager em = mock(EntityManager.class);
-        InjectorFactoryBuilder.setInjectorFactory(new JavaEETestInjectorFactory(em));
+        InjectorBuilder.setInjectorFactory(new JavaEETestInjectorFactory(em));
         X x= new X(); 
-        InjectorFactoryBuilder.getInjector().inject(x);
+        InjectorBuilder.getInjector().inject(x);
     }
 }