Search in sources :

Example 1 with ElementTestUtils

use of org.neo4j.tooling.procedure.testutils.ElementTestUtils in project neo4j by neo4j.

the class FieldVisitorTest method prepare.

@Before
public void prepare() {
    elementTestUtils = new ElementTestUtils(compilationRule);
    fieldVisitor = new FieldVisitor(compilationRule.getTypes(), compilationRule.getElements(), true);
}
Also used : ElementTestUtils(org.neo4j.tooling.procedure.testutils.ElementTestUtils) Before(org.junit.Before)

Example 2 with ElementTestUtils

use of org.neo4j.tooling.procedure.testutils.ElementTestUtils in project neo4j by neo4j.

the class UserAggregationFunctionVisitorTest method prepare.

@Before
public void prepare() {
    Types types = compilationRule.getTypes();
    Elements elements = compilationRule.getElements();
    elementTestUtils = new ElementTestUtils(compilationRule);
    final TypeMirrorUtils typeMirrorUtils = new TypeMirrorUtils(types, elements);
    visitor = new UserAggregationFunctionVisitor(new FunctionVisitor<>(UserAggregationFunction.class, types, elements, typeMirrorUtils, function -> CustomNameExtractor.getName(function::name, function::value), false), types);
}
Also used : Types(javax.lang.model.util.Types) Elements(javax.lang.model.util.Elements) TypeMirrorUtils(org.neo4j.tooling.procedure.compilerutils.TypeMirrorUtils) ElementTestUtils(org.neo4j.tooling.procedure.testutils.ElementTestUtils) Before(org.junit.Before)

Example 3 with ElementTestUtils

use of org.neo4j.tooling.procedure.testutils.ElementTestUtils in project neo4j by neo4j.

the class UserFunctionVisitorTest method prepare.

@Before
public void prepare() {
    Types types = compilationRule.getTypes();
    Elements elements = compilationRule.getElements();
    elementTestUtils = new ElementTestUtils(compilationRule);
    final TypeMirrorUtils typeMirrorUtils = new TypeMirrorUtils(types, elements);
    visitor = new UserFunctionVisitor(new FunctionVisitor<>(UserFunction.class, types, elements, typeMirrorUtils, function -> CustomNameExtractor.getName(function::name, function::value), false));
}
Also used : Types(javax.lang.model.util.Types) Elements(javax.lang.model.util.Elements) TypeMirrorUtils(org.neo4j.tooling.procedure.compilerutils.TypeMirrorUtils) ElementTestUtils(org.neo4j.tooling.procedure.testutils.ElementTestUtils) Before(org.junit.Before)

Example 4 with ElementTestUtils

use of org.neo4j.tooling.procedure.testutils.ElementTestUtils in project neo4j by neo4j.

the class ContextFieldVisitorTest method prepare.

@Before
public void prepare() {
    elementTestUtils = new ElementTestUtils(compilationRule);
    contextFieldVisitor = new ContextFieldVisitor(compilationRule.getTypes(), compilationRule.getElements(), false);
}
Also used : ElementTestUtils(org.neo4j.tooling.procedure.testutils.ElementTestUtils) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)4 ElementTestUtils (org.neo4j.tooling.procedure.testutils.ElementTestUtils)4 Elements (javax.lang.model.util.Elements)2 Types (javax.lang.model.util.Types)2 TypeMirrorUtils (org.neo4j.tooling.procedure.compilerutils.TypeMirrorUtils)2