Search in sources :

Example 1 with GoogleBigQueryConfiguration

use of org.apache.camel.component.google.bigquery.GoogleBigQueryConfiguration in project wildfly-camel by wildfly-extras.

the class GoogleBigQueryIntegrationTest method setUp.

@Before
public void setUp() throws Exception {
    configuration = new GoogleBigQueryConfiguration();
    bigquery = Mockito.mock(Bigquery.class);
    endpoint = Mockito.mock(GoogleBigQueryEndpoint.class);
    tabledata = Mockito.mock(Bigquery.Tabledata.class);
    mockInsertall = Mockito.mock(Bigquery.Tabledata.InsertAll.class);
    Mockito.when(bigquery.tabledata()).thenReturn(tabledata);
    Mockito.when(tabledata.insertAll(Mockito.anyString(), Mockito.anyString(), Mockito.anyString(), Mockito.any())).thenReturn(mockInsertall);
    TableDataInsertAllResponse mockResponse = new TableDataInsertAllResponse();
    Mockito.when(mockInsertall.execute()).thenReturn(mockResponse);
}
Also used : GoogleBigQueryEndpoint(org.apache.camel.component.google.bigquery.GoogleBigQueryEndpoint) Bigquery(com.google.api.services.bigquery.Bigquery) TableDataInsertAllResponse(com.google.api.services.bigquery.model.TableDataInsertAllResponse) GoogleBigQueryConfiguration(org.apache.camel.component.google.bigquery.GoogleBigQueryConfiguration) Before(org.junit.Before)

Aggregations

Bigquery (com.google.api.services.bigquery.Bigquery)1 TableDataInsertAllResponse (com.google.api.services.bigquery.model.TableDataInsertAllResponse)1 GoogleBigQueryConfiguration (org.apache.camel.component.google.bigquery.GoogleBigQueryConfiguration)1 GoogleBigQueryEndpoint (org.apache.camel.component.google.bigquery.GoogleBigQueryEndpoint)1 Before (org.junit.Before)1