use of org.neo4j.kernel.api.proc.FieldSignature in project neo4j by neo4j.
the class GetServersProcedureV2Test method shouldHaveCorrectSignature.
@Test
public void shouldHaveCorrectSignature() throws Exception {
// given
GetServersProcedureForMultiDC proc = new GetServersProcedureForMultiDC(null);
// when
ProcedureSignature signature = proc.signature();
// then
assertThat(signature.inputSignature(), containsInAnyOrder(new FieldSignature("context", NTMap)));
assertThat(signature.outputSignature(), containsInAnyOrder(new FieldSignature("ttl", NTInteger), new FieldSignature("servers", NTMap)));
}
use of org.neo4j.kernel.api.proc.FieldSignature in project neo4j by neo4j.
the class UserFunctionSignatureTest method inputSignatureShouldNotBeModifiable.
@Test
public void inputSignatureShouldNotBeModifiable() throws Throwable {
// Expect
exception.expect(UnsupportedOperationException.class);
// When
signature.inputSignature().add(new FieldSignature("in2", Neo4jTypes.NTAny));
}
use of org.neo4j.kernel.api.proc.FieldSignature in project neo4j by neo4j.
the class MethodSignatureCompilerTest method shouldMapSimpleRecordWithString.
@Test
public void shouldMapSimpleRecordWithString() throws Throwable {
// When
Method echo = ClassWithProcedureWithSimpleArgs.class.getMethod("echo", String.class);
List<FieldSignature> signature = new MethodSignatureCompiler(new TypeMappers()).signatureFor(echo);
// THen
assertThat(signature, contains(new FieldSignature("name", Neo4jTypes.NTString)));
}
Aggregations