Class Test

  • All Implemented Interfaces:
    java.lang.Runnable

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

      • description

        private java.lang.String description
      • operation

        private java.lang.String operation
      • expectedResult

        private Result expectedResult
      • testIndex

        private int testIndex
      • geometryIndex

        private java.lang.String geometryIndex
      • arguments

        private java.util.ArrayList arguments
      • passed

        private boolean passed
      • tolerance

        private double tolerance
      • targetGeometry

        private Geometry targetGeometry
      • operationArgs

        private java.lang.Object[] operationArgs
      • isRun

        private boolean isRun
      • actualResult

        private Result actualResult
      • exception

        private java.lang.Exception exception
    • Constructor Detail

      • Test

        public Test​(TestCase testCase,
                    int testIndex,
                    java.lang.String description,
                    java.lang.String operation,
                    java.lang.String geometryIndex,
                    java.util.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 Detail

      • setResult

        public void setResult​(Result result)
      • setArgument

        public void setArgument​(int i,
                                java.lang.String value)
      • getDescription

        public java.lang.String getDescription()
      • getGeometryIndex

        public java.lang.String getGeometryIndex()
      • getExpectedResult

        public Result getExpectedResult()
      • getOperation

        public java.lang.String getOperation()
      • getTestIndex

        public int getTestIndex()
      • getArgument

        public java.lang.String getArgument​(int i)
      • getArgumentCount

        public int getArgumentCount()
      • isPassed

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

        public java.lang.Exception getException()
      • getTestCase

        public TestCase getTestCase()
      • removeArgument

        public void removeArgument​(int i)
      • run

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

        public boolean isRun()
      • computePassed

        public boolean computePassed()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isExpectedResultGeometryValid

        private boolean isExpectedResultGeometryValid()
      • getActualResult

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

        public java.lang.String toXml()
      • convertArgs

        private java.lang.Object[] convertArgs​(java.util.List argStr)
      • convertArgToGeomOrString

        private java.lang.Object convertArgToGeomOrString​(java.lang.String argStr)