Strabon

changeset 1063:94cac9923a49

Replaced "/" with FIle.separator.
author Panayiotis Smeros <psmeros@di.uoa.gr>
date Mon Apr 22 15:47:44 2013 +0300 (2013-04-22)
parents c2e43cb108d9
children 2e32beaa5a09
files testsuite/src/test/java/eu/earthobservatory/testsuite/utils/TemplateTest.java testsuite/src/test/java/eu/earthobservatory/testsuite/utils/Utils.java
line diff
     1.1 --- a/testsuite/src/test/java/eu/earthobservatory/testsuite/utils/TemplateTest.java	Mon Apr 22 14:24:39 2013 +0300
     1.2 +++ b/testsuite/src/test/java/eu/earthobservatory/testsuite/utils/TemplateTest.java	Mon Apr 22 15:47:44 2013 +0300
     1.3 @@ -47,8 +47,9 @@
     1.4  		resultsFile=new ArrayList<String>();
     1.5  		
     1.6  		String testname=this.getClass().getSimpleName();
     1.7 -		String testpackage=this.getClass().getPackage().getName().substring(this.getClass().getPackage().getName().lastIndexOf('.')+1);
     1.8 -		File testfolder = new File(this.getClass().getResource("/"+testpackage+"/"+testname+"/").getPath());
     1.9 +		
    1.10 +		String testpackage=this.getClass().getPackage().getName().substring(this.getClass().getPackage().getName().lastIndexOf('.')+1);		
    1.11 +		File testfolder = new File(this.getClass().getResource(File.separator+testpackage+File.separator+testname+File.separator).getPath());
    1.12  		
    1.13  		String[] files = testfolder.list();
    1.14  		
    1.15 @@ -56,12 +57,12 @@
    1.16  		{
    1.17  			if(file.endsWith(".nt") || file.endsWith(".nq"))
    1.18  			{
    1.19 -				this.datasetFile="/"+testpackage+"/"+testname+"/"+file;
    1.20 +				this.datasetFile=File.separator+testpackage+File.separator+testname+File.separator+file;
    1.21  			}
    1.22  			else if(file.endsWith(".rq"))
    1.23  			{
    1.24 -				this.queryFile.add("/"+testpackage+"/"+testname+"/"+file);
    1.25 -				this.resultsFile.add("/"+testpackage+"/"+testname+"/"+file.substring(0, file.length()-3)+".srx");
    1.26 +				this.queryFile.add(File.separator+testpackage+File.separator+testname+File.separator+file);
    1.27 +				this.resultsFile.add(File.separator+testpackage+File.separator+testname+File.separator+file.substring(0, file.length()-3)+".srx");
    1.28  			}
    1.29  		}
    1.30  	}
     2.1 --- a/testsuite/src/test/java/eu/earthobservatory/testsuite/utils/Utils.java	Mon Apr 22 14:24:39 2013 +0300
     2.2 +++ b/testsuite/src/test/java/eu/earthobservatory/testsuite/utils/Utils.java	Mon Apr 22 15:47:44 2013 +0300
     2.3 @@ -52,7 +52,7 @@
     2.4   */
     2.5  public class Utils
     2.6  {
     2.7 -	private static final String dbPropertiesFile="/databases.properties";
     2.8 +	private static final String dbPropertiesFile=File.separator+"databases.properties";
     2.9  	
    2.10  	private static String databaseTemplateName = null;
    2.11  	private static String defaultUser = null;