(no commit message)
authorErik Brakkee <erik@brakkee.org>
Sun, 15 Aug 2010 17:01:38 +0000 (17:01 +0000)
committerErik Brakkee <erik@brakkee.org>
Sun, 15 Aug 2010 17:01:38 +0000 (17:01 +0000)
support/cdi/src/test/java/org/wamblee/cdi/BeanManagerLookupTest.java
support/cdi/src/test/java/org/wamblee/cdi/BeanManagerSetup.java [deleted file]
support/cdi/src/test/java/org/wamblee/cdi/CdiInjectorFactoryTest.java
support/cdi/src/test/java/org/wamblee/cdi/CdiInjectorTest.java
support/cdi/src/test/java/org/wamblee/cdi/InjectorBuilderTest.java
support/cdi/src/test/java/org/wamblee/cdi/SimpleInjectorTest.java
support/cdi/src/test/java/org/wamblee/cdi/WeldTest.java

index 2889a2fabfdc6dfb0ab6fb8cb5da9bc65c84d9c6..58f1b05f80e33ee2ee5b755539761d962d97a4b7 100644 (file)
@@ -22,6 +22,7 @@ import javax.enterprise.inject.spi.BeanManager;
 import javax.naming.InitialContext;
 
 import org.junit.Test;
+import org.wamblee.test.cdi.BeanManagerSetup;
 import org.wamblee.test.jndi.StubInitialContextFactory;
 
 public class BeanManagerLookupTest extends BaseTestFixture {
diff --git a/support/cdi/src/test/java/org/wamblee/cdi/BeanManagerSetup.java b/support/cdi/src/test/java/org/wamblee/cdi/BeanManagerSetup.java
deleted file mode 100644 (file)
index 8065031..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2005-2010 the original author or authors.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.wamblee.cdi;
-
-import javax.enterprise.inject.spi.BeanManager;
-
-import org.jboss.weld.environment.se.Weld;
-import org.jboss.weld.environment.se.WeldContainer;
-
-public class BeanManagerSetup {
-
-    private Weld weld;
-    private WeldContainer container;
-    private BeanManager beanManager;
-
-    public BeanManagerSetup() {
-        // Empty
-    }
-
-    public void initialize() {
-        weld = new Weld();
-        container = weld.initialize();
-        beanManager = container.getBeanManager();
-    }
-
-    public BeanManager getBeanManager() {
-        return beanManager;
-    }
-
-    public void shutdown() {
-        weld.shutdown();
-        weld = null;
-        container = null;
-        beanManager = null;
-    }
-}
index 861e8809159e277982917bc20b2f4e90a90d5c06..0c102a08d47ffdfd355f4477018be38eb94030a4 100644 (file)
@@ -20,6 +20,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.wamblee.inject.Injector;
 import org.wamblee.inject.InjectorFactory;
+import org.wamblee.test.cdi.BeanManagerSetup;
 
 import static junit.framework.TestCase.*;
 
index 13946b3aeeee22efd714fc7f9b8d3e99861dfcc3..54514928f86a1fa1d5816b3b2f386fe62a6aea84 100644 (file)
@@ -21,6 +21,7 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.wamblee.inject.InjectorBuilder;
+import org.wamblee.test.cdi.BeanManagerSetup;
 
 public class CdiInjectorTest extends BaseTestFixture {
 
index daffe9b1e615ee767af569324b6557b84de1dcee..50c436d3d7d204c7f51a9370ba92db6024366430 100644 (file)
@@ -26,6 +26,7 @@ import org.wamblee.cdi.SimpleInjectorTest.X;
 import org.wamblee.cdi.SimpleInjectorTest.Y;
 import org.wamblee.inject.InjectorFactory;
 import org.wamblee.inject.InjectorBuilder;
+import org.wamblee.test.cdi.BeanManagerSetup;
 import org.wamblee.test.jndi.StubInitialContextFactory;
 
 public class InjectorBuilderTest extends BaseTestFixture {
index 7c4bd11297225477778b773942c1d80007c10325..7c61b2ffa6d70500325d658fdc69cd122e69a8ba 100644 (file)
@@ -29,6 +29,7 @@ import org.wamblee.inject.Injector;
 import org.wamblee.inject.InjectorFactory;
 import org.wamblee.inject.InjectorBuilder;
 import org.wamblee.inject.SimpleInjector;
+import org.wamblee.test.cdi.BeanManagerSetup;
 import org.wamblee.test.jndi.StubInitialContextFactory;
 
 public class SimpleInjectorTest extends BaseTestFixture {
index d2aa8a5516e63e0817e229f6a30b37f5d35f1810..c6f378e81188f62870b49e959851bd1649d52402 100644 (file)
@@ -9,6 +9,7 @@ import javax.enterprise.inject.spi.InjectionTarget;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.wamblee.test.cdi.BeanManagerSetup;
 
 public class WeldTest {