Author: rareddy
Date: 2012-10-01 11:39:47 -0400 (Mon, 01 Oct 2012)
New Revision: 4494
Modified:
trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestJDBCDirectQueryExecution.java
trunk/connectors/translator-jpa/src/test/java/org/teiid/translator/jpa/TestJPADirectQueryExecution.java
trunk/connectors/translator-ldap/src/test/java/org/teiid/translator/ldap/TestLDAPDirectQueryExecution.java
trunk/connectors/translator-salesforce/src/test/java/org/teiid/translator/salesforce/execution/TestSalesForceDirectQueryExecution.java
Log:
TEIID-2176: Fixing the unit tests
Modified:
trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestJDBCDirectQueryExecution.java
===================================================================
---
trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestJDBCDirectQueryExecution.java 2012-10-01
14:47:01 UTC (rev 4493)
+++
trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestJDBCDirectQueryExecution.java 2012-10-01
15:39:47 UTC (rev 4494)
@@ -60,6 +60,7 @@
Mockito.stub(connection.getMetaData()).toReturn(Mockito.mock(DatabaseMetaData.class));
JDBCExecutionFactory ef = new JDBCExecutionFactory();
+ ef.setSupportsNativeQueries(true);
ResultSetExecution execution = (ResultSetExecution)ef.createExecution(command,
Mockito.mock(ExecutionContext.class), Mockito.mock(RuntimeMetadata.class), connection);
execution.execute();
assertArrayEquals(new Object[] {5}, (Object[])execution.next().get(0));
@@ -84,6 +85,7 @@
Mockito.stub(connection.getMetaData()).toReturn(Mockito.mock(DatabaseMetaData.class));
JDBCExecutionFactory ef = new JDBCExecutionFactory();
+ ef.setSupportsNativeQueries(true);
ResultSetExecution execution = (ResultSetExecution)ef.createExecution(command,
Mockito.mock(ExecutionContext.class), Mockito.mock(RuntimeMetadata.class), connection);
execution.execute();
assertArrayEquals(new Object[] {5, "five"},
(Object[])execution.next().get(0));
@@ -108,6 +110,7 @@
Mockito.stub(connection.getMetaData()).toReturn(Mockito.mock(DatabaseMetaData.class));
JDBCExecutionFactory ef = new JDBCExecutionFactory();
+ ef.setSupportsNativeQueries(true);
ResultSetExecution execution = (ResultSetExecution)ef.createExecution(command,
Mockito.mock(ExecutionContext.class), Mockito.mock(RuntimeMetadata.class), connection);
execution.execute();
assertArrayEquals(new Object[] {5, "five"},
(Object[])execution.next().get(0));
@@ -129,6 +132,7 @@
Mockito.stub(connection.getMetaData()).toReturn(Mockito.mock(DatabaseMetaData.class));
JDBCExecutionFactory ef = new JDBCExecutionFactory();
+ ef.setSupportsNativeQueries(true);
ResultSetExecution execution = (ResultSetExecution)ef.createExecution(command,
Mockito.mock(ExecutionContext.class), Mockito.mock(RuntimeMetadata.class), connection);
execution.execute();
assertArrayEquals(new Object[] {5}, (Object[])execution.next().get(0));
Modified:
trunk/connectors/translator-jpa/src/test/java/org/teiid/translator/jpa/TestJPADirectQueryExecution.java
===================================================================
---
trunk/connectors/translator-jpa/src/test/java/org/teiid/translator/jpa/TestJPADirectQueryExecution.java 2012-10-01
14:47:01 UTC (rev 4493)
+++
trunk/connectors/translator-jpa/src/test/java/org/teiid/translator/jpa/TestJPADirectQueryExecution.java 2012-10-01
15:39:47 UTC (rev 4494)
@@ -47,6 +47,7 @@
@BeforeClass
public static void setUp() throws TranslatorException {
TRANSLATOR = new JPA2ExecutionFactory();
+ TRANSLATOR.setSupportsNativeQueries(true);
TRANSLATOR.start();
}
Modified:
trunk/connectors/translator-ldap/src/test/java/org/teiid/translator/ldap/TestLDAPDirectQueryExecution.java
===================================================================
---
trunk/connectors/translator-ldap/src/test/java/org/teiid/translator/ldap/TestLDAPDirectQueryExecution.java 2012-10-01
14:47:01 UTC (rev 4493)
+++
trunk/connectors/translator-ldap/src/test/java/org/teiid/translator/ldap/TestLDAPDirectQueryExecution.java 2012-10-01
15:39:47 UTC (rev 4494)
@@ -49,6 +49,7 @@
@BeforeClass
public static void setUp() throws TranslatorException {
TRANSLATOR = new LDAPExecutionFactory();
+ TRANSLATOR.setSupportsNativeQueries(true);
TRANSLATOR.start();
}
Modified:
trunk/connectors/translator-salesforce/src/test/java/org/teiid/translator/salesforce/execution/TestSalesForceDirectQueryExecution.java
===================================================================
---
trunk/connectors/translator-salesforce/src/test/java/org/teiid/translator/salesforce/execution/TestSalesForceDirectQueryExecution.java 2012-10-01
14:47:01 UTC (rev 4493)
+++
trunk/connectors/translator-salesforce/src/test/java/org/teiid/translator/salesforce/execution/TestSalesForceDirectQueryExecution.java 2012-10-01
15:39:47 UTC (rev 4494)
@@ -53,6 +53,7 @@
@BeforeClass
public static void setUp() throws TranslatorException {
TRANSLATOR = new SalesForceExecutionFactory();
+ TRANSLATOR.setSupportsNativeQueries(true);
TRANSLATOR.start();
}
Show replies by thread