use of io.confluent.ksql.tools.migrations.util.CommandParser.SqlUndefineVariableCommand in project ksql by confluentinc.
the class CommandParserTest method shouldParseUndefineStatement.
@Test
public void shouldParseUndefineStatement() {
// Given:
final String undefineVar = "UNDEFINE var;";
// When:
List<SqlCommand> commands = parse(undefineVar);
// Then:
assertThat(commands.size(), is(1));
assertThat(commands.get(0).getCommand(), is(undefineVar));
assertThat(commands.get(0), instanceOf(SqlUndefineVariableCommand.class));
assertThat(((SqlUndefineVariableCommand) commands.get(0)).getVariable(), is("var"));
}
Aggregations