openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r1056587 [2/2] - in /openwebbeans/trunk/webbeans-impl/src: main/java/org/apache/webbeans/config/ main/java/org/apache/webbeans/container/ main/java/org/apache/webbeans/context/ main/java/org/apache/webbeans/corespi/ main/java/org/apache/web...
Date Sat, 08 Jan 2011 01:21:43 GMT
Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/producer/Producer1ConsumerComponentTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/producer/Producer1ConsumerComponentTest.java?rev=1056587&r1=1056586&r2=1056587&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/producer/Producer1ConsumerComponentTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/producer/Producer1ConsumerComponentTest.java
Sat Jan  8 01:21:42 2011
@@ -62,8 +62,9 @@ public class Producer1ConsumerComponentT
 
         List<AbstractOwbBean<?>> comps = getComponents();
 
-        ContextFactory.initRequestContext(null);
-        ContextFactory.initApplicationContext(null);
+        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
+        contextFactory.initRequestContext(null);
+        contextFactory.initApplicationContext(null);
 
         Assert.assertEquals(7, getDeployedComponents());
 
@@ -85,8 +86,8 @@ public class Producer1ConsumerComponentT
 
         Assert.assertNotNull(service);
 
-        ContextFactory.destroyApplicationContext(null);
-        ContextFactory.destroyRequestContext(null);
+        contextFactory.destroyApplicationContext(null);
+        contextFactory.destroyRequestContext(null);
     }
 
 }

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/producer/ProducerComponentTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/producer/ProducerComponentTest.java?rev=1056587&r1=1056586&r2=1056587&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/producer/ProducerComponentTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/producer/ProducerComponentTest.java
Sat Jan  8 01:21:42 2011
@@ -26,7 +26,7 @@ import javax.enterprise.util.TypeLiteral
 import junit.framework.Assert;
 
 import org.apache.webbeans.component.AbstractOwbBean;
-import org.apache.webbeans.context.ContextFactory;
+import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.test.TestContext;
 import org.apache.webbeans.test.component.producer.ParametrizedModel1;
 import org.apache.webbeans.test.component.producer.ParametrizedModel2;
@@ -94,7 +94,7 @@ public class ProducerComponentTest exten
         clear();
         defineManagedBean(ParametrizedProducer.class);
 
-        ContextFactory.initRequestContext(null);
+        WebBeansContext.getInstance().getContextFactory().initRequestContext(null);
         Assert.assertEquals(4, getDeployedComponents());
 
         TypeLiteral<List<ParametrizedModel1>> model1 = new TypeLiteral<List<ParametrizedModel1>>()
@@ -122,7 +122,7 @@ public class ProducerComponentTest exten
         defineManagedBean(Producer4.class);
         AbstractOwbBean<Producer4ConsumerComponent> component = defineManagedBean(Producer4ConsumerComponent.class);
 
-        ContextFactory.initSessionContext(new Object());
+        WebBeansContext.getInstance().getContextFactory().initSessionContext(new Object());
 
         Producer4ConsumerComponent instance = getManager().getInstance(component);
 

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/producer/StaticProducerTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/producer/StaticProducerTest.java?rev=1056587&r1=1056586&r2=1056587&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/producer/StaticProducerTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/producer/StaticProducerTest.java
Sat Jan  8 01:21:42 2011
@@ -21,7 +21,7 @@ package org.apache.webbeans.test.unittes
 import java.lang.annotation.Annotation;
 
 import org.apache.webbeans.component.ProducerMethodBean;
-import org.apache.webbeans.context.ContextFactory;
+import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.test.TestContext;
 import org.apache.webbeans.test.component.producer.StaticProducer1;
 import org.junit.Assert;
@@ -47,7 +47,7 @@ public class StaticProducerTest extends 
     {
         clear();
 
-        ContextFactory.initRequestContext(null);
+        WebBeansContext.getInstance().getContextFactory().initRequestContext(null);
 
         defineManagedBean(StaticProducer1.class);
 

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/producer/primitive/PrimitiveProducerTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/producer/primitive/PrimitiveProducerTest.java?rev=1056587&r1=1056586&r2=1056587&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/producer/primitive/PrimitiveProducerTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/producer/primitive/PrimitiveProducerTest.java
Sat Jan  8 01:21:42 2011
@@ -20,7 +20,7 @@ package org.apache.webbeans.test.unittes
 
 import junit.framework.Assert;
 
-import org.apache.webbeans.context.ContextFactory;
+import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.test.TestContext;
 import org.apache.webbeans.test.component.producer.primitive.PrimitiveConsumer;
 import org.apache.webbeans.test.component.producer.primitive.PrimitiveProducer;
@@ -43,8 +43,8 @@ public class PrimitiveProducerTest exten
     @Test
     public void testPrimitiveProducer()
     {
-        ContextFactory.initRequestContext(null);
-        
+        WebBeansContext.getInstance().getContextFactory().initRequestContext(null);
+
         defineManagedBean(PrimitiveProducer.class);
         defineManagedBean(PrimitiveConsumer.class);
         

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/scopes/ScopeAdapterTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/scopes/ScopeAdapterTest.java?rev=1056587&r1=1056586&r2=1056587&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/scopes/ScopeAdapterTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/scopes/ScopeAdapterTest.java
Sat Jan  8 01:21:42 2011
@@ -23,6 +23,7 @@ import java.util.List;
 import junit.framework.Assert;
 
 import org.apache.webbeans.component.AbstractOwbBean;
+import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.context.ContextFactory;
 import org.apache.webbeans.test.TestContext;
 import org.apache.webbeans.test.component.CheckWithCheckPayment;
@@ -55,9 +56,10 @@ public class ScopeAdapterTest extends Te
         defineManagedBean(ScopeAdaptorInjectorComponent.class);
 
         Object session = getSession();
-        ContextFactory.initRequestContext(null);
-        ContextFactory.initSessionContext(session);
-        ContextFactory.initApplicationContext(null);
+        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
+        contextFactory.initRequestContext(null);
+        contextFactory.initSessionContext(session);
+        contextFactory.initApplicationContext(null);
 
         List<AbstractOwbBean<?>> comps = getComponents();
 
@@ -68,9 +70,9 @@ public class ScopeAdapterTest extends Te
         getInstanceByName("scope");
         getManager().getInstance(comps.get(2));
 
-        ContextFactory.destroyApplicationContext(null);
-        ContextFactory.destroySessionContext(session);
-        ContextFactory.destroyRequestContext(null);
+        contextFactory.destroyApplicationContext(null);
+        contextFactory.destroySessionContext(session);
+        contextFactory.destroyRequestContext(null);
 
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/scopes/SingletonComponentTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/scopes/SingletonComponentTest.java?rev=1056587&r1=1056586&r2=1056587&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/scopes/SingletonComponentTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/scopes/SingletonComponentTest.java
Sat Jan  8 01:21:42 2011
@@ -62,7 +62,8 @@ public class SingletonComponentTest exte
 
         Object session = getSession();
 
-        ContextFactory.initSessionContext(session);
+        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
+        contextFactory.initSessionContext(session);
 
         Assert.assertEquals(2, comps.size());
 
@@ -80,7 +81,7 @@ public class SingletonComponentTest exte
 
         Assert.assertNotNull(t);
 
-        ContextFactory.destroySessionContext(session);
+        contextFactory.destroySessionContext(session);
     }
 
 }

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/specializes/SpecializationComponentTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/specializes/SpecializationComponentTest.java?rev=1056587&r1=1056586&r2=1056587&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/specializes/SpecializationComponentTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/specializes/SpecializationComponentTest.java
Sat Jan  8 01:21:42 2011
@@ -20,7 +20,7 @@ package org.apache.webbeans.test.unittes
 
 import javax.enterprise.inject.spi.Bean;
 
-import org.apache.webbeans.context.ContextFactory;
+import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.test.TestContext;
 import org.apache.webbeans.test.component.specializes.AsynhrounousSpecalizesService;
 import org.apache.webbeans.test.component.specializes.SpecializesServiceInjectorComponent;
@@ -44,9 +44,9 @@ public class SpecializationComponentTest
     public void testMockService()
     {
         clear();
-        
-        ContextFactory.initRequestContext(null);
-        
+
+        WebBeansContext.getInstance().getContextFactory().initRequestContext(null);
+
         Bean<AsynhrounousSpecalizesService> bean2 = defineManagedBean(AsynhrounousSpecalizesService.class);
         Bean<SpecializesServiceInjectorComponent> bean3 = defineManagedBean(SpecializesServiceInjectorComponent.class);
         

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/typedliteral/TypedLiteralComponentTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/typedliteral/TypedLiteralComponentTest.java?rev=1056587&r1=1056586&r2=1056587&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/typedliteral/TypedLiteralComponentTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/typedliteral/TypedLiteralComponentTest.java
Sat Jan  8 01:21:42 2011
@@ -60,7 +60,8 @@ public class TypedLiteralComponentTest e
         defineManagedBean(InjectedTypeLiteralComponent.class);
         List<AbstractOwbBean<?>> comps = getComponents();
 
-        ContextFactory.initRequestContext(null);
+        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
+        contextFactory.initRequestContext(null);
 
         Assert.assertEquals(2, comps.size());
 
@@ -71,8 +72,8 @@ public class TypedLiteralComponentTest e
         Assert.assertNotNull(userComponent);
 
         Assert.assertTrue(tc.getComponent() instanceof TypeLiteralComponent);
-        
-        ContextFactory.destroyRequestContext(null);
+
+        contextFactory.destroyRequestContext(null);
     }
 
     @Test
@@ -83,7 +84,8 @@ public class TypedLiteralComponentTest e
         defineManagedBean(TypeLiteralComponent.class);
         List<AbstractOwbBean<?>> comps = getComponents();
 
-        ContextFactory.initRequestContext(null);
+        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
+        contextFactory.initRequestContext(null);
 
         Assert.assertEquals(1, comps.size());
 
@@ -100,7 +102,7 @@ public class TypedLiteralComponentTest e
         Bean<?> s = WebBeansContext.getInstance().getBeanManagerImpl().resolveByType(tl,
anns).iterator().next();
         Assert.assertNotNull(s);
 
-        ContextFactory.destroyRequestContext(null);
+        contextFactory.destroyRequestContext(null);
     }
 
 }

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/xml/definition/XMLDefinitionTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/xml/definition/XMLDefinitionTest.java?rev=1056587&r1=1056586&r2=1056587&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/xml/definition/XMLDefinitionTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/xml/definition/XMLDefinitionTest.java
Sat Jan  8 01:21:42 2011
@@ -23,7 +23,6 @@ import junit.framework.Assert;
 import org.apache.webbeans.component.AbstractOwbBean;
 import org.apache.webbeans.component.xml.XMLManagedBean;
 import org.apache.webbeans.config.WebBeansContext;
-import org.apache.webbeans.context.ContextFactory;
 import org.apache.webbeans.test.TestContext;
 import org.apache.webbeans.test.xml.definition.Definition1;
 import org.apache.webbeans.test.xml.definition.Definition2;
@@ -149,7 +148,7 @@ public class XMLDefinitionTest extends T
     {
         clear();
 
-        ContextFactory.initRequestContext(null);
+        WebBeansContext.getInstance().getContextFactory().initRequestContext(null);
 
         AbstractOwbBean<?> compDef = getWebBeanFromXml("org/apache/webbeans/test/xml/definition/testBeanConstructor2.xml",
TstBeanConstructor.class);
 



Mime
View raw message