use of org.neo4j.tooling.procedure.messages.CompilationMessage in project neo4j by neo4j.
the class UserFunctionVisitorTest method functions_with_unsupported_parameter_types_are_invalid.
@Test
public void functions_with_unsupported_parameter_types_are_invalid() {
Element function = elementTestUtils.findMethodElement(UserFunctionsExamples.class, "wrongParameterType");
Stream<CompilationMessage> errors = visitor.visit(function);
assertThat(errors).hasSize(1).extracting(CompilationMessage::getCategory, CompilationMessage::getContents).contains(tuple(Diagnostic.Kind.ERROR, "Unsupported parameter type <java.lang.Thread> of procedure|function " + "UserFunctionsExamples#wrongParameterType"));
}
Aggregations