use of io.confluent.ksql.rest.entity.VariablesList in project ksql by confluentinc.
the class ListVariablesExecutorTest method shouldListVariables.
@Test
public void shouldListVariables() {
// Given:
sessionProperties.setVariable("var1", "1");
sessionProperties.setVariable("var2", "2");
// When:
final KsqlEntity response = executeListVariables("LIST VARIABLES;").get();
// Then:
final VariablesList variablesList = (VariablesList) response;
assertThat(variablesList.getStatementText(), is("LIST VARIABLES;"));
assertThat(variablesList.getVariables().get(0), is(new VariablesList.Variable("var1", "1")));
assertThat(variablesList.getVariables().get(1), is(new VariablesList.Variable("var2", "2")));
}
Aggregations