clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r1458182 - in /clerezza/trunk/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage: FileMGraphTest.java FileTcProviderTest.java
Date Tue, 19 Mar 2013 09:12:14 GMT
Author: reto
Date: Tue Mar 19 09:12:14 2013
New Revision: 1458182

URL: http://svn.apache.org/r1458182
Log:
CLEREZZA-747: creating correct uri from windows file path

Modified:
    clerezza/trunk/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileMGraphTest.java
    clerezza/trunk/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java

Modified: clerezza/trunk/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileMGraphTest.java
URL: http://svn.apache.org/viewvc/clerezza/trunk/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileMGraphTest.java?rev=1458182&r1=1458181&r2=1458182&view=diff
==============================================================================
--- clerezza/trunk/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileMGraphTest.java
(original)
+++ clerezza/trunk/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileMGraphTest.java
Tue Mar 19 09:12:14 2013
@@ -79,7 +79,8 @@ public class FileMGraphTest {
 	}
 	
 	protected static String getTempFileUri(String name) {
-		return FILE_PROTOCOL + tempDir + "/" + name;
+                String prefix = tempDir.startsWith("/") ? FILE_PROTOCOL : FILE_PROTOCOL +"/";
+		return prefix + tempDir.replace(File.separatorChar, '/') + "/" + name;
 	}
 
 	private static void deleteTempFile(String name)

Modified: clerezza/trunk/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
URL: http://svn.apache.org/viewvc/clerezza/trunk/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java?rev=1458182&r1=1458181&r2=1458182&view=diff
==============================================================================
--- clerezza/trunk/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
(original)
+++ clerezza/trunk/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
Tue Mar 19 09:12:14 2013
@@ -55,7 +55,8 @@ public class FileTcProviderTest extends 
 	
 	@Override
 	protected UriRef generateUri(String name) {
-		String path = FILE_PROTOCOL + testDir + "/";
+            String prefix = testDir.startsWith("/") ? FILE_PROTOCOL : FILE_PROTOCOL +"/";
+		String path =  prefix + testDir.replace('\\', '/') + "/";
 		return new UriRef(path + name + ".rdf");
 	}
 



Mime
View raw message