use of org.teiid.olingo.service.EntityCollectionResponse in project teiid by teiid.
the class TestODataSQLBuilder method helpTest.
public QueryState helpTest(String url, String sqlExpected, Integer skip, Integer top, Boolean count) throws Exception {
QueryState state = setup(url);
Client client = state.client;
ArgumentCaptor<Query> arg1 = ArgumentCaptor.forClass(Query.class);
ArgumentCaptor<EntityCollectionResponse> arg6 = ArgumentCaptor.forClass(EntityCollectionResponse.class);
List<SQLParameter> parameters = new ArrayList<SQLParameter>();
if (sqlExpected != null) {
Query actualCommand = (Query) QueryParser.getQueryParser().parseCommand(sqlExpected, new ParseInfo());
Mockito.verify(client).executeSQL(arg1.capture(), Mockito.eq(parameters), Mockito.eq(count), (Integer) Mockito.eq(skip), (Integer) Mockito.eq(top), (String) Mockito.eq(null), Mockito.anyInt(), arg6.capture());
Assert.assertEquals(actualCommand.toString(), arg1.getValue().toString());
}
state.parameters = parameters;
state.arg1 = arg1;
state.arg6 = arg6;
return state;
}
Aggregations