openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r799962 - in /incubator/openwebbeans/trunk/webbeans-tck: ./ src/test/java/org/apache/webbeans/test/tck/
Date Sat, 01 Aug 2009 23:50:09 GMT
Author: struberg
Date: Sat Aug  1 23:50:09 2009
New Revision: 799962

URL: http://svn.apache.org/viewvc?rev=799962&view=rev
Log:
OWB-122 make compile with latest TCK suite

Modified:
    incubator/openwebbeans/trunk/webbeans-tck/pom.xml
    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/ContextsImpl.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/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-tck/pom.xml?rev=799962&r1=799961&r2=799962&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-tck/pom.xml (original)
+++ incubator/openwebbeans/trunk/webbeans-tck/pom.xml Sat Aug  1 23:50:09 2009
@@ -33,7 +33,7 @@
 	<description>All TCK tests for the  OpenWebBeans Implementation</description>
 
     <properties>
-        <webbeans.tck.version>1.0.0.BETA2</webbeans.tck.version>
+        <webbeans.tck.version>1.0.0-SNAPSHOT</webbeans.tck.version>
     </properties>
     
     <dependencies>

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=799962&r1=799961&r2=799962&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
Sat Aug  1 23:50:09 2009
@@ -32,22 +32,27 @@
 
     }
 
-    public void deploy(InputStream archive, String name) throws DeploymentException, IOException
+    public boolean deploy(InputStream archive, String name)
     {
-        if(archive.available() > 0)
+        try
         {
-            File file = new File("/home/gurkanerdogdu/jboss-4.2.3.GA/server/default/deploy/"
+ name);
-            FileOutputStream os = new FileOutputStream(file);            
-            byte temp[] = new byte[512];
-            
-            while(archive.read(temp) != -1)
+            if(archive.available() > 0)
             {
-                os.write(temp);
-            }            
-    
-        }
+                File file = new File("target/container/" + name);
+                FileOutputStream os = new FileOutputStream(file);            
+                byte temp[] = new byte[512];
                 
-        
+                while(archive.read(temp) != -1)
+                {
+                    os.write(temp);
+                }            
+   
+            }
+        } catch (Exception e)
+        {
+            throw new RuntimeException(e);
+        }
+        return false;
     }
 
     public void setup() throws IOException
@@ -60,4 +65,10 @@
 
     }
 
+    public DeploymentException getDeploymentException()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
 }

Modified: incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ContextsImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ContextsImpl.java?rev=799962&r1=799961&r2=799962&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ContextsImpl.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-tck/src/test/java/org/apache/webbeans/test/tck/ContextsImpl.java
Sat Aug  1 23:50:09 2009
@@ -1,50 +1,50 @@
-///*
-// * Licensed to the Apache Software Foundation (ASF) under one or more
-// * contributor license agreements. See the NOTICE file distributed with this
-// * work for additional information regarding copyright ownership. The ASF
-// * licenses this file to You 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.apache.webbeans.test.tck;
-//
-//import org.apache.webbeans.context.AbstractContext;
-//import org.apache.webbeans.context.ContextFactory;
-//import org.apache.webbeans.context.type.ContextTypes;
-//import org.jboss.jsr299.tck.spi.Contexts;
-//
-//public class ContextsImpl implements Contexts<AbstractContext>
-//{
-//
-//    public AbstractContext getRequestContext()
-//    {
-//        ContextFactory.initRequestContext(null);
-//        return (AbstractContext) ContextFactory.getStandartContext(ContextTypes.REQUEST);
-//    }
-//
-//    public void setActive(AbstractContext context)
-//    {
-//        context.setActive(true);
-//        
-//    }
-//
-//    public void setInactive(AbstractContext context)
-//    {
-//        context.setActive(false);
-//    }
-//
-//    public AbstractContext getDependentContext() {
-//        return (AbstractContext) ContextFactory.getStandartContext(ContextTypes.DEPENDENT);
-//    }
-//
-//    public void destroyContext(AbstractContext context)
-//    {
-//        context.destroy();
-//    }
-//
-//}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You 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.apache.webbeans.test.tck;
+
+import org.apache.webbeans.context.AbstractContext;
+import org.apache.webbeans.context.ContextFactory;
+import org.apache.webbeans.context.type.ContextTypes;
+import org.jboss.jsr299.tck.spi.Contexts;
+
+public class ContextsImpl implements Contexts<AbstractContext>
+{
+
+    public AbstractContext getRequestContext()
+    {
+        ContextFactory.initRequestContext(null);
+        return (AbstractContext) ContextFactory.getStandartContext(ContextTypes.REQUEST);
+    }
+
+    public void setActive(AbstractContext context)
+    {
+        context.setActive(true);
+        
+    }
+
+    public void setInactive(AbstractContext context)
+    {
+        context.setActive(false);
+    }
+
+    public AbstractContext getDependentContext() {
+        return (AbstractContext) ContextFactory.getStandartContext(ContextTypes.DEPENDENT);
+    }
+
+    public void destroyContext(AbstractContext context)
+    {
+        context.destroy();
+    }
+
+}

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=799962&r1=799961&r2=799962&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
Sat Aug  1 23:50:09 2009
@@ -1,47 +1,60 @@
-///*
-// * Licensed to the Apache Software Foundation (ASF) under one or more
-// * contributor license agreements. See the NOTICE file distributed with this
-// * work for additional information regarding copyright ownership. The ASF
-// * licenses this file to You 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.apache.webbeans.test.tck;
-//
-//import java.lang.annotation.Annotation;
-//import java.util.List;
-//
-//import javax.enterprise.inject.spi.BeanManager;
-//
-//import org.apache.webbeans.container.activity.ActivityManager;
-//import org.apache.webbeans.context.ContextFactory;
-//import org.apache.webbeans.deployment.DeploymentTypeManager;
-//import org.apache.webbeans.test.mock.MockHttpSession;
-//import org.jboss.jsr299.tck.spi.Managers;
-//
-//public class ManagersImpl implements Managers
-//{
-//
-//    public List<Class<? extends Annotation>> getEnabledDeploymentTypes()
-//    {
-//        
-//        return DeploymentTypeManager.getInstance().getEnabledDeploymentTypes();
-//    }
-//
-//    public BeanManager getManager()
-//    {
-//
-//        ContextFactory.initApplicationContext(null);
-//        ContextFactory.initRequestContext(null);
-//        ContextFactory.initSessionContext(new MockHttpSession());
-//        ContextFactory.initConversationContext(null);
-//
-//        return ActivityManager.getInstance().getRootActivity();
-//    }
-//
-//}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You 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.apache.webbeans.test.tck;
+
+import java.lang.annotation.Annotation;
+import java.util.List;
+
+import javax.enterprise.inject.spi.BeanManager;
+
+import org.apache.webbeans.container.activity.ActivityManager;
+import org.apache.webbeans.context.ContextFactory;
+import org.apache.webbeans.deployment.DeploymentTypeManager;
+import org.apache.webbeans.test.mock.MockHttpSession;
+import org.jboss.jsr299.tck.spi.Managers;
+import org.jboss.testharness.api.DeploymentException;
+
+public class ManagersImpl implements Managers
+{
+
+    public List<Class<? extends Annotation>> getEnabledDeploymentTypes()
+    {
+        
+        return DeploymentTypeManager.getInstance().getEnabledDeploymentTypes();
+    }
+
+    public BeanManager getManager()
+    {
+
+        ContextFactory.initApplicationContext(null);
+        ContextFactory.initRequestContext(null);
+        ContextFactory.initSessionContext(new MockHttpSession());
+        ContextFactory.initConversationContext(null);
+
+        return ActivityManager.getInstance().getRootActivity();
+    }
+
+    public boolean isDefinitionError(DeploymentException deploymentException)
+    {
+        //X TODO
+        return false;
+    }
+
+    public boolean isDeploymentError(DeploymentException deploymentException)
+    {
+        //X TODO
+        return false;
+    }
+
+}

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=799962&r1=799961&r2=799962&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
Sat Aug  1 23:50:09 2009
@@ -51,13 +51,13 @@
             
         }catch(Exception e)
         {
-            throw new DeploymentException(e);
+            throw new DeploymentException(e.getMessage());
         }
         
     }
 
 
-    public void deploy(Iterable<Class<?>> classes, Iterable<URL> beansXmls)
throws DeploymentException
+    public boolean deploy(Iterable<Class<?>> classes, Iterable<URL> beansXmls)
     {
         try
         {
@@ -81,10 +81,9 @@
         }
         catch(Exception e)
         {
-            throw new DeploymentException(e);
+            throw new RuntimeException(e);
         }
-        
-        
+        return false;
     }
 
     public void setup()
@@ -97,4 +96,9 @@
         this.lifeCycle.applicationEnded(this.servletContextEvent);
     }
 
+    public DeploymentException getDeploymentException()
+    {
+        return new DeploymentException("StandaloneContainer");
+    }
+
 }



Mime
View raw message