Mercurial > dive4elements > gnv-client
comparison 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 |
comparison
equal
deleted
inserted
replaced
274:ff1b7967e6b9 | 275:9063c5fcebf7 |
---|---|
68 log.error(e,e); | 68 log.error(e,e); |
69 fail(); | 69 fail(); |
70 } | 70 } |
71 } | 71 } |
72 | 72 |
73 public void testSpatialQueryWithInnerSelect(){ | |
74 try { | |
75 this.testQuery(1998, "spatial_query_with_innerselect", null); | |
76 } catch (QueryException e) { | |
77 log.error(e,e); | |
78 fail(); | |
79 } | |
80 } | |
81 | |
82 | |
83 public void testChooseFis(){ | |
84 try { | |
85 this.testQuery(1, "choose_fis_query", null); | |
86 } catch (QueryException e) { | |
87 log.error(e, e); | |
88 fail(); | |
89 } | |
90 } | |
91 | |
73 | 92 |
74 /** | 93 /** |
75 * Tests if the Databaseconnection can be established and | 94 * Tests if the Databaseconnection can be established and |
76 * Data could be read from the Database | 95 * Data could be read from the Database |
77 */ | 96 */ |
125 // fail(); | 144 // fail(); |
126 // }else { | 145 // }else { |
127 assertEquals(resultsize, results.size()); | 146 assertEquals(resultsize, results.size()); |
128 log.debug(resultsize+" Datensätze erhalten"); | 147 log.debug(resultsize+" Datensätze erhalten"); |
129 Iterator<Result> it = results.iterator(); | 148 Iterator<Result> it = results.iterator(); |
130 // while (it.hasNext()){ | 149 while (it.hasNext()){ |
131 // Result tmpResult = it.next(); | 150 Result tmpResult = it.next(); |
132 // ResultDescriptor resultDescriptor = tmpResult.getResultDescriptor(); | 151 ResultDescriptor resultDescriptor = tmpResult.getResultDescriptor(); |
133 // int columns = resultDescriptor.getColumnCount(); | 152 int columns = resultDescriptor.getColumnCount(); |
134 // for (int i = 0; i < columns; i++){ | 153 for (int i = 0; i < columns; i++){ |
135 // String columnName = resultDescriptor.getColumnName(i); | 154 String columnName = resultDescriptor.getColumnName(i); |
136 // Object value = tmpResult.getString(columnName); | 155 Object value = tmpResult.getString(columnName); |
137 // log.debug(columnName + " ==> "+value.toString()); | 156 log.debug(columnName + " ==> "+value.toString()); |
138 // } | 157 } |
139 // } | 158 } |
140 // } | 159 // } |
141 log.debug("Query dauerte: "+(System.currentTimeMillis()-start) +"ms"); | 160 log.debug("Query dauerte: "+(System.currentTimeMillis()-start) +"ms"); |
142 } | 161 } |
143 | 162 |
144 | 163 |