Class FeatureReader
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.language.corpus.FeatureReader
-
public class FeatureReader extends Object
Reads the Gherkin feature files ofgremlin-testand extracts Gremlin examples.
-
-
Constructor Summary
Constructors Constructor Description FeatureReader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>parseFlat(String featureDir)Parses features to aListof Gremlin strings.static List<String>parseFlat(String featureDir, List<org.javatuples.Pair<Pattern,BiFunction<String,String,String>>> parameterMatchers)Parses features to aListof Gremlin strings.static Map<String,List<String>>parseGrouped(String featureDir)Parses features to aMapstructure of the test name as the key with aListof Gremlin strings for the value.static Map<String,List<String>>parseGrouped(String featureDir, List<org.javatuples.Pair<Pattern,BiFunction<String,String,String>>> parameterMatchers)Parses features to aMapstructure of the test name as the key with aListof Gremlin strings for the value.
-
-
-
Method Detail
-
parseFlat
public static List<String> parseFlat(String featureDir) throws IOException
Parses features to aListof Gremlin strings.- Parameters:
featureDir- The root directory where feature files can be found including subdirectories- Throws:
IOException
-
parseFlat
public static List<String> parseFlat(String featureDir, List<org.javatuples.Pair<Pattern,BiFunction<String,String,String>>> parameterMatchers) throws IOException
Parses features to aListof Gremlin strings.- Parameters:
featureDir- The root directory where feature files can be found including subdirectoriesparameterMatchers- list of pattern/functions that will transform a parameter from its Gherkin form to another format triggering that new formatted string to be inserted into the Gremlin itself- Throws:
IOException
-
parseGrouped
public static Map<String,List<String>> parseGrouped(String featureDir) throws IOException
Parses features to aMapstructure of the test name as the key with aListof Gremlin strings for the value.- Parameters:
featureDir- The root directory where feature files can be found including subdirectories- Throws:
IOException
-
parseGrouped
public static Map<String,List<String>> parseGrouped(String featureDir, List<org.javatuples.Pair<Pattern,BiFunction<String,String,String>>> parameterMatchers) throws IOException
Parses features to aMapstructure of the test name as the key with aListof Gremlin strings for the value.- Parameters:
featureDir- The root directory where feature files can be found including subdirectoriesparameterMatchers- list of pattern/functions that will transform a parameter from its Gherkin form to another format triggering that new formatted string to be inserted into the Gremlin itself- Throws:
IOException
-
-