I need to declare a member variable List propertyNodes in my Procedure class, as shown in the code below. But below code gives me an error while running unit test case (error starting Neo4j database...) While if I initialize the variable inside the procedure function, it works perfectly fine.
Any solution/help will be deeply appreciated.
public class connectToActivities {
@Context
public Transaction tx;
//this is the member variable I am refering to - Property is a class.
public List<Node> propertyNodes = new Property().getProperty(tx);
enum MyRelationshipTypes implements RelationshipType
{
input
}
@Procedure(mode = Mode.WRITE )
@Description("Connect Inputs To Activities")
public void connectInputsToActivities(@Name("node") Node n)
{
//Property property = new Property();
//List<Node> propertyNodes = property.getProperty(tx);
}
}// end of class