use of io.confluent.ksql.tools.migrations.util.CommandParser.SqlDropConnectorStatement in project ksql by confluentinc.
the class CommandParserTest method shouldParseDropConnectorStatement.
@Test
public void shouldParseDropConnectorStatement() {
// Given:
// The space at the end is to make sure that the regex doesn't capture it as a part of the name
final String dropConnector = "DRoP CONNEcTOR `jdbc-connector` ;";
// When:
List<SqlCommand> commands = parse(dropConnector);
// Then:
assertThat(commands.size(), is(1));
assertThat(commands.get(0).getCommand(), is(dropConnector));
assertThat(commands.get(0), instanceOf(SqlDropConnectorStatement.class));
assertThat(commands.get(0).getCommand(), is(dropConnector));
assertThat(((SqlDropConnectorStatement) commands.get(0)).getName(), is("`jdbc-connector`"));
}
Aggregations