public void testPathExpressionNextMatchRecursiveShort(){
  GraphModel graph=new GraphModel();
  GraphNode[] nodes=fillGraphModel(graph);
  MultipleDirectedRelationFinder finder=new MultipleDirectedRelationFinder();
  finder.addRelation(MockRelation.DIRECTORY,true,false);
  RelationshipSetAdapter relSetAdapter=new RelationshipSetAdapter("Temporary",finder,relations);
  PathMatcherTerm term=new PathMatcherTerm(relSetAdapter,true,false);
  PathExpression pathExp=new PathExpression();
  pathExp.addPathMatcher(term);
  Collection<GraphNode> output=pathExp.nextMatch(graph,buildSingleSet(nodes[0]));
  assertEquals(2,output.size());
  assertGraphContainsElement(output,nodes,1);
  assertGraphContainsElement(output,nodes,2);
}

public void testPathExpressionNextMatchRecursiveShort ( ) { GraphModel graph = new GraphModel ( ) ; GraphNode [ ] nodes = fillGraphModel ( graph ) ; MultipleDirectedRelationFinder finder = new MultipleDirectedRelationFinder ( ) ; finder . addRelation ( MockRelation . DIRECTORY , true , false ) ; RelationshipSetAdapter relSetAdapter = new RelationshipSetAdapter ( "Temporary" , finder , relations ) ; PathMatcherTerm term = new PathMatcherTerm ( relSetAdapter , true , false ) ; PathExpression pathExp = new PathExpression ( ) ; pathExp . addPathMatcher ( term ) ; Collection < GraphNode > output = pathExp . nextMatch ( graph , buildSingleSet ( nodes [ 0 ] ) ) ; assertEquals ( 2 , output . size ( ) ) ; assertGraphContainsElement ( output , nodes , 1 ) ; assertGraphContainsElement ( output , nodes , 2 ) ; }
tests recursive version of pathexpression . nextmatch ( )
