openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r748736 - in /incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck: BeansImpl.java ContainersImpl.java ELImpl.java ManagersImpl.java StandaloneContainersImpl.java
Date Fri, 27 Feb 2009 23:10:50 GMT
Author: gerdogdu
Date: Fri Feb 27 23:10:49 2009
New Revision: 748736

URL: http://svn.apache.org/viewvc?rev=748736&view=rev
Log:
Update TCK SPI implementations.

Modified:
    incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/BeansImpl.java
    incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ContainersImpl.java
    incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ELImpl.java
    incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ManagersImpl.java
    incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java

Modified: incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/BeansImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/BeansImpl.java?rev=748736&r1=748735&r2=748736&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/BeansImpl.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/BeansImpl.java
Fri Feb 27 23:10:49 2009
@@ -31,6 +31,7 @@
 {
 
     /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
     public <T> Bean<T> createProducerMethodBean(Method method, Bean<?>
declaringBean)
     {
         //X TODO plz review! If the declaringBean has been already parsed, then the producer
must be also.

Modified: incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ContainersImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ContainersImpl.java?rev=748736&r1=748735&r2=748736&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ContainersImpl.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ContainersImpl.java
Fri Feb 27 23:10:49 2009
@@ -16,34 +16,36 @@
 import java.io.IOException;
 import java.io.InputStream;
 
-
-
-import org.apache.log4j.Logger;
 import org.jboss.jsr299.tck.api.DeploymentException;
 import org.jboss.jsr299.tck.spi.Containers;
 
-public class ContainersImpl implements Containers {
+public class ContainersImpl implements Containers
+{
 
-    private Logger logger = Logger.getLogger(ContainersImpl.class);
+  //  private Logger logger = Logger.getLogger(ContainersImpl.class);
 
-    public void cleanup() throws IOException {
+    public void cleanup() throws IOException
+    {
         // TODO Auto-generated method stub
-        
+
     }
 
-    public void deploy( InputStream archive, String name ) throws DeploymentException, IOException
{
+    public void deploy(InputStream archive, String name) throws DeploymentException, IOException
+    {
         // TODO Auto-generated method stub
-        
+
     }
 
-    public void setup() throws IOException {
+    public void setup() throws IOException
+    {
         // TODO Auto-generated method stub
-        
+
     }
 
-    public void undeploy( String name ) throws IOException {
+    public void undeploy(String name) throws IOException
+    {
         // TODO Auto-generated method stub
-        
+
     }
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ELImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ELImpl.java?rev=748736&r1=748735&r2=748736&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ELImpl.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ELImpl.java
Fri Feb 27 23:10:49 2009
@@ -2,16 +2,17 @@
 
 import org.jboss.jsr299.tck.spi.EL;
 
-public class ELImpl implements EL {
+public class ELImpl implements EL
+{
 
-    public <T> T evaluateMethodExpression( String expression, Class<T> expectedType,
Class<?>[] expectedParamTypes,
-            Object[] expectedParams ) {
-        // TODO Auto-generated method stub
+    public <T> T evaluateMethodExpression(String expression, Class<T> expectedType,
Class<?>[] expectedParamTypes, Object[] expectedParams)
+    {
+        
         return null;
     }
 
-    public <T> T evaluateValueExpression( String expression, Class<T> expectedType
) {
-        // TODO Auto-generated method stub
+    public <T> T evaluateValueExpression(String expression, Class<T> expectedType)
+    {
         return null;
     }
 

Modified: incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ManagersImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ManagersImpl.java?rev=748736&r1=748735&r2=748736&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ManagersImpl.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ManagersImpl.java
Fri Feb 27 23:10:49 2009
@@ -21,7 +21,7 @@
 import org.apache.webbeans.context.ContextFactory;
 import org.apache.webbeans.deployment.DeploymentTypeManager;
 import org.apache.webbeans.test.mock.MockHttpSession;
-import org.apache.webbeans.test.mock.MockManager;
+import org.apache.webbeans.test.tck.mock.TCKManager;
 import org.jboss.jsr299.tck.spi.Managers;
 
 public class ManagersImpl implements Managers
@@ -33,11 +33,13 @@
     }
 
     public Manager getManager() {
+        
         ContextFactory.initApplicationContext(null);
         ContextFactory.initRequestContext(null);
         ContextFactory.initSessionContext(new MockHttpSession());
         ContextFactory.initConversationContext(null);
-        return MockManager.getInstance();
+        
+        return TCKManager.getInstance();
     }
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java?rev=748736&r1=748735&r2=748736&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java
Fri Feb 27 23:10:49 2009
@@ -13,44 +13,71 @@
  */
 package org.apache.webbeans.test.tck;
 
-import java.lang.annotation.Annotation;
 import java.net.URL;
-import java.util.List;
+import java.util.Iterator;
 
+import javax.inject.Production;
+
+import org.apache.webbeans.deployment.DeploymentTypeManager;
+import org.apache.webbeans.test.tck.mock.TCKManager;
+import org.apache.webbeans.test.tck.mock.TCKWebBeansContainerDeployer;
+import org.apache.webbeans.xml.WebBeansXMLConfigurator;
 import org.jboss.jsr299.tck.api.DeploymentException;
 import org.jboss.jsr299.tck.spi.StandaloneContainers;
 
-public class StandaloneContainersImpl implements StandaloneContainers {
-
-    public void cleanup() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void deploy( Iterable<Class<?>> classes ) throws DeploymentException
{
-        // TODO Auto-generated method stub
-
-    }
-
-    public void deploy( List<Class<? extends Annotation>> enabledDeploymentTypes,
Iterable<Class<?>> classes )
-            throws DeploymentException {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void deploy( Iterable<Class<?>> classes, Iterable<URL> beansXmls
) throws DeploymentException {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setup() {
-        // TODO Auto-generated method stub
-
+public class StandaloneContainersImpl implements StandaloneContainers
+{
+    private TCKWebBeansContainerDeployer tckContainerDeployer = null;
+    private TCKManager tckManager = null;
+
+    public void cleanup()
+    {
+        this.tckContainerDeployer = null;
+        tckManager = null;
+    }
+
+    public void deploy(Iterable<Class<?>> classes) throws DeploymentException
+    {
+        Iterator<Class<?>> it = classes.iterator();
+        while(it.hasNext())
+        {
+            tckContainerDeployer.addBeanClass(it.next());
+        }
+        
+        tckContainerDeployer.deploy(null);
     }
 
-    public void undeploy() {
-        // TODO Auto-generated method stub
 
+    public void deploy(Iterable<Class<?>> classes, Iterable<URL> beansXmls)
throws DeploymentException
+    {
+        Iterator<Class<?>> it = classes.iterator();
+        while(it.hasNext())
+        {
+            tckContainerDeployer.addBeanClass(it.next());
+        }
+        
+//        Iterator<URL> itUrl = beansXmls.iterator();
+//        while(itUrl.hasNext())
+//        {
+//            tckContainerDeployer.addBeanXml(itUrl.next());
+//        }
+        
+        tckContainerDeployer.deploy(null);
+    }
+
+    public void setup()
+    {
+        this.tckContainerDeployer = new TCKWebBeansContainerDeployer(new WebBeansXMLConfigurator());
+        this.tckManager = TCKManager.getInstance();
+        
+        DeploymentTypeManager.getInstance().addNewDeploymentType(Production.class, 1);
+    }
+
+    public void undeploy()
+    {
+        this.tckManager.clear();
+        this.tckContainerDeployer.clear();
+        
     }
 
 }



Mime
View raw message