java.lang.Object
org.locationtech.jtstest.testrunner.Test
All Implemented Interfaces:
Runnable

public class Test extends Object implements Runnable
A test for two geometries.
Version:
1.7
  • Field Details

    • description

      private String description
    • operation

      private String operation
    • expectedResult

      private Result expectedResult
    • testIndex

      private int testIndex
    • geometryIndex

      private String geometryIndex
    • arguments

      private ArrayList arguments
    • testCase

      private TestCase testCase
    • passed

      private boolean passed
    • tolerance

      private double tolerance
    • targetGeometry

      private Geometry targetGeometry
    • operationArgs

      private Object[] operationArgs
    • isRun

      private boolean isRun
    • actualResult

      private Result actualResult
    • exception

      private Exception 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

      public void setResult(Result result)
    • setArgument

      public void setArgument(int i, String value)
    • getDescription

      public String getDescription()
    • getGeometryIndex

      public String getGeometryIndex()
    • getExpectedResult

      public Result getExpectedResult()
    • getOperation

      public String getOperation()
    • getTestIndex

      public int getTestIndex()
    • getArgument

      public String getArgument(int i)
    • getArgumentCount

      public int getArgumentCount()
    • isPassed

      public boolean isPassed()
      Returns whether the Test is passed.
    • getException

      public Exception getException()
    • getTestCase

      public TestCase getTestCase()
    • removeArgument

      public void removeArgument(int i)
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • isRun

      public boolean isRun()
    • computePassed

      public boolean computePassed() throws Exception
      Throws:
      Exception
    • isExpectedResultGeometryValid

      private boolean isExpectedResultGeometryValid()
    • getActualResult

      public Result getActualResult() throws Exception
      Computes the actual result and caches the result value.
      Returns:
      the actual result computed
      Throws:
      Exception - if the operation fails
    • getGeometryOperation

      private GeometryOperation getGeometryOperation()
    • toXml

      public String toXml()
    • convertArgs

      private Object[] convertArgs(List argStr)
    • convertArgToGeomOrString

      private Object convertArgToGeomOrString(String argStr)