[jboss-cvs] JBossAS SVN: r84064 - projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 10 11:11:46 EST 2009


Author: alesj
Date: 2009-02-10 11:11:46 -0500 (Tue, 10 Feb 2009)
New Revision: 84064

Modified:
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/MetaDataStructureModificationTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/StructureModificationTest.java
Log:
Empty md location.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/MetaDataStructureModificationTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/MetaDataStructureModificationTestCase.java	2009-02-10 16:02:56 UTC (rev 84063)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/MetaDataStructureModificationTestCase.java	2009-02-10 16:11:46 UTC (rev 84064)
@@ -108,4 +108,27 @@
       jar.mkdir("META-INF");
       assertTrue(checker.hasStructureBeenModified(root));
    }
+
+   public void testInitialEmptyDir() throws Exception
+   {
+      AssembledDirectory top = createAssembledDirectory("top.jar", "top.jar");
+      AssembledDirectory metainf = top.mkdir("META-INF");
+      StructureModificationChecker checker = createStructureModificationChecker();
+
+      VFSDeploymentUnit vdu = assertDeploy(top);
+      try
+      {
+         VirtualFile root = vdu.getRoot();
+         assertFalse(checker.hasStructureBeenModified(root));
+
+         URL url = getResource("/scanning/smoke/META-INF/jboss-scanning.xml");
+         assertNotNull(url);
+         metainf.addChild(VFS.createNewRoot(url));
+         assertTrue(checker.hasStructureBeenModified(root));
+      }
+      finally
+      {
+         undeploy(vdu);
+      }
+   }
 }
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/StructureModificationTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/StructureModificationTest.java	2009-02-10 16:02:56 UTC (rev 84063)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/StructureModificationTest.java	2009-02-10 16:11:46 UTC (rev 84064)
@@ -40,6 +40,13 @@
       super(name);
    }
 
+   protected StructureModificationChecker createStructureModificationChecker()
+   {
+      MainDeployerStructure mainDeployer = assertBean("MainDeployer", MainDeployerStructure.class);
+      VirtualFileFilter filter = createFilter();
+      return createStructureModificationChecker(mainDeployer, filter);
+   }
+
    protected abstract StructureModificationChecker createStructureModificationChecker(MainDeployerStructure mainDeployerStructure, VirtualFileFilter filter);
 
    protected abstract VirtualFileFilter createFilter();
@@ -47,11 +54,8 @@
    public void testDoBasicTest() throws Exception
    {
       AssembledDirectory ear = createBasicEar();
+      StructureModificationChecker checker = createStructureModificationChecker();
 
-      MainDeployerStructure mainDeployer = assertBean("MainDeployer", MainDeployerStructure.class);
-      VirtualFileFilter filter = createFilter();      
-      StructureModificationChecker checker = createStructureModificationChecker(mainDeployer, filter);
-
       VFSDeploymentUnit deploymentUnit = assertDeploy(ear);
       try
       {




More information about the jboss-cvs-commits mailing list