Merge pull request #123 from eric-milles/IVY-1410-test

rewrite test case to specify files inline
diff --git a/test/java/org/apache/ivy/core/deliver/DeliverTest.java b/test/java/org/apache/ivy/core/deliver/DeliverTest.java
index 1ae6e9d..9daacb6 100644
--- a/test/java/org/apache/ivy/core/deliver/DeliverTest.java
+++ b/test/java/org/apache/ivy/core/deliver/DeliverTest.java
@@ -48,25 +48,6 @@
         cacheDir.mkdirs();
     }
 
-    /**
-     * Test case for <a href="https://issues.apache.org/jira/browse/IVY-1410">IVY-1410</a>.
-     */
-    @Test
-    public void testDeliver1410() throws Exception {
-        Project project = ivyDeliver.getProject();
-        project.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
-        File ivyFile = new File(new URI(DeliverTest.class.getResource("ivy-1410.xml").toString()));
-
-        resolve(ivyFile);
-
-        ivyDeliver.setReplacedynamicrev(true);
-        ivyDeliver.doExecute();
-
-        String deliverContent = readFile(deliverDir.getAbsolutePath() + "/ivys/ivy-1.0.xml");
-        assertTrue(deliverContent.contains("org=\"org1\" name=\"mod1.1\" rev=\"1.1\""));
-        assertTrue(deliverContent.contains("org=\"org2\" name=\"mod2.1\" rev=\"0.7\""));
-    }
-
     private void resolve(File ivyFile) {
         IvyResolve ivyResolve = new IvyResolve();
         ivyResolve.setProject(ivyDeliver.getProject());
@@ -145,6 +126,43 @@
     }
 
     /**
+     * Test case for <a href="https://issues.apache.org/jira/browse/IVY-1410">IVY-1410</a>.
+     */
+    @Test
+    public void testDeliver1410() throws Exception {
+        ivyDeliver.getProject().setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
+
+        String ivyFile
+            = "<ivy-module version='2.0'>\n"
+            + "  <info organisation='org' module='xxx'/>\n"
+            + "  <dependencies>\n"
+            + "    <dependency org='org1' name='mod1.1' rev='1.+'/>\n"
+            + "  </dependencies>\n"
+            + "</ivy-module>\n";
+
+        ivyFile
+            = "<ivy-module version='2.0'>\n"
+            + "  <info organisation='org' module='yyy' revision='1.0'>\n"
+            + "    <extends organisation='org' module='xxx' extendType='dependencies'\n"
+            + "      location='" + writeFile(ivyFile).getName() + "' revision='latest'/>\n"
+            + "  </info>\n"
+            + "  <dependencies>\n"
+            + "    <dependency org='org2' name='mod2.1' rev='0.+'/>\n"
+            + "  </dependencies>\n"
+            + "</ivy-module>\n";
+
+        resolve(writeFile(ivyFile));
+
+        ivyDeliver.setReplacedynamicrev(true);
+        ivyDeliver.doExecute();
+
+        ivyFile = readFile(deliverDir.getAbsolutePath() + "/ivys/ivy-1.0.xml");
+
+        assertTrue(ivyFile.contains("org=\"org1\" name=\"mod1.1\" rev=\"1.1\""));
+        assertTrue(ivyFile.contains("org=\"org2\" name=\"mod2.1\" rev=\"0.7\""));
+    }
+
+    /**
      * Test case for <a href="https://issues.apache.org/jira/browse/IVY-1658">IVY-1658</a>.
      */
     @Test
diff --git a/test/java/org/apache/ivy/core/deliver/ivy-1410-parent.xml b/test/java/org/apache/ivy/core/deliver/ivy-1410-parent.xml
deleted file mode 100644
index 31f59d3..0000000
--- a/test/java/org/apache/ivy/core/deliver/ivy-1410-parent.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-   distributed with this work for additional information
-   regarding copyright ownership.  The ASF licenses this file
-   to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance
-   with the License.  You may obtain a copy of the License at
-
-     https://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing,
-   software distributed under the License is distributed on an
-   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-   KIND, either express or implied.  See the License for the
-   specific language governing permissions and limitations
-   under the License.
--->
-<ivy-module version="2.0">
-    <info organisation="org" module="xxx"/>
-    <dependencies>
-        <dependency org="org1" name="mod1.1" rev="1.+"/>
-    </dependencies>
-</ivy-module>
diff --git a/test/java/org/apache/ivy/core/deliver/ivy-1410.xml b/test/java/org/apache/ivy/core/deliver/ivy-1410.xml
deleted file mode 100644
index 459e18c..0000000
--- a/test/java/org/apache/ivy/core/deliver/ivy-1410.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-   distributed with this work for additional information
-   regarding copyright ownership.  The ASF licenses this file
-   to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance
-   with the License.  You may obtain a copy of the License at
-
-     https://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing,
-   software distributed under the License is distributed on an
-   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-   KIND, either express or implied.  See the License for the
-   specific language governing permissions and limitations
-   under the License.
--->
-<ivy-module version="2.0">
-    <info organisation="org" module="yyy" revision="1.0">
-        <extends organisation="org" module="xxx" extendType="dependencies"
-                 location="ivy-1410-parent.xml" revision="latest"/>
-    </info>
-    <dependencies>
-        <dependency org="org2" name="mod2.1" rev="0.+"/>
-    </dependencies>
-</ivy-module>
\ No newline at end of file