use of com.yahoo.elide.async.export.formatter.JSONExportFormatter in project elide by yahoo.
the class JsonAPITableExportOperationTest method testProcessBadQuery.
@Test
public void testProcessBadQuery() throws IOException {
dataPrep();
TableExport queryObj = new TableExport();
String query = "tableExport/^IllegalCharacter^";
String id = "edc4a871-dff2-4054-804e-d80075cf827d";
queryObj.setId(id);
queryObj.setQuery(query);
queryObj.setQueryType(QueryType.JSONAPI_V1_0);
queryObj.setResultType(ResultType.CSV);
JSONAPITableExportOperation jsonAPIOperation = new JSONAPITableExportOperation(new JSONExportFormatter(elide), asyncExecutorService, queryObj, requestScope, engine);
TableExportResult queryResultObj = (TableExportResult) jsonAPIOperation.call();
assertEquals(200, queryResultObj.getHttpStatus());
assertEquals("Illegal character in path at index 12: tableExport/^IllegalCharacter^", queryResultObj.getMessage());
}
Aggregations