@Test(expected=TranslatorException.class) public void testError() throws Exception { String query = "SELECT * FROM Categories Where CategoryName = 'Beverages'"; String expectedURL = "Categories?$filter=CategoryName eq 'Beverages'&$select=Picture,Description,CategoryName,CategoryID"; String error = "<error xmlns=\"http: "<code>005056A509B11EE1BB8AF4A65EC3CA20</code>\n" + "<message xml:lang=\"en\">\n" + "Invalid parametertype used at function '' (Position: 16)\n" + "</message>\n" + "</error>"; ResultSetExecution excution = helpExecute(query, error, expectedURL, 400); excution.next(); }
@Override public List<?> next() throws TranslatorException, DataNotAvailableException { if (visitor.isCount() && this.countResponse != -1) { int count = this.countResponse; this.countResponse = -1; return Arrays.asList(count); } if (this.response != null && !this.response.hasError()) { return this.response.getNextRow(visitor.getSelect(), this.expectedColumnTypes); } return null; }
ODataQueryExecution extends BaseQueryExecution implements ResultSetExecution { @Override public List<?> next() throws TranslatorException, DataNotAvailableException { if (visitor.isCount() && this.countResponse != -1) { int count = this.countResponse; this.countResponse = -1; return Arrays.asList(count); } if (this.response != null && !this.response.hasError()) { return this.response.getNextRow(visitor.getSelect(), this.expectedColumnTypes); } return null; } }
ODataQueryExecution extends BaseQueryExecution implements ResultSetExecution { @Override public List<?> next() throws TranslatorException, DataNotAvailableException { if (visitor.isCount() && this.countResponse != -1) { int count = this.countResponse; this.countResponse = -1; return Arrays.asList(count); } if (this.response != null && !this.response.hasError()) { return this.response.getNextRow(visitor.getSelect(), this.expectedColumnTypes); } return null; } ODataQueryExecution(ODataExecutionFactory translator,
            QueryExpression command, ExecutionContext executionContext,
            RuntimeMetadata metadata, WSConnection connection); }
ODataQueryExecution extends BaseQueryExecution implements ResultSetExecution { @Override public List<?> next() throws TranslatorException, DataNotAvailableException { if (visitor.isCount() && this.countResponse != -1) { int count = this.countResponse; this.countResponse = -1; return Arrays.asList(count); } if (this.response != null && !this.response.hasError()) { return this.response.getNextRow(visitor.getSelect(), this.expectedColumnTypes); } return null; } ODataQueryExecution(ODataExecutionFactory translator,
            QueryExpression command, ExecutionContext executionContext,
            RuntimeMetadata metadata, WSConnection connection); @Override void execute(); @Override List<?> next(); @Override void close(); @Override void cancel(); }
ODataQueryExecution extends BaseQueryExecution implements ResultSetExecution { @Override public List<?> next() throws TranslatorException, DataNotAvailableException { if (visitor.isCount() && this.countResponse != -1) { int count = this.countResponse; this.countResponse = -1; return Arrays.asList(count); } if (this.response != null && !this.response.hasError()) { return this.response.getNextRow(visitor.getSelect(), this.expectedColumnTypes); } return null; } ODataQueryExecution(ODataExecutionFactory translator,
            QueryExpression command, ExecutionContext executionContext,
            RuntimeMetadata metadata, WSConnection connection); @Override void execute(); @Override List<?> next(); @Override void close(); @Override void cancel();  }