use of com.runwaysdk.resource.StreamResource in project geoprism-registry by terraframe.
the class GeotoolsLoopTest method testQuerySorting.
@Test
public void testQuerySorting() throws Exception {
String[] files = new String[] { "shapefile/ntd_zam_operational_28082020.zip.test", "shapefile/schs_voronoi_externalId.zip.test", "cb_2017_us_state_500k.zip.test" };
for (String file : files) {
String filename = file;
if (file.endsWith(".test")) {
filename = file.replace(".test", "");
}
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(file);
ApplicationResource res = new StreamResource(is, filename);
Set<String> sorted = runInReq(res, true);
InputStream is2 = Thread.currentThread().getContextClassLoader().getResourceAsStream(file);
ApplicationResource res2 = new StreamResource(is2, filename);
Set<String> unsorted = runInReq(res2, false);
diff(unsorted, sorted);
Assert.assertEquals(sorted.size(), unsorted.size());
}
}
Aggregations