Class Test
java.lang.Object
org.locationtech.jtstest.testrunner.Test
- All Implemented Interfaces:
Runnable
A test for two geometries.
- Version:
- 1.7
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprivate Object[]convertArgs(List argStr) private ObjectconvertArgToGeomOrString(String argStr) Computes the actual result and caches the result value.getArgument(int i) intprivate GeometryOperationintprivate booleanbooleanisPassed()Returns whether the Test is passed.booleanisRun()voidremoveArgument(int i) voidrun()voidsetArgument(int i, String value) voidtoXml()
-
Field Details
-
description
-
operation
-
expectedResult
-
testIndex
private int testIndex -
geometryIndex
-
arguments
-
testCase
-
passed
private boolean passed -
tolerance
private double tolerance -
targetGeometry
-
operationArgs
-
isRun
private boolean isRun -
actualResult
-
exception
-
-
Constructor Details
-
Test
public Test(TestCase testCase, int testIndex, String description, String operation, String geometryIndex, List arguments, Result expectedResult, double tolerance) Creates a Test with the given description. The given operation (e.g. "equals") will be performed, the expected result of which is expectedResult.
-
-
Method Details
-
setResult
-
setArgument
-
getDescription
-
getGeometryIndex
-
getExpectedResult
-
getOperation
-
getTestIndex
public int getTestIndex() -
getArgument
-
getArgumentCount
public int getArgumentCount() -
isPassed
public boolean isPassed()Returns whether the Test is passed. -
getException
-
getTestCase
-
removeArgument
public void removeArgument(int i) -
run
public void run() -
isRun
public boolean isRun() -
computePassed
- Throws:
Exception
-
isExpectedResultGeometryValid
private boolean isExpectedResultGeometryValid() -
getActualResult
Computes the actual result and caches the result value.- Returns:
- the actual result computed
- Throws:
Exception- if the operation fails
-
getGeometryOperation
-
toXml
-
convertArgs
-
convertArgToGeomOrString
-