diff geo-backend/src/test/java/de/intevation/gnv/geobackend/base/query/QueryExecutorTestCase.java @ 275:9063c5fcebf7

Added the possibility to use Innerselects in SpatialQueries geo-backend/trunk@286 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Thu, 05 Nov 2009 15:03:51 +0000
parents ff1b7967e6b9
children 6a585e87c18b
line wrap: on
line diff
--- a/geo-backend/src/test/java/de/intevation/gnv/geobackend/base/query/QueryExecutorTestCase.java	Mon Nov 02 10:53:06 2009 +0000
+++ b/geo-backend/src/test/java/de/intevation/gnv/geobackend/base/query/QueryExecutorTestCase.java	Thu Nov 05 15:03:51 2009 +0000
@@ -70,6 +70,25 @@
         }
     }
     
+    public void testSpatialQueryWithInnerSelect(){
+        try {
+            this.testQuery(1998, "spatial_query_with_innerselect", null);
+       } catch (QueryException e) {
+            log.error(e,e);
+            fail();
+        }
+    }
+    
+    
+    public void  testChooseFis(){
+        try {
+            this.testQuery(1, "choose_fis_query", null);
+        } catch (QueryException e) {
+            log.error(e, e);
+            fail();
+        }
+    }
+    
     
     /**
      * Tests if the Databaseconnection can be established and
@@ -127,16 +146,16 @@
             assertEquals(resultsize, results.size());
             log.debug(resultsize+" Datensätze erhalten");
             Iterator<Result> it = results.iterator();
-//            while (it.hasNext()){
-//                Result tmpResult = it.next();
-//                ResultDescriptor resultDescriptor = tmpResult.getResultDescriptor();
-//                int columns = resultDescriptor.getColumnCount();
-//                for (int i = 0; i < columns; i++){
-//                    String columnName = resultDescriptor.getColumnName(i);
-//                    Object value = tmpResult.getString(columnName);
-//                    log.debug(columnName + " ==> "+value.toString());
-//                }
-//            }
+            while (it.hasNext()){
+                Result tmpResult = it.next();
+                ResultDescriptor resultDescriptor = tmpResult.getResultDescriptor();
+                int columns = resultDescriptor.getColumnCount();
+                for (int i = 0; i < columns; i++){
+                    String columnName = resultDescriptor.getColumnName(i);
+                    Object value = tmpResult.getString(columnName);
+                    log.debug(columnName + " ==> "+value.toString());
+                }
+            }
 //        }
         log.debug("Query dauerte: "+(System.currentTimeMillis()-start) +"ms");
     }

http://dive4elements.wald.intevation.org