[jboss-cvs] JBossAS SVN: r64940 - in trunk/ejb3: src/test/org/jboss/ejb3/test and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Aug 29 03:23:16 EDT 2007


Author: ALRubinger
Date: 2007-08-29 03:23:16 -0400 (Wed, 29 Aug 2007)
New Revision: 64940

Added:
   trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/
   trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderService.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit/
   trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit/FailLocalRemoteNotSpecifiedUnitTestCase.java
Removed:
   trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderService.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit/
   trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit/FailLocalRemoteNotSpecifiedUnitTestCase.java
Modified:
   trunk/ejb3/build-test.xml
Log:
EJBTHREE-1025: Merged Carlo's test cases and associated test build from Branch 4.2, Revision 64470.  Modified Unit Test to check for proper error (DeploymentException) when illegal construct is encountered on deployment.

Modified: trunk/ejb3/build-test.xml
===================================================================
--- trunk/ejb3/build-test.xml	2007-08-29 00:07:42 UTC (rev 64939)
+++ trunk/ejb3/build-test.xml	2007-08-29 07:23:16 UTC (rev 64940)
@@ -2113,7 +2113,21 @@
          </fileset>
       </jar>
    </target>
-
+	   
+   <target name="ejbthree1025"
+      description="Builds a simple jar files."
+      depends="compile-classes">
+      
+      <build-simple-jar name="ejbthree1025"/>
+   </target>
+   
+   <target name="jbas4489"
+      description="Builds a simple jar files."
+      depends="compile-classes">
+      
+      <build-simple-jar name="jbas4489"/>
+   </target>
+   
    <target name="jaxws"
       description="Builds a simple jar."
       depends="compile-classes">
@@ -3610,7 +3624,7 @@
       ejbthree454, ejbthree653, ejbthree670, ejbthree712, ejbthree724, ejbthree751, ejbthree832, ejbthree921, ejbthree936,
       ejbthree939,
       ejbthree953, ejbthree957, ejbthree959, ejbthree963, ejbthree967, ejbthree971, ejbthree973, ejbthree985, ejbthree986,
-      ejbthree989, ejbthree1020, ejbthree1023,
+      ejbthree989, ejbthree1020, ejbthree1023, ejbthree1025,
       jaxws,
       aspectdomain, ejbcontext, schema, mail, scopedclassloader, dependency,
       securitydomain, enventry, security5,
@@ -4527,8 +4541,14 @@
          <param name="test" value="ejbthree1023"/>
       </antcall>
       <antcall target="test" inheritRefs="true">
+         <param name="test" value="ejbthree1025"/>
+      </antcall>
+      <antcall target="test" inheritRefs="true">
          <param name="test" value="statelesscreation"/>
-      </antcall>      
+      </antcall>
+      <antcall target="test" inheritRefs="true">
+         <param name="test" value="jbas4489"/>
+      </antcall>
    </target>
 
    <target name="entity-tests" depends="init" description="Execute all tests">

Copied: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025 (from rev 64470, branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025)

Deleted: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderService.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderService.java	2007-08-06 14:50:04 UTC (rev 64470)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderService.java	2007-08-29 07:23:16 UTC (rev 64940)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.test.ejbthree1025;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public interface OrderService
-{
-
-}

Copied: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderService.java (from rev 64470, branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderService.java)
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderService.java	                        (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderService.java	2007-08-29 07:23:16 UTC (rev 64940)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.ejbthree1025;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public interface OrderService
+{
+
+}

Deleted: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java	2007-08-06 14:50:04 UTC (rev 64470)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java	2007-08-29 07:23:16 UTC (rev 64940)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.test.ejbthree1025;
-
-import javax.ejb.Local;
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-
-/**
- * This is an illegal construct.
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
- at Stateless
- at Local
- at Remote
-public class OrderServiceBean implements OrderService
-{
-
-}

Copied: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java (from rev 64470, branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java)
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java	                        (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java	2007-08-29 07:23:16 UTC (rev 64940)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.ejbthree1025;
+
+import javax.ejb.Local;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+/**
+ * This is an illegal construct.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at Local
+ at Remote
+public class OrderServiceBean implements OrderService
+{
+
+}

Copied: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit (from rev 64470, branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit)

Deleted: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit/FailLocalRemoteNotSpecifiedUnitTestCase.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit/FailLocalRemoteNotSpecifiedUnitTestCase.java	2007-08-06 14:50:04 UTC (rev 64470)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit/FailLocalRemoteNotSpecifiedUnitTestCase.java	2007-08-29 07:23:16 UTC (rev 64940)
@@ -1,66 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.test.ejbthree1025.unit;
-
-import junit.framework.Test;
-
-import org.jboss.test.JBossTestCase;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public class FailLocalRemoteNotSpecifiedUnitTestCase extends JBossTestCase
-{
-   public FailLocalRemoteNotSpecifiedUnitTestCase(String name)
-   {
-      super(name);
-   }
-
-   public static Test suite() throws Exception
-   {
-      // do not deploy any jars
-      return getDeploySetup(FailLocalRemoteNotSpecifiedUnitTestCase.class, null);
-   }
-   
-   @Override
-   protected void tearDown() throws Exception
-   {
-      undeploy("ejbthree1025.jar");
-      super.tearDown();
-   }
-   
-   public void testDeploymentFailure() throws Exception
-   {
-      try
-      {
-         redeploy("ejbthree1025.jar");
-         fail("should throw an exception");
-      }
-      catch(Exception e)
-      {
-         // TODO: check exception
-      }
-   }
-}

Copied: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit/FailLocalRemoteNotSpecifiedUnitTestCase.java (from rev 64470, branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit/FailLocalRemoteNotSpecifiedUnitTestCase.java)
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit/FailLocalRemoteNotSpecifiedUnitTestCase.java	                        (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1025/unit/FailLocalRemoteNotSpecifiedUnitTestCase.java	2007-08-29 07:23:16 UTC (rev 64940)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.ejbthree1025.unit;
+
+import junit.framework.Test;
+
+import org.jboss.deployment.DeploymentException;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision$
+ */
+public class FailLocalRemoteNotSpecifiedUnitTestCase extends JBossTestCase
+{
+   public FailLocalRemoteNotSpecifiedUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite() throws Exception
+   {
+      // do not deploy any jars
+      return getDeploySetup(FailLocalRemoteNotSpecifiedUnitTestCase.class, null);
+   }
+
+   @Override
+   protected void tearDown() throws Exception
+   {
+      undeploy("ejbthree1025.jar");
+      super.tearDown();
+   }
+
+   public void testDeploymentFailure() throws Exception
+   {
+
+      // Define expected exception
+      Class exceptionExpected = DeploymentException.class;
+
+      try
+      {
+         redeploy("ejbthree1025.jar");
+         fail("Should throw " + exceptionExpected.getName());
+      }
+      catch (Exception e)
+      {
+         // Ensure expected error is thrown
+         if (e.getClass().equals(exceptionExpected))
+         {
+            // Log Success for clarity
+            log.info("testDeploymentFailure SUCCESS; \"" + exceptionExpected.getName()
+                  + "\" received as expected for illegal construct");
+            return;
+         }
+
+         // Proper exception was not thrown
+         log.error(e);
+         fail("Exception received, " + e.getClass().getName() + ", was not expected : " + exceptionExpected.getName());
+
+      }
+   }
+}




More information about the jboss-cvs-commits mailing list