cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1443698 - in /cayenne/main/trunk/framework: cayenne-project/src/test/java/org/apache/cayenne/project/FileProjectSaverTest.java maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoTest.java
Date Thu, 07 Feb 2013 20:20:49 GMT
Author: aadamchik
Date: Thu Feb  7 20:20:48 2013
New Revision: 1443698

URL: http://svn.apache.org/r1443698
Log:
CAY-1793 Cayenne build failed on MS Windows

patch by Ilya Drabenia

Modified:
    cayenne/main/trunk/framework/cayenne-project/src/test/java/org/apache/cayenne/project/FileProjectSaverTest.java
    cayenne/main/trunk/framework/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoTest.java

Modified: cayenne/main/trunk/framework/cayenne-project/src/test/java/org/apache/cayenne/project/FileProjectSaverTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-project/src/test/java/org/apache/cayenne/project/FileProjectSaverTest.java?rev=1443698&r1=1443697&r2=1443698&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-project/src/test/java/org/apache/cayenne/project/FileProjectSaverTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-project/src/test/java/org/apache/cayenne/project/FileProjectSaverTest.java
Thu Feb  7 20:20:48 2013
@@ -142,7 +142,7 @@ public class FileProjectSaverTest extend
     public void testSaveForProjectFileWithRelatedPaths() throws Exception {
         File testFolder = setupTestDirectory("testSaveForProjectFileWithRelatedPaths");
 
-        String mapFilePath = "file:" + testFolder.getCanonicalPath() + "/../test.map.xml";
+        String mapFilePath = testFolder.toURI() + "../test.map.xml";
         String mapFileName = "test";
         DataMap testDataMap = new DataMap(mapFileName);
         testDataMap.setConfigurationSource(new URLResource(new URL(mapFilePath)));

Modified: cayenne/main/trunk/framework/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoTest.java?rev=1443698&r1=1443697&r2=1443698&view=diff
==============================================================================
--- cayenne/main/trunk/framework/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoTest.java
(original)
+++ cayenne/main/trunk/framework/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoTest.java
Thu Feb  7 20:20:48 2013
@@ -32,7 +32,7 @@ public class DbImporterMojoTest extends 
         DbImporterMojo importer1 = (DbImporterMojo) lookupMojo("cdbimport", pom1);
         DbImportParameters parameters1 = importer1.toParameters();
         assertNull(parameters1.getMeaningfulPkTables());
-        assertEquals("target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml", parameters1.getDataMapFile()
+        assertPathEquals("target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml",
parameters1.getDataMapFile()
                 .getPath());
 
         File pom2 = getTestFile("src/test/resources/org/apache/cayenne/tools/dbimporter-pom2.xml");
@@ -52,7 +52,7 @@ public class DbImporterMojoTest extends 
         DbImporterMojo importer1 = (DbImporterMojo) lookupMojo("cdbimport", pom1);
         DbImportParameters parameters1 = importer1.toParameters();
         assertNotNull(parameters1.getDataMapFile());
-        assertEquals("target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml", parameters1.getDataMapFile()
+        assertPathEquals("target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml",
parameters1.getDataMapFile()
                 .getPath());
 
         File pom2 = getTestFile("src/test/resources/org/apache/cayenne/tools/dbimporter-pom2.xml");
@@ -60,4 +60,8 @@ public class DbImporterMojoTest extends 
         DbImportParameters parameters2 = importer2.toParameters();
         assertNull(parameters2.getDataMapFile());
     }
+
+    private void assertPathEquals(String expectedPath, String actualPath) {
+        assertEquals(new File(expectedPath), new File(actualPath));
+    }
 }



Mime
View raw message