use of com.google.testing.compile.CompileTester.UnsuccessfulCompilationClause in project neo4j by neo4j.
the class UserFunctionProcessorTest method fails_if_parameters_are_not_properly_annotated.
@Test
public void fails_if_parameters_are_not_properly_annotated() {
JavaFileObject function = JavaFileObjectUtils.INSTANCE.procedureSource("invalid/missing_name/MissingNameUserFunction.java");
UnsuccessfulCompilationClause compilation = assert_().about(javaSource()).that(function).processedWith(processor).failsToCompile().withErrorCount(2);
compilation.withErrorContaining("@org.neo4j.procedure.Name usage error: missing on parameter <parameter>").in(function).onLine(28);
compilation.withErrorContaining("@org.neo4j.procedure.Name usage error: missing on parameter <otherParam>").in(function).onLine(28);
}
use of com.google.testing.compile.CompileTester.UnsuccessfulCompilationClause in project neo4j by neo4j.
the class UserFunctionProcessorTest method fails_if_function_generic_input_type_is_not_supported.
@Test
public void fails_if_function_generic_input_type_is_not_supported() {
JavaFileObject function = JavaFileObjectUtils.INSTANCE.procedureSource("invalid/bad_proc_input_type/BadGenericInputUserFunction.java");
UnsuccessfulCompilationClause compilation = assert_().about(javaSource()).that(function).processedWith(processor).failsToCompile().withErrorCount(3);
compilation.withErrorContaining("Unsupported parameter type " + "<java.util.List<java.util.List<java.util.Map<java.lang.String,java.lang.Thread>>>>" + " of procedure|function BadGenericInputUserFunction#doSomething").in(function).onLine(36);
compilation.withErrorContaining("Unsupported parameter type " + "<java.util.Map<java.lang.String,java.util.List<java.util.concurrent.ExecutorService>>>" + " of procedure|function BadGenericInputUserFunction#doSomething2").in(function).onLine(42);
compilation.withErrorContaining("Unsupported parameter type <java.util.Map> of procedure|function BadGenericInputUserFunction#doSomething3").in(function).onLine(48);
}
Aggregations