Strabon
changeset 168:194bf9ccb2f1
Fixed
line diff
1.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/generaldb/AggregateTests.java Fri May 18 17:53:48 2012 +0300 1.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/generaldb/AggregateTests.java Fri May 18 22:46:13 2012 +0300 1.3 @@ -25,18 +25,7 @@ 1.4 protected static java.sql.Connection conn = null; 1.5 protected static String databaseName = null; 1.6 1.7 -// @BeforeClass 1.8 -// public abstract static void initialize() throws SQLException, ClassNotFoundException 1.9 -// { 1.10 -// strabon = new Strabon("cco2","postgres","p1r3as", 5432, "localhost", true); 1.11 -// } 1.12 - 1.13 - protected static void loadTestData() 1.14 - throws RDFParseException, RepositoryException, IOException, RDFHandlerException, InvalidDatasetFormatFault 1.15 - { 1.16 - URL src = SimpleTests.class.getResource("/aggregate-tests.ntriples"); 1.17 - strabon.storeInRepo(src, "NTRIPLES"); 1.18 - } 1.19 + 1.20 1.21 1.22
2.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/generaldb/GeneralTests.java Fri May 18 17:53:48 2012 +0300 2.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/generaldb/GeneralTests.java Fri May 18 22:46:13 2012 +0300 2.3 @@ -38,12 +38,7 @@ 2.4 // } 2.5 2.6 2.7 - protected static void loadTestData() 2.8 - throws RDFParseException, RepositoryException, IOException, RDFHandlerException, InvalidDatasetFormatFault 2.9 - { 2.10 - URL src = SimpleTests.class.getResource("/simple-tests.ntriples"); 2.11 - strabon.storeInRepo(src, "NTRIPLES"); 2.12 - } 2.13 + 2.14 2.15 2.16
3.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/generaldb/HavingTests.java Fri May 18 17:53:48 2012 +0300 3.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/generaldb/HavingTests.java Fri May 18 22:46:13 2012 +0300 3.3 @@ -122,11 +122,5 @@ 3.4 3.5 } 3.6 3.7 - protected static void loadTestData() 3.8 - throws RDFParseException, RepositoryException, IOException, RDFHandlerException, InvalidDatasetFormatFault 3.9 - { 3.10 - URL src = SimpleTests.class.getResource("/simple-tests.ntriples"); 3.11 - strabon.storeInRepo(src, "NTRIPLES"); 3.12 - } 3.13 3.14 }
4.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/generaldb/JoinTests.java Fri May 18 17:53:48 2012 +0300 4.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/generaldb/JoinTests.java Fri May 18 22:46:13 2012 +0300 4.3 @@ -39,13 +39,6 @@ 4.4 // } 4.5 4.6 4.7 - protected static void loadTestData() 4.8 - throws RDFParseException, RepositoryException, IOException, RDFHandlerException, InvalidDatasetFormatFault 4.9 - { 4.10 - URL src = SimpleTests.class.getResource("/simple-tests.ntriples"); 4.11 - strabon.storeInRepo(src, "NTRIPLES"); 4.12 - } 4.13 - 4.14 4.15 String query5a = 4.16 "PREFIX strdf:<http://strdf.di.uoa.gr/ontology#> "+
5.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/generaldb/MeaningfulAggregateTests.java Fri May 18 17:53:48 2012 +0300 5.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/generaldb/MeaningfulAggregateTests.java Fri May 18 22:46:13 2012 +0300 5.3 @@ -36,13 +36,6 @@ 5.4 // strabon = new Strabon("cco2","postgres","p1r3as", 5432, "localhost", true); 5.5 // } 5.6 5.7 - 5.8 - protected static void loadTestData() 5.9 - throws RDFParseException, RepositoryException, IOException, RDFHandlerException, InvalidDatasetFormatFault 5.10 - { 5.11 - URL src = SimpleTests.class.getResource("/simple-tests.ntriples"); 5.12 - strabon.storeInRepo(src, "NTRIPLES"); 5.13 - } 5.14 5.15 5.16 String prefixes =
6.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/generaldb/NOATests.java Fri May 18 17:53:48 2012 +0300 6.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/generaldb/NOATests.java Fri May 18 22:46:13 2012 +0300 6.3 @@ -32,14 +32,6 @@ 6.4 6.5 6.6 6.7 - 6.8 - protected static void loadTestData() 6.9 - throws RDFParseException, RepositoryException, IOException, RDFHandlerException, InvalidDatasetFormatFault 6.10 - { 6.11 - URL src = SimpleTests.class.getResource("/simple-tests.ntriples"); 6.12 - strabon.storeInRepo(src, "NTRIPLES"); 6.13 - } 6.14 - 6.15 String prefixes = 6.16 "PREFIX imAn: <http://teleios.di.uoa.gr/ontologies/imageAnnotationOntology.owl#> "+ 6.17 "PREFIX noa: <http://teleios.di.uoa.gr/ontologies/noaOntology.owl#> "+
7.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/monetdb/AggregateTests.java Fri May 18 17:53:48 2012 +0300 7.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/monetdb/AggregateTests.java Fri May 18 22:46:13 2012 +0300 7.3 @@ -25,38 +25,10 @@ 7.4 public class AggregateTests extends eu.earthobservatory.runtime.generaldb.AggregateTests { 7.5 7.6 @BeforeClass 7.7 - public static void beforeClass() throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 7.8 + public static void beforeClass(String inputfile) throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 7.9 { 7.10 - // Read properties 7.11 - Properties properties = new Properties(); 7.12 - InputStream propertiesStream = TemplateTests.class.getResourceAsStream("/databases.properties"); 7.13 - properties.load(propertiesStream); 7.14 + TemplateTests.beforeClass("/aggregate-tests-srid.nt"); 7.15 7.16 - serverName = properties.getProperty("monetdb.serverName"); 7.17 - databaseName = properties.getProperty("monetdb.databaseName"); 7.18 - port = Integer.parseInt(properties.getProperty("monetdb.port")); 7.19 - username = properties.getProperty("monetdb.username"); 7.20 - password = properties.getProperty("monetdb.password"); 7.21 - 7.22 - // Connect to database 7.23 - Class.forName("nl.cwi.monetdb.jdbc.MonetDriver"); 7.24 - String url = "jdbc:monetdb://"+serverName+":"+port+"/"+databaseName; 7.25 - conn = DriverManager.getConnection(url, username, password); 7.26 - 7.27 -// // Clean database 7.28 - Statement stmt = conn.createStatement(); 7.29 - ResultSet results = stmt.executeQuery("SELECT name FROM tables WHERE system=false AND name <> 'locked'"); 7.30 - while (results.next()) { 7.31 - String table_name = results.getString("name"); 7.32 - Statement stmt2 = conn.createStatement(); 7.33 - stmt2.executeUpdate("DROP TABLE \""+table_name+"\""); 7.34 - stmt2.close(); 7.35 - } 7.36 - stmt.close(); 7.37 - 7.38 - strabon = new Strabon(databaseName, username, password, port, serverName, true); 7.39 - 7.40 - loadTestData(); 7.41 } 7.42 7.43 @AfterClass 7.44 @@ -65,36 +37,5 @@ 7.45 strabon.close(); 7.46 } 7.47 7.48 -// /** 7.49 -// * @throws java.lang.Exception 7.50 -// */ 7.51 -// @Before 7.52 -// public void before() 7.53 -// throws Exception 7.54 -// { 7.55 -// 7.56 -// } 7.57 -// 7.58 -// /** 7.59 -// * @throws java.lang.Exception 7.60 -// */ 7.61 -// @After 7.62 -// public void after() 7.63 -// throws Exception 7.64 -// { 7.65 -// // Clean database 7.66 -// Statement stmt = conn.createStatement(); 7.67 -// ResultSet results = stmt.executeQuery("SELECT table_name FROM information_schema.tables WHERE " + 7.68 -// "table_schema='public' and table_name <> 'spatial_ref_sys' " + 7.69 -// "and table_name <> 'geometry_columns' and " + 7.70 -// "table_name <> 'geography_columns' and table_name <> 'locked'"); 7.71 -// while (results.next()) { 7.72 -// String table_name = results.getString("table_name"); 7.73 -// Statement stmt2 = conn.createStatement(); 7.74 -// stmt2.executeUpdate("DROP TABLE \""+table_name+"\""); 7.75 -// stmt2.close(); 7.76 -// } 7.77 -// 7.78 -// stmt.close(); 7.79 -// } 7.80 + 7.81 }
8.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/monetdb/GeneralTests.java Fri May 18 17:53:48 2012 +0300 8.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/monetdb/GeneralTests.java Fri May 18 22:46:13 2012 +0300 8.3 @@ -27,7 +27,7 @@ 8.4 @BeforeClass 8.5 public static void beforeClass() throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 8.6 { 8.7 - TemplateTests.beforeClass(); 8.8 + TemplateTests.beforeClass("/more-tests.nt"); 8.9 } 8.10 8.11 @AfterClass
9.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/monetdb/HavingTests.java Fri May 18 17:53:48 2012 +0300 9.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/monetdb/HavingTests.java Fri May 18 22:46:13 2012 +0300 9.3 @@ -16,18 +16,12 @@ 9.4 9.5 import eu.earthobservatory.runtime.generaldb.InvalidDatasetFormatFault; 9.6 9.7 -/** 9.8 - * A set of simple tests on SPARQL query functionality 9.9 - * 9.10 - * @author George Garbis 9.11 - */ 9.12 - 9.13 public class HavingTests extends eu.earthobservatory.runtime.generaldb.HavingTests { 9.14 9.15 @BeforeClass 9.16 public static void beforeClass() throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 9.17 { 9.18 - TemplateTests.beforeClass(); 9.19 + TemplateTests.beforeClass("/having-tests-srid.nt"); 9.20 } 9.21 9.22 @AfterClass
10.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/monetdb/JoinTests.java Fri May 18 17:53:48 2012 +0300 10.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/monetdb/JoinTests.java Fri May 18 22:46:13 2012 +0300 10.3 @@ -16,47 +16,13 @@ 10.4 10.5 import eu.earthobservatory.runtime.generaldb.InvalidDatasetFormatFault; 10.6 10.7 -/** 10.8 - * A set of simple tests on SPARQL query functionality 10.9 - * 10.10 - * @author George Garbis 10.11 - */ 10.12 10.13 public class JoinTests extends eu.earthobservatory.runtime.generaldb.JoinTests { 10.14 10.15 @BeforeClass 10.16 - public static void beforeClass() throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 10.17 + public static void beforeClass(String inputfile) throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 10.18 { 10.19 - // Read properties 10.20 - Properties properties = new Properties(); 10.21 - InputStream propertiesStream = TemplateTests.class.getResourceAsStream("/databases.properties"); 10.22 - properties.load(propertiesStream); 10.23 - 10.24 - serverName = properties.getProperty("monetdb.serverName"); 10.25 - databaseName = properties.getProperty("monetdb.databaseName"); 10.26 - port = Integer.parseInt(properties.getProperty("monetdb.port")); 10.27 - username = properties.getProperty("monetdb.username"); 10.28 - password = properties.getProperty("monetdb.password"); 10.29 - 10.30 - // Connect to database 10.31 - Class.forName("nl.cwi.monetdb.jdbc.MonetDriver"); 10.32 - String url = "jdbc:monetdb://"+serverName+":"+port+"/"+databaseName; 10.33 - conn = DriverManager.getConnection(url, username, password); 10.34 - 10.35 -// // Clean database 10.36 - Statement stmt = conn.createStatement(); 10.37 - ResultSet results = stmt.executeQuery("SELECT name FROM tables WHERE system=false AND name <> 'locked'"); 10.38 - while (results.next()) { 10.39 - String table_name = results.getString("name"); 10.40 - Statement stmt2 = conn.createStatement(); 10.41 - stmt2.executeUpdate("DROP TABLE \""+table_name+"\""); 10.42 - stmt2.close(); 10.43 - } 10.44 - stmt.close(); 10.45 - 10.46 - strabon = new Strabon(databaseName, username, password, port, serverName, true); 10.47 - 10.48 - loadTestData(); 10.49 + TemplateTests.beforeClass("/join-tests-srid"); 10.50 } 10.51 10.52 @AfterClass 10.53 @@ -64,37 +30,5 @@ 10.54 { 10.55 strabon.close(); 10.56 } 10.57 - 10.58 -// /** 10.59 -// * @throws java.lang.Exception 10.60 -// */ 10.61 -// @Before 10.62 -// public void before() 10.63 -// throws Exception 10.64 -// { 10.65 -// 10.66 -// } 10.67 -// 10.68 -// /** 10.69 -// * @throws java.lang.Exception 10.70 -// */ 10.71 -// @After 10.72 -// public void after() 10.73 -// throws Exception 10.74 -// { 10.75 -// // Clean database 10.76 -// Statement stmt = conn.createStatement(); 10.77 -// ResultSet results = stmt.executeQuery("SELECT table_name FROM information_schema.tables WHERE " + 10.78 -// "table_schema='public' and table_name <> 'spatial_ref_sys' " + 10.79 -// "and table_name <> 'geometry_columns' and " + 10.80 -// "table_name <> 'geography_columns' and table_name <> 'locked'"); 10.81 -// while (results.next()) { 10.82 -// String table_name = results.getString("table_name"); 10.83 -// Statement stmt2 = conn.createStatement(); 10.84 -// stmt2.executeUpdate("DROP TABLE \""+table_name+"\""); 10.85 -// stmt2.close(); 10.86 -// } 10.87 -// 10.88 -// stmt.close(); 10.89 -// } 10.90 + 10.91 }
11.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/monetdb/MeaningfulAggregateTests.java Fri May 18 17:53:48 2012 +0300 11.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/monetdb/MeaningfulAggregateTests.java Fri May 18 22:46:13 2012 +0300 11.3 @@ -16,18 +16,12 @@ 11.4 11.5 import eu.earthobservatory.runtime.generaldb.InvalidDatasetFormatFault; 11.6 11.7 -/** 11.8 - * A set of simple tests on SPARQL query functionality 11.9 - * 11.10 - * @author George Garbis 11.11 - */ 11.12 - 11.13 public class MeaningfulAggregateTests extends eu.earthobservatory.runtime.generaldb.SimpleTests { 11.14 11.15 @BeforeClass 11.16 public static void beforeClass() throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 11.17 { 11.18 - TemplateTests.beforeClass(); 11.19 + TemplateTests.beforeClass("/more-tests.nt"); 11.20 } 11.21 11.22 @AfterClass 11.23 @@ -36,36 +30,5 @@ 11.24 TemplateTests.afterClass(); 11.25 } 11.26 11.27 -// /** 11.28 -// * @throws java.lang.Exception 11.29 -// */ 11.30 -// @Before 11.31 -// public void before() 11.32 -// throws Exception 11.33 -// { 11.34 -// 11.35 -// } 11.36 -// 11.37 -// /** 11.38 -// * @throws java.lang.Exception 11.39 -// */ 11.40 -// @After 11.41 -// public void after() 11.42 -// throws Exception 11.43 -// { 11.44 -// // Clean database 11.45 -// Statement stmt = conn.createStatement(); 11.46 -// ResultSet results = stmt.executeQuery("SELECT table_name FROM information_schema.tables WHERE " + 11.47 -// "table_schema='public' and table_name <> 'spatial_ref_sys' " + 11.48 -// "and table_name <> 'geometry_columns' and " + 11.49 -// "table_name <> 'geography_columns' and table_name <> 'locked'"); 11.50 -// while (results.next()) { 11.51 -// String table_name = results.getString("table_name"); 11.52 -// Statement stmt2 = conn.createStatement(); 11.53 -// stmt2.executeUpdate("DROP TABLE \""+table_name+"\""); 11.54 -// stmt2.close(); 11.55 -// } 11.56 -// 11.57 -// stmt.close(); 11.58 -// } 11.59 + 11.60 }
12.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/monetdb/SpatialTests.java Fri May 18 17:53:48 2012 +0300 12.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/monetdb/SpatialTests.java Fri May 18 22:46:13 2012 +0300 12.3 @@ -27,7 +27,7 @@ 12.4 @BeforeClass 12.5 public static void beforeClass() throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 12.6 { 12.7 - TemplateTests.beforeClass(); 12.8 + TemplateTests.beforeClass("/spatial-tests-srid.nt"); 12.9 } 12.10 12.11 @AfterClass
13.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/monetdb/TemplateTests.java Fri May 18 17:53:48 2012 +0300 13.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/monetdb/TemplateTests.java Fri May 18 22:46:13 2012 +0300 13.3 @@ -2,6 +2,7 @@ 13.4 13.5 import java.io.IOException; 13.6 import java.io.InputStream; 13.7 +import java.net.URL; 13.8 import java.sql.DriverManager; 13.9 import java.sql.ResultSet; 13.10 import java.sql.SQLException; 13.11 @@ -15,6 +16,7 @@ 13.12 import org.openrdf.rio.RDFParseException; 13.13 13.14 import eu.earthobservatory.runtime.generaldb.InvalidDatasetFormatFault; 13.15 +import eu.earthobservatory.runtime.generaldb.SimpleTests; 13.16 13.17 /** 13.18 * A set of simple tests on SPARQL query functionality 13.19 @@ -25,7 +27,7 @@ 13.20 public class TemplateTests extends eu.earthobservatory.runtime.generaldb.SimpleTests { 13.21 13.22 @BeforeClass 13.23 - public static void beforeClass() throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 13.24 + public static void beforeClass(String inputfile) throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 13.25 { 13.26 // Read properties 13.27 Properties properties = new Properties(); 13.28 @@ -56,7 +58,7 @@ 13.29 13.30 strabon = new Strabon(databaseName, username, password, port, serverName, true); 13.31 13.32 - loadTestData(); 13.33 + TemplateTests.loadTestData(inputfile); 13.34 } 13.35 13.36 @AfterClass 13.37 @@ -65,6 +67,13 @@ 13.38 strabon.close(); 13.39 } 13.40 13.41 + protected static void loadTestData(String inputfile) 13.42 + throws RDFParseException, RepositoryException, IOException, RDFHandlerException, InvalidDatasetFormatFault 13.43 + { 13.44 + URL src = SimpleTests.class.getResource(inputfile); 13.45 + strabon.storeInRepo(src, "NTRIPLES"); 13.46 + } 13.47 + 13.48 // /** 13.49 // * @throws java.lang.Exception 13.50 // */ 13.51 @@ -118,4 +127,4 @@ 13.52 // 13.53 // stmt.close(); 13.54 // } 13.55 -} 13.56 +
14.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/monetdb/TransformTests.java Fri May 18 17:53:48 2012 +0300 14.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/monetdb/TransformTests.java Fri May 18 22:46:13 2012 +0300 14.3 @@ -27,7 +27,7 @@ 14.4 @BeforeClass 14.5 public static void beforeClass() throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 14.6 { 14.7 - TemplateTests.beforeClass(); 14.8 + TemplateTests.beforeClass("/transform-tests.nt"); 14.9 } 14.10 14.11 @AfterClass 14.12 @@ -36,36 +36,4 @@ 14.13 TemplateTests.afterClass(); 14.14 } 14.15 14.16 -// /** 14.17 -// * @throws java.lang.Exception 14.18 -// */ 14.19 -// @Before 14.20 -// public void before() 14.21 -// throws Exception 14.22 -// { 14.23 -// 14.24 -// } 14.25 -// 14.26 -// /** 14.27 -// * @throws java.lang.Exception 14.28 -// */ 14.29 -// @After 14.30 -// public void after() 14.31 -// throws Exception 14.32 -// { 14.33 -// // Clean database 14.34 -// Statement stmt = conn.createStatement(); 14.35 -// ResultSet results = stmt.executeQuery("SELECT table_name FROM information_schema.tables WHERE " + 14.36 -// "table_schema='public' and table_name <> 'spatial_ref_sys' " + 14.37 -// "and table_name <> 'geometry_columns' and " + 14.38 -// "table_name <> 'geography_columns' and table_name <> 'locked'"); 14.39 -// while (results.next()) { 14.40 -// String table_name = results.getString("table_name"); 14.41 -// Statement stmt2 = conn.createStatement(); 14.42 -// stmt2.executeUpdate("DROP TABLE \""+table_name+"\""); 14.43 -// stmt2.close(); 14.44 -// } 14.45 -// 14.46 -// stmt.close(); 14.47 -// } 14.48 }
15.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/postgis/AggregateTests.java Fri May 18 17:53:48 2012 +0300 15.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/postgis/AggregateTests.java Fri May 18 22:46:13 2012 +0300 15.3 @@ -1,6 +1,7 @@ 15.4 package eu.earthobservatory.runtime.postgis; 15.5 15.6 import java.io.IOException; 15.7 +import java.net.URL; 15.8 import java.sql.SQLException; 15.9 15.10 import org.junit.AfterClass; 15.11 @@ -11,20 +12,14 @@ 15.12 15.13 import eu.earthobservatory.runtime.generaldb.InvalidDatasetFormatFault; 15.14 15.15 -/** 15.16 - * A set of simple tests on SPARQL query functionality 15.17 - * 15.18 - * @author George Garbis 15.19 - */ 15.20 15.21 public class AggregateTests extends eu.earthobservatory.runtime.generaldb.AggregateTests { 15.22 15.23 @BeforeClass 15.24 public static void beforeClass() throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 15.25 { 15.26 - TemplateTests.beforeClass("/aggregate-tests.ntriples"); 15.27 + TemplateTests.beforeClass("/aggregate-tests-srid.nt"); 15.28 15.29 -// strabon = new Strabon("aggregate-tests-srid", "postgres", "p1r3as", 5432, "strabon.di.uoa.gr", true); 15.30 } 15.31 15.32 @AfterClass 15.33 @@ -33,36 +28,4 @@ 15.34 TemplateTests.afterClass(); 15.35 } 15.36 15.37 -// /** 15.38 -// * @throws java.lang.Exception 15.39 -// */ 15.40 -// @Before 15.41 -// public void before() 15.42 -// throws Exception 15.43 -// { 15.44 -// 15.45 -// } 15.46 -// 15.47 -// /** 15.48 -// * @throws java.lang.Exception 15.49 -// */ 15.50 -// @After 15.51 -// public void after() 15.52 -// throws Exception 15.53 -// { 15.54 -// // Clean database 15.55 -// Statement stmt = conn.createStatement(); 15.56 -// ResultSet results = stmt.executeQuery("SELECT table_name FROM information_schema.tables WHERE " + 15.57 -// "table_schema='public' and table_name <> 'spatial_ref_sys' " + 15.58 -// "and table_name <> 'geometry_columns' and " + 15.59 -// "table_name <> 'geography_columns' and table_name <> 'locked'"); 15.60 -// while (results.next()) { 15.61 -// String table_name = results.getString("table_name"); 15.62 -// Statement stmt2 = conn.createStatement(); 15.63 -// stmt2.executeUpdate("DROP TABLE \""+table_name+"\""); 15.64 -// stmt2.close(); 15.65 -// } 15.66 -// 15.67 -// stmt.close(); 15.68 -// } 15.69 }
16.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/postgis/GeneralTests.java Fri May 18 17:53:48 2012 +0300 16.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/postgis/GeneralTests.java Fri May 18 22:46:13 2012 +0300 16.3 @@ -2,6 +2,7 @@ 16.4 16.5 import java.io.IOException; 16.6 import java.io.InputStream; 16.7 +import java.net.URL; 16.8 import java.sql.DriverManager; 16.9 import java.sql.ResultSet; 16.10 import java.sql.SQLException; 16.11 @@ -27,7 +28,7 @@ 16.12 @BeforeClass 16.13 public static void beforeClass() throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 16.14 { 16.15 - TemplateTests.beforeClass("/generalTests"); 16.16 + TemplateTests.beforeClass("/more-tests.nt"); 16.17 } 16.18 16.19 @AfterClass 16.20 @@ -36,6 +37,8 @@ 16.21 TemplateTests.afterClass(); 16.22 } 16.23 16.24 + 16.25 + 16.26 // /** 16.27 // * @throws java.lang.Exception 16.28 // */
17.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/postgis/HavingTests.java Fri May 18 17:53:48 2012 +0300 17.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/postgis/HavingTests.java Fri May 18 22:46:13 2012 +0300 17.3 @@ -16,18 +16,13 @@ 17.4 17.5 import eu.earthobservatory.runtime.generaldb.InvalidDatasetFormatFault; 17.6 17.7 -/** 17.8 - * A set of simple tests on SPARQL query functionality 17.9 - * 17.10 - * @author George Garbis 17.11 - */ 17.12 17.13 public class HavingTests extends eu.earthobservatory.runtime.generaldb.HavingTests { 17.14 17.15 @BeforeClass 17.16 public static void beforeClass() throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 17.17 { 17.18 - TemplateTests.beforeClass("/having-tests.ntriples"); 17.19 + TemplateTests.beforeClass("/having-tests-srid.nt"); 17.20 } 17.21 17.22 @AfterClass 17.23 @@ -35,37 +30,5 @@ 17.24 { 17.25 TemplateTests.afterClass(); 17.26 } 17.27 - 17.28 -// /** 17.29 -// * @throws java.lang.Exception 17.30 -// */ 17.31 -// @Before 17.32 -// public void before() 17.33 -// throws Exception 17.34 -// { 17.35 -// 17.36 -// } 17.37 -// 17.38 -// /** 17.39 -// * @throws java.lang.Exception 17.40 -// */ 17.41 -// @After 17.42 -// public void after() 17.43 -// throws Exception 17.44 -// { 17.45 -// // Clean database 17.46 -// Statement stmt = conn.createStatement(); 17.47 -// ResultSet results = stmt.executeQuery("SELECT table_name FROM information_schema.tables WHERE " + 17.48 -// "table_schema='public' and table_name <> 'spatial_ref_sys' " + 17.49 -// "and table_name <> 'geometry_columns' and " + 17.50 -// "table_name <> 'geography_columns' and table_name <> 'locked'"); 17.51 -// while (results.next()) { 17.52 -// String table_name = results.getString("table_name"); 17.53 -// Statement stmt2 = conn.createStatement(); 17.54 -// stmt2.executeUpdate("DROP TABLE \""+table_name+"\""); 17.55 -// stmt2.close(); 17.56 -// } 17.57 -// 17.58 -// stmt.close(); 17.59 -// } 17.60 + 17.61 }
18.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/postgis/JoinTests.java Fri May 18 17:53:48 2012 +0300 18.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/postgis/JoinTests.java Fri May 18 22:46:13 2012 +0300 18.3 @@ -2,6 +2,7 @@ 18.4 18.5 import java.io.IOException; 18.6 import java.io.InputStream; 18.7 +import java.net.URL; 18.8 import java.sql.DriverManager; 18.9 import java.sql.ResultSet; 18.10 import java.sql.SQLException; 18.11 @@ -16,18 +17,12 @@ 18.12 18.13 import eu.earthobservatory.runtime.generaldb.InvalidDatasetFormatFault; 18.14 18.15 -/** 18.16 - * A set of simple tests on SPARQL query functionality 18.17 - * 18.18 - * @author George Garbis 18.19 - */ 18.20 - 18.21 public class JoinTests extends eu.earthobservatory.runtime.generaldb.JoinTests { 18.22 18.23 @BeforeClass 18.24 public static void beforeClass() throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 18.25 { 18.26 - TemplateTests.beforeClass("/join-tests.ntriples"); 18.27 + TemplateTests.beforeClass("/join-tests-srid.nt"); 18.28 } 18.29 18.30 @AfterClass 18.31 @@ -36,36 +31,4 @@ 18.32 TemplateTests.afterClass(); 18.33 } 18.34 18.35 -// /** 18.36 -// * @throws java.lang.Exception 18.37 -// */ 18.38 -// @Before 18.39 -// public void before() 18.40 -// throws Exception 18.41 -// { 18.42 -// 18.43 -// } 18.44 -// 18.45 -// /** 18.46 -// * @throws java.lang.Exception 18.47 -// */ 18.48 -// @After 18.49 -// public void after() 18.50 -// throws Exception 18.51 -// { 18.52 -// // Clean database 18.53 -// Statement stmt = conn.createStatement(); 18.54 -// ResultSet results = stmt.executeQuery("SELECT table_name FROM information_schema.tables WHERE " + 18.55 -// "table_schema='public' and table_name <> 'spatial_ref_sys' " + 18.56 -// "and table_name <> 'geometry_columns' and " + 18.57 -// "table_name <> 'geography_columns' and table_name <> 'locked'"); 18.58 -// while (results.next()) { 18.59 -// String table_name = results.getString("table_name"); 18.60 -// Statement stmt2 = conn.createStatement(); 18.61 -// stmt2.executeUpdate("DROP TABLE \""+table_name+"\""); 18.62 -// stmt2.close(); 18.63 -// } 18.64 -// 18.65 -// stmt.close(); 18.66 -// } 18.67 }
19.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/postgis/MeaningfulAggregateTests.java Fri May 18 17:53:48 2012 +0300 19.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/postgis/MeaningfulAggregateTests.java Fri May 18 22:46:13 2012 +0300 19.3 @@ -2,6 +2,7 @@ 19.4 19.5 import java.io.IOException; 19.6 import java.io.InputStream; 19.7 +import java.net.URL; 19.8 import java.sql.DriverManager; 19.9 import java.sql.ResultSet; 19.10 import java.sql.SQLException; 19.11 @@ -16,11 +17,6 @@ 19.12 19.13 import eu.earthobservatory.runtime.generaldb.InvalidDatasetFormatFault; 19.14 19.15 -/** 19.16 - * A set of simple tests on SPARQL query functionality 19.17 - * 19.18 - * @author George Garbis 19.19 - */ 19.20 19.21 public class MeaningfulAggregateTests extends eu.earthobservatory.runtime.generaldb.MeaningfulAggregateTests { 19.22 19.23 @@ -28,7 +24,7 @@ 19.24 @BeforeClass 19.25 public static void beforeClass() throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 19.26 { 19.27 - TemplateTests.beforeClass("/meaningful-aggregate-tests.ntriples"); 19.28 + TemplateTests.beforeClass("/grouo-tests-srid.nt"); 19.29 } 19.30 19.31 @AfterClass 19.32 @@ -36,5 +32,7 @@ 19.33 { 19.34 TemplateTests.afterClass(); 19.35 } 19.36 + 19.37 + 19.38 19.39 } 19.40 \ No newline at end of file
20.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/postgis/SPARQL11Tests.java Fri May 18 17:53:48 2012 +0300 20.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/postgis/SPARQL11Tests.java Fri May 18 22:46:13 2012 +0300 20.3 @@ -2,6 +2,7 @@ 20.4 20.5 import java.io.IOException; 20.6 import java.io.InputStream; 20.7 +import java.net.URL; 20.8 import java.sql.DriverManager; 20.9 import java.sql.ResultSet; 20.10 import java.sql.SQLException; 20.11 @@ -27,7 +28,7 @@ 20.12 @BeforeClass 20.13 public static void beforeClass() throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 20.14 { 20.15 - TemplateTests.beforeClass("/sparql11-tests.ntriples"); 20.16 + TemplateTests.beforeClass("/sparql11-tests.nt"); 20.17 } 20.18 20.19 @AfterClass 20.20 @@ -36,6 +37,8 @@ 20.21 TemplateTests.afterClass(); 20.22 } 20.23 20.24 + 20.25 + 20.26 // /** 20.27 // * @throws java.lang.Exception 20.28 // */
21.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/postgis/SpatialTests.java Fri May 18 17:53:48 2012 +0300 21.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/postgis/SpatialTests.java Fri May 18 22:46:13 2012 +0300 21.3 @@ -27,7 +27,7 @@ 21.4 @BeforeClass 21.5 public static void beforeClass() throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 21.6 { 21.7 - TemplateTests.beforeClass(); 21.8 + TemplateTests.beforeClass("./spatial-tests-srid.nt"); 21.9 } 21.10 21.11 @AfterClass
22.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/postgis/TemplateTests.java Fri May 18 17:53:48 2012 +0300 22.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/postgis/TemplateTests.java Fri May 18 22:46:13 2012 +0300 22.3 @@ -83,10 +83,10 @@ 22.4 strabon.close(); 22.5 } 22.6 22.7 - protected static void loadTestData(String inputFile) 22.8 + protected static void loadTestData(String inputfile) 22.9 throws RDFParseException, RepositoryException, IOException, RDFHandlerException, InvalidDatasetFormatFault 22.10 { 22.11 - URL src = SimpleTests.class.getResource("/simple-tests.ntriples"); 22.12 + URL src = SimpleTests.class.getResource(inputfile); 22.13 strabon.storeInRepo(src, "NTRIPLES"); 22.14 } 22.15
23.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/postgis/TransformTests.java Fri May 18 17:53:48 2012 +0300 23.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/postgis/TransformTests.java Fri May 18 22:46:13 2012 +0300 23.3 @@ -27,7 +27,7 @@ 23.4 @BeforeClass 23.5 public static void beforeClass() throws SQLException, ClassNotFoundException, RDFParseException, RepositoryException, RDFHandlerException, IOException, InvalidDatasetFormatFault 23.6 { 23.7 - TemplateTests.beforeClass("/transform-tests.ntriples"); 23.8 + TemplateTests.beforeClass("/transform-tests.nt"); 23.9 } 23.10 23.11 @AfterClass