use of io.confluent.ksql.parser.tree.AlterSource in project ksql by confluentinc.
the class AlterSourceFactoryTest method shouldCreateCommandForAlterStream.
@Test
public void shouldCreateCommandForAlterStream() {
// Given:
final AlterSource alterSource = new AlterSource(STREAM_NAME, DataSourceType.KSTREAM, NEW_COLUMNS);
// When:
final AlterSourceCommand result = alterSourceFactory.create(alterSource);
// Then:
assertEquals(result.getKsqlType(), DataSourceType.KSTREAM.getKsqlType());
assertEquals(result.getSourceName(), STREAM_NAME);
assertEquals(result.getNewColumns().size(), 1);
}
Aggregations