use of org.talend.components.snowflake.tsnowflakerow.TSnowflakeRowProperties in project components by Talend.
the class SnowflakeRowWriterTest method setup.
@Before
public void setup() throws IOException {
connection = Mockito.mock(Connection.class);
rowProperties = new TSnowflakeRowProperties("rowProperties");
rowProperties.commitCount.setValue(1);
rowProperties.setupProperties();
sink = Mockito.mock(SnowflakeRowSink.class);
Mockito.when(sink.getRowProperties()).thenReturn(rowProperties);
Mockito.when(sink.createConnection(null)).thenReturn(connection);
Mockito.when(sink.getQuery()).thenReturn(query);
operation = Mockito.mock(SnowflakeRowWriteOperation.class);
Mockito.when(operation.getSink()).thenReturn(sink);
writer = new SnowflakeRowWriter(null, operation);
rs = Mockito.mock(ResultSet.class);
}
Aggregations