Search in sources :

Example 1 with TeradataCompositeHandler

use of com.amazonaws.athena.connectors.teradata.TeradataCompositeHandler in project aws-athena-query-federation by awslabs.

the class TeradataCompositeHandlerTest method teradataCompositeHandlerTest.

@Test
public void teradataCompositeHandlerTest() {
    Exception ex = null;
    try {
        DatabaseConnectionConfig databaseConnectionConfig = new DatabaseConnectionConfig("testCatalog", TeradataConstants.TERADATA_NAME, "teradata://jdbc:teradata://hostname/user=dbc&password=dbc");
        PowerMockito.mockStatic(JDBCUtil.class);
        JDBCUtil tested = PowerMockito.mock(JDBCUtil.class);
        PowerMockito.when(tested.getSingleDatabaseConfigFromEnv(TeradataConstants.TERADATA_NAME)).thenReturn(databaseConnectionConfig);
        teradataCompositeHandler = new TeradataCompositeHandler();
        assertEquals(teradataCompositeHandler.getClass(), TeradataCompositeHandler.class);
    } catch (Exception e) {
        ex = e;
    }
    assertEquals(null, ex);
}
Also used : TeradataCompositeHandler(com.amazonaws.athena.connectors.teradata.TeradataCompositeHandler) JDBCUtil(com.amazonaws.athena.connectors.jdbc.manager.JDBCUtil) DatabaseConnectionConfig(com.amazonaws.athena.connectors.jdbc.connection.DatabaseConnectionConfig) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Aggregations

DatabaseConnectionConfig (com.amazonaws.athena.connectors.jdbc.connection.DatabaseConnectionConfig)1 JDBCUtil (com.amazonaws.athena.connectors.jdbc.manager.JDBCUtil)1 TeradataCompositeHandler (com.amazonaws.athena.connectors.teradata.TeradataCompositeHandler)1 Test (org.junit.Test)1 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)1