use of org.talend.components.snowflake.SnowflakeTableProperties in project components by Talend.
the class SnowflakeWritersTestIT method testOutputBadTable.
@Test
public void testOutputBadTable() throws Throwable {
TSnowflakeOutputProperties outputProps = (TSnowflakeOutputProperties) getComponentService().getComponentProperties(TSnowflakeOutputDefinition.COMPONENT_NAME);
setupProps(outputProps.connection);
setupTableWithStaticValues(outputProps);
SnowflakeTableProperties tableProps = outputProps.table;
Form f = tableProps.getForm(Form.REFERENCE);
tableProps.tableName.setValue("BADONE");
tableProps = (SnowflakeTableProperties) PropertiesTestUtils.checkAndAfter(getComponentService(), f, tableProps.tableName.getName(), tableProps);
LOGGER.info(String.valueOf(tableProps.getValidationResult()));
assertEquals(ValidationResult.Result.ERROR, tableProps.getValidationResult().getStatus());
assertThat(tableProps.getValidationResult().getMessage(), containsString("BADONE"));
}
Aggregations