[jboss-cvs] JBossAS SVN: r84318 - in trunk/testsuite: imports/sections and 11 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 17 15:01:27 EST 2009


Author: adrian at jboss.org
Date: 2009-02-17 15:01:27 -0500 (Tue, 17 Feb 2009)
New Revision: 84318

Added:
   trunk/testsuite/src/main/org/jboss/test/deployers/spaces/
   trunk/testsuite/src/main/org/jboss/test/deployers/spaces/ejb/
   trunk/testsuite/src/main/org/jboss/test/deployers/spaces/ejb/SpacesEJB.java
   trunk/testsuite/src/main/org/jboss/test/deployers/spaces/lib/
   trunk/testsuite/src/main/org/jboss/test/deployers/spaces/lib/Spaces.java
   trunk/testsuite/src/main/org/jboss/test/deployers/spaces/test/
   trunk/testsuite/src/main/org/jboss/test/deployers/spaces/test/SpacesUnitTestCase.java
   trunk/testsuite/src/resources/deployers/spaces/
   trunk/testsuite/src/resources/deployers/spaces/ear/
   trunk/testsuite/src/resources/deployers/spaces/ear/META-INF/
   trunk/testsuite/src/resources/deployers/spaces/ear/META-INF/application.xml
   trunk/testsuite/src/resources/deployers/spaces/ejb/
   trunk/testsuite/src/resources/deployers/spaces/ejb/META-INF/
   trunk/testsuite/src/resources/deployers/spaces/ejb/META-INF/MANIFEST.MF
Modified:
   trunk/testsuite/build.xml
   trunk/testsuite/imports/sections/deployers.xml
Log:
[JBAS-6518] - Attempt to write a test

Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml	2009-02-17 15:44:02 UTC (rev 84317)
+++ trunk/testsuite/build.xml	2009-02-17 20:01:27 UTC (rev 84318)
@@ -861,6 +861,7 @@
     <include name="org/jboss/test/deployers/web/test/*UnitTestCase.class"/>
     <include name="org/jboss/test/deployers/jbas2904/test/*UnitTestCase.class"/>
     <include name="org/jboss/test/deployers/seam/test/*UnitTestCase.class"/>
+    <include name="org/jboss/test/deployers/spaces/test/*UnitTestCase.class"/>
   </patternset>
   <patternset id="profileservice.excludes">
     <exclude name="org/jboss/test/profileservice/test/*TestCase.class"/>
@@ -874,6 +875,7 @@
     <exclude name="org/jboss/test/deployers/web/test/*UnitTestCase.class"/>
     <exclude name="org/jboss/test/deployers/jbas2904/test/*UnitTestCase.class"/>
     <exclude name="org/jboss/test/deployers/seam/test/*UnitTestCase.class"/>
+    <exclude name="org/jboss/test/deployers/spaces/test/*UnitTestCase.class"/>
   </patternset>
   <patternset id="profileservice.restart.includes">
     <!-- include target for persisted admin changes -->

Modified: trunk/testsuite/imports/sections/deployers.xml
===================================================================
--- trunk/testsuite/imports/sections/deployers.xml	2009-02-17 15:44:02 UTC (rev 84317)
+++ trunk/testsuite/imports/sections/deployers.xml	2009-02-17 20:01:27 UTC (rev 84318)
@@ -317,6 +317,30 @@
          </fileset>
       </jar>
       
+      
+      <!-- build spaces.ear -->
+      <jar destfile="${build.lib}/spaces-ejb.jar"
+           manifest="${build.resources}/deployers/spaces/ejb/META-INF/MANIFEST.MF">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/test/deployers/spaces/ejb/**"/>
+         </fileset>
+      </jar>
+      <jar destfile="${build.lib}/spaces-lib.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/test/deployers/spaces/lib/**"/>
+         </fileset>
+      </jar>
+
+      <mkdir dir="${build.lib}/dir with spaces"/>
+      <ear destfile="${build.lib}/dir with spaces/spaces.ear"
+         appxml="${build.resources}/deployers/spaces/ear/META-INF/application.xml"
+         update="true">
+         <fileset dir="${build.lib}">
+            <include name="spaces-ejb.jar"/>
+            <include name="spaces-lib.jar"/>
+         </fileset>
+      </ear>
+
    </target>
    
    <!-- deployment test -->

Added: trunk/testsuite/src/main/org/jboss/test/deployers/spaces/ejb/SpacesEJB.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/spaces/ejb/SpacesEJB.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/spaces/ejb/SpacesEJB.java	2009-02-17 20:01:27 UTC (rev 84318)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.test.deployers.spaces.ejb;
+
+import javax.ejb.Stateless;
+
+import org.jboss.test.deployers.spaces.lib.Spaces;
+
+/**
+ * SpacesEJB.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Stateless
+public class SpacesEJB implements Spaces
+{
+   public void doStuff()
+   {
+   }
+}

Added: trunk/testsuite/src/main/org/jboss/test/deployers/spaces/lib/Spaces.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/spaces/lib/Spaces.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/spaces/lib/Spaces.java	2009-02-17 20:01:27 UTC (rev 84318)
@@ -0,0 +1,36 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.test.deployers.spaces.lib;
+
+import javax.ejb.Remote;
+
+/**
+ * Spaces.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Remote
+public interface Spaces
+{
+   void doStuff();
+}

Added: trunk/testsuite/src/main/org/jboss/test/deployers/spaces/test/SpacesUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/spaces/test/SpacesUnitTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/spaces/test/SpacesUnitTestCase.java	2009-02-17 20:01:27 UTC (rev 84318)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.test.deployers.spaces.test;
+
+import java.util.HashSet;
+
+import junit.framework.Test;
+import org.jboss.test.deployers.AbstractDeploymentTest;
+import org.jboss.managed.api.ManagedDeployment;
+
+/**
+ * A test that deploys everything in an EAR.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 81036 $
+ */
+public class SpacesUnitTestCase extends AbstractDeploymentTest
+{
+  
+   public void testEARDeployment() throws Exception
+   {
+      final HashSet expected = new HashSet();
+      expected.add("spaces.ear");
+      expected.add("spaces-ejb.jar");
+      
+      ManagedDeployment topInfo = assertDeployed("spaces.ear");
+      CheckExpectedDeploymentInfoVisitor visitor = new AbstractDeploymentTest.CheckExpectedDeploymentInfoVisitor(expected);
+      visitor.start(topInfo);
+      assertTrue("Expected subdeployments: " + expected, expected.isEmpty());
+   }
+   
+   public SpacesUnitTestCase(String test)
+   {
+      super(test);
+   }
+
+   public static Test suite() throws Exception
+   {
+      return getManagedDeployment(SpacesUnitTestCase.class, "dir%20with%20spaces/spaces.ear");
+   }
+}

Added: trunk/testsuite/src/resources/deployers/spaces/ear/META-INF/application.xml
===================================================================
--- trunk/testsuite/src/resources/deployers/spaces/ear/META-INF/application.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/deployers/spaces/ear/META-INF/application.xml	2009-02-17 20:01:27 UTC (rev 84318)
@@ -0,0 +1,17 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<application version="1.4"
+             xmlns="http://java.sun.com/xml/ns/j2ee"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
+                                 http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
+      >
+
+   <display-name>EAR Deployment Test</display-name>
+
+   <module>
+      <ejb>spaces-ejb.jar</ejb>
+   </module>
+
+</application>
+

Added: trunk/testsuite/src/resources/deployers/spaces/ejb/META-INF/MANIFEST.MF
===================================================================
--- trunk/testsuite/src/resources/deployers/spaces/ejb/META-INF/MANIFEST.MF	                        (rev 0)
+++ trunk/testsuite/src/resources/deployers/spaces/ejb/META-INF/MANIFEST.MF	2009-02-17 20:01:27 UTC (rev 84318)
@@ -0,0 +1 @@
+Class-Path: ./spaces-lib.jar




More information about the jboss-cvs-commits mailing list