use of org.talend.daikon.NamedThing in project components by Talend.
the class SnowflakeTablePropertiesTest method testBeforeTableName.
@Test
public void testBeforeTableName() throws Exception {
List<NamedThing> tableNames = new ArrayList<>();
tableNames.add(new SimpleNamedThing());
PowerMockito.mockStatic(SnowflakeSourceOrSink.class);
Mockito.when(SnowflakeSourceOrSink.getSchemaNames(null, tableProperties.getConnectionProperties())).thenReturn(tableNames);
Assert.assertEquals(ValidationResult.Result.OK, tableProperties.beforeTableName().getStatus());
Assert.assertEquals(tableNames.size(), tableProperties.tableName.getPossibleValues().size());
}
Aggregations