use of com.runwaysdk.resource.ApplicationResource in project geoprism-registry by terraframe.
the class ChangeRequestDocumentActionServiceTest method downloadDocumentAsUser.
private void downloadDocumentAsUser(ClientRequestIF request, String vfOid) {
ChangeRequestService service = new ChangeRequestService();
try (ApplicationResource res = service.downloadDocumentCR(request.getSessionId(), this.cr.getOid(), vfOid)) {
Assert.assertEquals("parent-test.xlsx", res.getName());
Assert.assertNotNull(res.getUnderlyingFile());
}
}
use of com.runwaysdk.resource.ApplicationResource 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());
}
}
use of com.runwaysdk.resource.ApplicationResource in project geoprism-registry by terraframe.
the class ChangeRequestDocumentServiceTest method downloadDocumentAsUser.
private void downloadDocumentAsUser(ClientRequestIF request, String vfOid) {
ChangeRequestService service = new ChangeRequestService();
try (ApplicationResource res = service.downloadDocumentCR(request.getSessionId(), this.crOid, vfOid)) {
Assert.assertEquals("parent-test.xlsx", res.getName());
Assert.assertNotNull(res.getUnderlyingFile());
}
}
Aggregations