openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r751155 - in /incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test: mock/ unittests/clazz/ unittests/decorator/ unittests/dependent/ unittests/disposal/ unittests/event/component/
Date Sat, 07 Mar 2009 01:00:22 GMT
Author: gerdogdu
Date: Sat Mar  7 01:00:22 2009
New Revision: 751155

URL: http://svn.apache.org/viewvc?rev=751155&view=rev
Log:
Updating for TCK tests.

Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/ClazzTest.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorExceptionTest.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorTest1.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/dependent/MultipleDependentTest.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/disposal/DisposalTest.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java?rev=751155&r1=751154&r2=751155&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java
Sat Mar  7 01:00:22 2009
@@ -15,6 +15,7 @@
 
 import java.io.InputStream;
 import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
@@ -117,14 +118,14 @@
         return manager.getContext(scopeType);
     }
 
-    public <T> T getInstanceToInject(InjectionPoint injectionPoint, CreationalContext<T>
context)
+    public <T> T getInstanceToInject(InjectionPoint injectionPoint, CreationalContext<?>
context)
     {
         return manager.getInstanceToInject(injectionPoint, context);
     }
     
-    public Object getInstanceToInject(InjectionPoint injectionPoint)
+    public <T> T getInstanceToInject(InjectionPoint injectionPoint)
     {
-        Object instance = manager.getInstanceToInject(injectionPoint);
+        T instance = manager.getInstanceToInject(injectionPoint);
         
         return instance;
     }    
@@ -174,7 +175,7 @@
         return manager.resolveByType(apiType, bindingTypes);
     }
 
-    public List<Decorator> resolveDecorators(Set<Class<?>> types, Annotation...
bindingTypes)
+    public List<Decorator> resolveDecorators(Set<Type> types, Annotation... bindingTypes)
     {
         return manager.resolveDecorators(types, bindingTypes);
     }
@@ -194,4 +195,14 @@
         manager.parse(xmlStream);
         return manager;
     }
+
+    public Manager createActivity()
+    {
+        return manager.createActivity();
+    }
+
+    public Manager setCurrent(Class<? extends Annotation> scopeType)
+    {
+        return manager.setCurrent(scopeType);
+    }
 }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/ClazzTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/ClazzTest.java?rev=751155&r1=751154&r2=751155&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/ClazzTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/ClazzTest.java
Sat Mar  7 01:00:22 2009
@@ -13,6 +13,7 @@
  */
 package org.apache.webbeans.test.unittests.clazz;
 
+import java.lang.reflect.Type;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -26,7 +27,7 @@
     @Test
     public void testStudent()
     {
-        Set<Class<?>> set = new HashSet<Class<?>>();
+        Set<Type> set = new HashSet<Type>();
         ClassUtil.setTypeHierarchy(set, Student.class);
 
         Assert.assertEquals(5, set.size());
@@ -36,7 +37,7 @@
     @Test
     public void testSutdent2()
     {
-        Set<Class<?>> set = new HashSet<Class<?>>();
+        Set<Type> set = new HashSet<Type>();
 
         ClassUtil.setTypeHierarchy(set, Student2.class);
 

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorExceptionTest.java?rev=751155&r1=751154&r2=751155&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorExceptionTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorExceptionTest.java
Sat Mar  7 01:00:22 2009
@@ -14,6 +14,7 @@
 package org.apache.webbeans.test.unittests.decorator;
 
 import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -147,7 +148,7 @@
         try
         {
 
-            Set<Class<?>> api = new HashSet<Class<?>>();
+            Set<Type> api = new HashSet<Type>();
             api.add(IPayment.class);
 
             Annotation[] anns = new Annotation[2];
@@ -173,7 +174,7 @@
         try
         {
 
-            Set<Class<?>> api = new HashSet<Class<?>>();
+            Set<Type> api = new HashSet<Type>();
             api.add(IPayment.class);
 
             Annotation[] anns = new Annotation[2];
@@ -198,7 +199,7 @@
         try
         {
 
-            Set<Class<?>> api = new HashSet<Class<?>>();
+            Set<Type> api = new HashSet<Type>();
 
             Annotation[] anns = new Annotation[2];
             anns[0] = new DummyAnnotationLiteral();

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorTest1.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorTest1.java?rev=751155&r1=751154&r2=751155&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorTest1.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorTest1.java
Sat Mar  7 01:00:22 2009
@@ -14,6 +14,7 @@
 package org.apache.webbeans.test.unittests.decorator;
 
 import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
 import java.math.BigDecimal;
 import java.util.HashSet;
 import java.util.List;
@@ -78,7 +79,7 @@
 
         Assert.assertEquals("ServiceImpl1", s);
 
-        Set<Class<?>> apiTyeps = new HashSet<Class<?>>();
+        Set<Type> apiTyeps = new HashSet<Type>();
         apiTyeps.add(IService.class);
 
         List<Decorator> decs = getManager().resolveDecorators(apiTyeps, new Annotation[]
{ new Binding1Literal() });
@@ -101,7 +102,7 @@
         account.deposit(new BigDecimal(1500));
         account.withdraw(new BigDecimal(3000));
 
-        Set<Class<?>> apiTyeps = new HashSet<Class<?>>();
+        Set<Type> apiTyeps = new HashSet<Type>();
         apiTyeps.add(Account.class);
 
         List<Decorator> decs = getManager().resolveDecorators(apiTyeps, new Annotation[]
{ new CurrentLiteral() });

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/dependent/MultipleDependentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/dependent/MultipleDependentTest.java?rev=751155&r1=751154&r2=751155&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/dependent/MultipleDependentTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/dependent/MultipleDependentTest.java
Sat Mar  7 01:00:22 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.webbeans.test.unittests.dependent;
 
-import java.lang.annotation.Annotation;
-
 import junit.framework.Assert;
 
 import org.apache.webbeans.context.ContextFactory;

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/disposal/DisposalTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/disposal/DisposalTest.java?rev=751155&r1=751154&r2=751155&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/disposal/DisposalTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/disposal/DisposalTest.java
Sat Mar  7 01:00:22 2009
@@ -17,7 +17,6 @@
 
 import org.apache.webbeans.context.ContextFactory;
 import org.apache.webbeans.test.component.disposal.Disposal1;
-import org.apache.webbeans.test.mock.MockEntityManager;
 import org.apache.webbeans.test.mock.MockHttpSession;
 import org.apache.webbeans.test.servlet.TestContext;
 import org.junit.Assert;

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java?rev=751155&r1=751154&r2=751155&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java
Sat Mar  7 01:00:22 2009
@@ -35,7 +35,6 @@
 import org.junit.Before;
 import org.junit.Test;
 
-@SuppressWarnings("unchecked")
 public class ObserversComponentTest extends TestContext
 {
     public ObserversComponentTest()



Mime
View raw message