[jboss-cvs] JBossAS SVN: r61674 - in projects/microcontainer/trunk/deployers/src: resources/tests/structure/ear/complexwithappxml.ear/META-INF and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Mar 25 11:57:33 EDT 2007


Author: scott.stark at jboss.org
Date: 2007-03-25 11:57:33 -0400 (Sun, 25 Mar 2007)
New Revision: 61674

Added:
   projects/microcontainer/trunk/deployers/src/resources/tests/structure/ear/complexwithappxml.ear/subdir/
   projects/microcontainer/trunk/deployers/src/resources/tests/structure/ear/complexwithappxml.ear/subdir/relative.jar/
Modified:
   projects/microcontainer/trunk/deployers/src/resources/tests/structure/ear/complexwithappxml.ear/META-INF/application.properties
   projects/microcontainer/trunk/deployers/src/tests/org/jboss/test/deployers/structure/ear/test/EARStructureUnitTestCase.java
Log:
Test ear structural subdir elements

Modified: projects/microcontainer/trunk/deployers/src/resources/tests/structure/ear/complexwithappxml.ear/META-INF/application.properties
===================================================================
--- projects/microcontainer/trunk/deployers/src/resources/tests/structure/ear/complexwithappxml.ear/META-INF/application.properties	2007-03-25 15:50:29 UTC (rev 61673)
+++ projects/microcontainer/trunk/deployers/src/resources/tests/structure/ear/complexwithappxml.ear/META-INF/application.properties	2007-03-25 15:57:33 UTC (rev 61674)
@@ -6,3 +6,4 @@
 mcf1-ds=module-mcf1-ds.xml
 rar1=module-mcf1.rar
 war1=module-web1.war
+bean2ejb=subdir/relative.jar

Modified: projects/microcontainer/trunk/deployers/src/tests/org/jboss/test/deployers/structure/ear/test/EARStructureUnitTestCase.java
===================================================================
--- projects/microcontainer/trunk/deployers/src/tests/org/jboss/test/deployers/structure/ear/test/EARStructureUnitTestCase.java	2007-03-25 15:50:29 UTC (rev 61673)
+++ projects/microcontainer/trunk/deployers/src/tests/org/jboss/test/deployers/structure/ear/test/EARStructureUnitTestCase.java	2007-03-25 15:57:33 UTC (rev 61674)
@@ -46,7 +46,7 @@
  * Mock ear structure deployer tests
  * 
  * @author Scott.Stark at jboss.org
- * @version $Revision: 1.1 $
+ * @version $Revision$
  */
 public class EARStructureUnitTestCase extends BaseDeployersTest
 {
@@ -181,7 +181,9 @@
    }
 
    /**
-    * Validate a ear with modules having subdeployments 
+    * Validate a ear type of structure specified via the ear
+    * META-INF/application.properties parsed by the MockEarStructureDeployer.
+    * The ear modules having subdeployments 
     * @throws Exception
     */
    public void testComplexWithAppXml() throws Exception
@@ -192,7 +194,8 @@
       assertEquals("classpath.size = 1", 1, classpath.size());
       VirtualFile earFile = ear.getRoot();
       VirtualFile j0 = earFile.findChild("lib/lib0.jar");
-      assertTrue("lib/j0.jar in classpath", classpath.contains(j0));
+      // Should be in classpath due to default ear lib logic
+      assertTrue("lib/lib0.jar in classpath", classpath.contains(j0));
       // Validate that the expected module contexts exist
       HashSet<String> expected = new HashSet<String>();
       URL rootURL = ear.getRoot().toURL();
@@ -204,9 +207,12 @@
       expected.add("module-mcf1-ds.xml");
       expected.add("module-mcf1.rar/");
       expected.add("module-web1.war/");
+      expected.add("subdir/relative.jar/");
       Set<DeploymentContext> children = ear.getChildren();
       Set<String> childPaths = super.createDeploymentPathSet(children, rootURL);
-      assertEquals("ear child count", expected, childPaths);
+      assertEquals("ear child DeploymentContext paths", expected, childPaths);
+      // lib/lib0.jar should not have a DeploymentContext
+      assertFalse("lib/lib0.jar is not a DeploymentContext", childPaths.contains("lib/lib0.jar"));
 
       // Validate that the expected module subdeployments are there
       Map<String, DeploymentContext> pathMap = createDeploymentPathMap(ear);
@@ -220,7 +226,6 @@
       assertNotNull("complexwithappxml.ear/submbean2-service.xml", submbean2);
       assertEquals("submbean2-service.xml", "/module-mbean1.sar/submbean2-service.xml", submbean2.getRelativePath());
       assertEquals("submbean2-service.xml", "submbean2-service.xml", submbean2.getSimpleName());
-
    }
 
    /**


Property changes on: projects/microcontainer/trunk/deployers/src/tests/org/jboss/test/deployers/structure/ear/test/EARStructureUnitTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision




More information about the jboss-cvs-commits mailing list