public void testPathExpressionNextMatchCumulativeRecursive(){
  PathExpression pathExpression=createPathExpression(true,true,true);
  GraphModel graph=new GraphModel();
  GraphNode[] nodes=fillGraphModel(graph);
  Collection<GraphNode> output=pathExpression.nextMatch(graph,buildSingleSet(nodes[0]));
  assertEquals(6,output.size());
  assertGraphContainsElement(output,nodes,1);
  assertGraphContainsElement(output,nodes,2);
  assertGraphContainsElement(output,nodes,3);
  assertGraphContainsElement(output,nodes,4);
  assertGraphContainsElement(output,nodes,5);
  assertGraphContainsElement(output,nodes,6);
}

public void testPathExpressionNextMatchCumulativeRecursive ( ) { PathExpression pathExpression = createPathExpression ( true , true , true ) ; GraphModel graph = new GraphModel ( ) ; GraphNode [ ] nodes = fillGraphModel ( graph ) ; Collection < GraphNode > output = pathExpression . nextMatch ( graph , buildSingleSet ( nodes [ 0 ] ) ) ; assertEquals ( 6 , output . size ( ) ) ; assertGraphContainsElement ( output , nodes , 1 ) ; assertGraphContainsElement ( output , nodes , 2 ) ; assertGraphContainsElement ( output , nodes , 3 ) ; assertGraphContainsElement ( output , nodes , 4 ) ; assertGraphContainsElement ( output , nodes , 5 ) ; assertGraphContainsElement ( output , nodes , 6 ) ; }
tests recursive and cumulative version of pathexpression . nextmatch ( graphmodel , collection < graphnode > )
