[jboss-cvs] JBossAS SVN: r108154 - in projects/jboss-deployers/trunk: deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structurebuilder/test and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Sep 15 19:57:26 EDT 2010


Author: flavia.rainone at jboss.com
Date: 2010-09-15 19:57:26 -0400 (Wed, 15 Sep 2010)
New Revision: 108154

Added:
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/structurebuilder/predetermined/external_cp.txt
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/structurebuilder/predetermined/testClasspathEntriesWithExternalJar/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/structurebuilder/predetermined/testClasspathEntriesWithExternalJar/META-INF/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/structurebuilder/predetermined/testClasspathEntriesWithExternalJar/META-INF/jboss-structure.xml
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/structurebuilder/predetermined/testClasspathEntriesWithExternalJar/cp.txt
Modified:
   projects/jboss-deployers/trunk/deployers-structure-spi/src/test/java/org/jboss/test/deployers/structure/structurebuilder/AbstractStructureBuilderTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structurebuilder/test/FilesStructureBuilderUnitTestCase.java
Log:
[JBDEPLOY-265] Test AbstractStructureDeployer.getRelativePath with unrelated paths

Modified: projects/jboss-deployers/trunk/deployers-structure-spi/src/test/java/org/jboss/test/deployers/structure/structurebuilder/AbstractStructureBuilderTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-structure-spi/src/test/java/org/jboss/test/deployers/structure/structurebuilder/AbstractStructureBuilderTest.java	2010-09-15 22:24:51 UTC (rev 108153)
+++ projects/jboss-deployers/trunk/deployers-structure-spi/src/test/java/org/jboss/test/deployers/structure/structurebuilder/AbstractStructureBuilderTest.java	2010-09-15 23:57:26 UTC (rev 108154)
@@ -198,6 +198,23 @@
       return deployment;
    }
 
+   public void testClasspathEntriesWithExternalJar() throws Exception
+   {
+      Deployment deployment = createClasspathEntriesWithExternalJar();
+      DeploymentContext context = build(deployment);
+      checkDeployment(context, deployment);
+   }
+
+   protected Deployment createClasspathEntriesWithExternalJar() throws Exception
+   {
+      DeploymentFactory factory = getDeploymentFactory();
+      Deployment deployment = createDeployment();
+      ContextInfo contextInfo = factory.addContext(deployment, "");
+      contextInfo.addClassPathEntry(DeploymentFactory.createClassPathEntry("cp.txt"));
+      contextInfo.addClassPathEntry(DeploymentFactory.createClassPathEntry("../external_cp.txt"));
+      return deployment;
+   }
+
    protected void checkDeployment(DeploymentContext context, Deployment deployment) throws Exception
    {
       assertNotNull(context);

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structurebuilder/test/FilesStructureBuilderUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structurebuilder/test/FilesStructureBuilderUnitTestCase.java	2010-09-15 22:24:51 UTC (rev 108153)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structurebuilder/test/FilesStructureBuilderUnitTestCase.java	2010-09-15 23:57:26 UTC (rev 108154)
@@ -54,6 +54,7 @@
       super(name);
    }
 
+   @Override
    protected DeploymentContext build(Deployment deployment) throws DeploymentException
    {
       return deployment.getPredeterminedManagedObjects().getAttachment(DeploymentContext.class);
@@ -84,37 +85,49 @@
       return createDeployment(new DeclaredStructure(), new ChildFileStructure(), new JARStructure());
    }
 
+   @Override
    protected Deployment createSimple() throws Exception
    {
       return createDefaultDeployment();
    }
 
+   @Override
    protected Deployment createSimpleWithAttachment() throws Exception
    {
       return createDefaultDeployment();
    }
 
+   @Override
    protected Deployment createOneChild() throws Exception
    {
       return createDefaultDeployment();
    }
 
+   @Override
    protected Deployment createManyChildren() throws Exception
    {
       return createDefaultDeployment();
    }
 
+   @Override
    protected Deployment createMetaDataLocation() throws Exception
    {
       return createDefaultDeployment();
    }
 
+   @Override
    protected Deployment createClasspathEntries() throws Exception
    {
       return createDefaultDeployment();
    }
 
    @Override
+   protected Deployment createClasspathEntriesWithExternalJar() throws Exception
+   {
+      return createDefaultDeployment();
+   }
+
+   @Override
    public void testOrderedChildren() throws Exception
    {
       // ignore this test

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/structurebuilder/predetermined/external_cp.txt
===================================================================


Property changes on: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/structurebuilder/predetermined/external_cp.txt
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Rev URL
Name: svn:eol-style
   + native

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/structurebuilder/predetermined/testClasspathEntriesWithExternalJar/META-INF/jboss-structure.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/structurebuilder/predetermined/testClasspathEntriesWithExternalJar/META-INF/jboss-structure.xml	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/structurebuilder/predetermined/testClasspathEntriesWithExternalJar/META-INF/jboss-structure.xml	2010-09-15 23:57:26 UTC (rev 108154)
@@ -0,0 +1,9 @@
+<structure>
+	<context>
+		<path name=""/>
+      <classpath>
+			<path name="cp.txt"/>
+			<path name="../external_cp.txt"/>
+		</classpath>
+	</context>
+</structure>

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/structurebuilder/predetermined/testClasspathEntriesWithExternalJar/cp.txt
===================================================================


Property changes on: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/structurebuilder/predetermined/testClasspathEntriesWithExternalJar/cp.txt
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Rev URL
Name: svn:eol-style
   + native



More information about the jboss-cvs-commits mailing list