use of org.teiid.translator.salesforce.execution.QueryExecutionImpl in project teiid by teiid.
the class TestVisitors method testIDCriteria.
@Test
public void testIDCriteria() throws Exception {
// $NON-NLS-1$
Select command = (Select) translationUtility.parseCommand("select id, name from Account where id = 'bar'");
SalesforceConnection sfc = Mockito.mock(SalesforceConnection.class);
Mockito.stub(sfc.retrieve("Account.Id, Account.Name", "Account", Arrays.asList("bar"))).toReturn(new SObject[] { null });
QueryExecutionImpl qei = new QueryExecutionImpl(command, sfc, translationUtility.createRuntimeMetadata(), Mockito.mock(ExecutionContext.class), new SalesForceExecutionFactory());
qei.execute();
Mockito.verify(sfc).retrieve("Account.Id, Account.Name", "Account", Arrays.asList("bar"));
}
Aggregations