Search in sources :

Example 6 with FunctionInfo

use of io.confluent.ksql.rest.entity.FunctionInfo in project ksql by confluentinc.

the class ConsoleTest method shouldPrintFunctionDescription.

@Test
public void shouldPrintFunctionDescription() {
    final KsqlEntityList entityList = new KsqlEntityList(ImmutableList.of(new FunctionDescriptionList("DESCRIBE FUNCTION foo;", "FOO", "Description that is very, very, very, very, very, very, very, very, very, " + "very, very, very, very, very, very, very, very, very, very, very, very long\n" + "and containing new lines\n" + "\tAND TABS\n" + "too!", "Andy", "v1.1.0", "some.jar", ImmutableList.of(new FunctionInfo(ImmutableList.of(new ArgumentInfo("arg1", "INT", "Another really, really, really, really, really, really, really," + "really, really, really, really, really, really, really, really " + " really, really, really, really, really, really, really, long\n" + "description\n" + "\tContaining Tabs\n" + "and stuff", true)), "LONG", "The function description, which too can be really, really, really, " + "really, really, really, really, really, really, really, really, really, " + "really, really, really, really, really, really, really, really, long\n" + "and contains\n\ttabs and stuff")), FunctionType.SCALAR)));
    console.printKsqlEntityList(entityList);
    final String output = terminal.getOutputString();
    Approvals.verify(output, approvalOptions);
}
Also used : KsqlEntityList(io.confluent.ksql.rest.entity.KsqlEntityList) FunctionInfo(io.confluent.ksql.rest.entity.FunctionInfo) Matchers.containsString(org.hamcrest.Matchers.containsString) FunctionDescriptionList(io.confluent.ksql.rest.entity.FunctionDescriptionList) ArgumentInfo(io.confluent.ksql.rest.entity.ArgumentInfo) Test(org.junit.Test)

Aggregations

FunctionInfo (io.confluent.ksql.rest.entity.FunctionInfo)6 ImmutableList (com.google.common.collect.ImmutableList)3 ArgumentInfo (io.confluent.ksql.rest.entity.ArgumentInfo)3 FunctionDescriptionList (io.confluent.ksql.rest.entity.FunctionDescriptionList)2 Test (org.junit.Test)2 AggregateFunctionFactory (io.confluent.ksql.function.AggregateFunctionFactory)1 ParameterInfo (io.confluent.ksql.function.ParameterInfo)1 TableFunctionFactory (io.confluent.ksql.function.TableFunctionFactory)1 UdfFactory (io.confluent.ksql.function.UdfFactory)1 ArrayType (io.confluent.ksql.function.types.ArrayType)1 KsqlEntityList (io.confluent.ksql.rest.entity.KsqlEntityList)1 ConfiguredStatement (io.confluent.ksql.statement.ConfiguredStatement)1 ArrayList (java.util.ArrayList)1 Description (org.hamcrest.Description)1 Matchers.containsString (org.hamcrest.Matchers.containsString)1