Class JTSTestRunnerCmd
- java.lang.Object
-
- org.locationtech.jtstest.testrunner.JTSTestRunnerCmd
-
public class JTSTestRunnerCmd extends java.lang.Object
A command-line utility to execute tests specified in JTS Test XML files. Displays status and any errors encountered.Command Line Options
-files { <fileOrDirectoryName> } req Specifies the XML test files to run -geomop <classname> opt Specifies a custom GeometryOperation
to be used-testCaseIndex <num> opt Specifies the index of a single test to run -verbose opt Provides verbose output - Version:
- 1.7
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
JTSTestRunnerCmd.TestRunnerOptions
-
Field Summary
Fields Modifier and Type Field Description private static GeometryOperation
defaultOp
private static ResultMatcher
defaultResultMatcher
private TestEngine
engine
private static GeometryFunctionRegistry
funcRegistry
private static GeometryOperation
geometryOp
private static java.lang.String
OPT_FILES
private static java.lang.String
OPT_GEOMFUNC
private static java.lang.String
OPT_GEOMOP
private static java.lang.String
OPT_PROPERTIES
private static java.lang.String
OPT_TESTCASEINDEX
private static java.lang.String
OPT_VERBOSE
private static java.lang.String
PROPERTY_TESTFILES
private static ResultMatcher
resultMatcher
-
Constructor Summary
Constructors Constructor Description JTSTestRunnerCmd()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.lang.String>
cmdOptionArgList(CommandLine commandLine, java.lang.String optionName)
private static CommandLine
createCommandLine()
private static java.util.List<java.lang.String>
extractTestFilenames(CommandLine commandLine)
static GeometryOperation
getGeometryOperation()
static ResultMatcher
getResultMatcher()
static boolean
isGeometryOperationSpecified()
Tests whether a GeometryOperation was specified on the command linestatic boolean
isResultMatcherSpecified()
Tests whether aResultMatcher
was specified on the command linestatic void
main(java.lang.String[] args)
private static void
printHelp()
private static JTSTestRunnerCmd.TestRunnerOptions
readOptions(java.lang.String[] args)
private java.lang.String
report(boolean isVerbose)
private void
run(JTSTestRunnerCmd.TestRunnerOptions options)
-
-
-
Field Detail
-
PROPERTY_TESTFILES
private static final java.lang.String PROPERTY_TESTFILES
- See Also:
- Constant Field Values
-
OPT_FILES
private static final java.lang.String OPT_FILES
- See Also:
- Constant Field Values
-
OPT_GEOMFUNC
private static final java.lang.String OPT_GEOMFUNC
- See Also:
- Constant Field Values
-
OPT_GEOMOP
private static final java.lang.String OPT_GEOMOP
- See Also:
- Constant Field Values
-
OPT_PROPERTIES
private static final java.lang.String OPT_PROPERTIES
- See Also:
- Constant Field Values
-
OPT_TESTCASEINDEX
private static final java.lang.String OPT_TESTCASEINDEX
- See Also:
- Constant Field Values
-
OPT_VERBOSE
private static final java.lang.String OPT_VERBOSE
- See Also:
- Constant Field Values
-
funcRegistry
private static GeometryFunctionRegistry funcRegistry
-
defaultOp
private static GeometryOperation defaultOp
-
geometryOp
private static GeometryOperation geometryOp
-
defaultResultMatcher
private static ResultMatcher defaultResultMatcher
-
resultMatcher
private static ResultMatcher resultMatcher
-
engine
private TestEngine engine
-
-
Method Detail
-
getGeometryOperation
public static GeometryOperation getGeometryOperation()
-
isGeometryOperationSpecified
public static boolean isGeometryOperationSpecified()
Tests whether a GeometryOperation was specified on the command line- Returns:
- true if a geometry operation was specified
-
getResultMatcher
public static ResultMatcher getResultMatcher()
-
isResultMatcherSpecified
public static boolean isResultMatcherSpecified()
Tests whether aResultMatcher
was specified on the command line- Returns:
- true if a matcher was specified
-
run
private void run(JTSTestRunnerCmd.TestRunnerOptions options) throws java.io.FileNotFoundException, java.io.IOException
- Throws:
java.io.FileNotFoundException
java.io.IOException
-
report
private java.lang.String report(boolean isVerbose)
-
main
public static void main(java.lang.String[] args)
-
readOptions
private static JTSTestRunnerCmd.TestRunnerOptions readOptions(java.lang.String[] args) throws ParseException, java.io.FileNotFoundException, java.io.IOException
- Throws:
ParseException
java.io.FileNotFoundException
java.io.IOException
-
extractTestFilenames
private static java.util.List<java.lang.String> extractTestFilenames(CommandLine commandLine) throws java.io.FileNotFoundException, java.io.IOException
- Throws:
java.io.FileNotFoundException
java.io.IOException
-
createCommandLine
private static CommandLine createCommandLine() throws ParseException
- Throws:
ParseException
-
printHelp
private static void printHelp()
-
cmdOptionArgList
public static java.util.List<java.lang.String> cmdOptionArgList(CommandLine commandLine, java.lang.String optionName)
-
-