use of org.teiid.query.parser.ParseInfo in project teiid by teiid.
the class TestODataSQLBuilder method helpInsert.
private UpdateState helpInsert(String url, String sqlExpected, StringServletInputStream stream, String method) throws Exception {
UpdateState state = (UpdateState) setup(DEFAULT_DDL, url, method, stream, new UpdateState());
Client client = state.client;
ArgumentCaptor<Command> arg1 = ArgumentCaptor.forClass(Command.class);
ArgumentCaptor<List> arg2 = ArgumentCaptor.forClass(List.class);
if (sqlExpected != null) {
Command actualCommand = (Command) QueryParser.getQueryParser().parseCommand(sqlExpected, new ParseInfo());
Mockito.verify(client).executeUpdate(arg1.capture(), arg2.capture());
Assert.assertEquals(actualCommand.toString(), arg1.getValue().toString());
}
state.commandArg = arg1;
return state;
}
Aggregations