use of org.neo4j.internal.kernel.api.procs.Neo4jTypes.NTBoolean in project neo4j by neo4j.
the class ProcedureCompilationTest method shouldHandleNulls.
@Test
void shouldHandleNulls() throws ProcedureException {
// Given
UserFunctionSignature signature = functionSignature("test", "foo").in("b", NTBoolean).out(NTFloat).build();
// When
CallableUserFunction nullyMethod = compileFunction(signature, emptyList(), method("nullyMethod", Boolean.class));
// Then
assertEquals(Values.NO_VALUE, nullyMethod.apply(ctx, new AnyValue[] { TRUE }));
assertEquals(PI, nullyMethod.apply(ctx, new AnyValue[] { Values.NO_VALUE }));
}
Aggregations