Package org.locationtech.jtstest.test
Class TestCase
- java.lang.Object
-
- org.locationtech.jtstest.test.TestCase
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringdescriptionprivate GeometryexpectedBoundaryprivate GeometryexpectedCentroidprivate GeometryexpectedConvexHullprivate GeometryexpectedDifferenceprotected java.lang.StringexpectedIMprivate GeometryexpectedIntersectionprivate GeometryexpectedSymDifferenceprivate GeometryexpectedUnionprotected booleanfailedprotected java.lang.StringfailedMsgprivate Geometry[]geomprivate IntersectionMatriximprotected booleanisRunprotected java.lang.Stringnameprivate PrecisionModelpmprivate java.lang.Stringwktaprivate java.lang.Stringwktbprivate WKTWriterwktWriter
-
Constructor Summary
Constructors Constructor Description TestCase()TestCase(java.lang.String name)TestCase(java.lang.String name, java.lang.String description, java.lang.String wkta, java.lang.String wktb, java.lang.String expectedIM)TestCase(java.lang.String name, java.lang.String description, java.lang.String wkta, java.lang.String wktb, java.lang.String expectedIM, java.lang.String expectedConvexHull, java.lang.String expectedIntersection, java.lang.String expectedUnion, java.lang.String expectedDifference, java.lang.String expectedSymDifference)TestCase(java.lang.String name, java.lang.String description, java.lang.String wkta, java.lang.String wktb, java.lang.String expectedIM, java.lang.String expectedConvexHull, java.lang.String expectedIntersection, java.lang.String expectedUnion, java.lang.String expectedDifference, java.lang.String expectedSymDifference, java.lang.String expectedBoundary)TestCase(TestCase tc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidassertEquals(java.lang.Object o1, java.lang.Object o2, java.lang.String msg)(package private) voidassertEqualsExact(Geometry g1, Geometry g2, java.lang.String msg)(package private) voidassertTrue(boolean val, java.lang.String msg)java.lang.StringgetDescription()GeometrygetExpectedBoundary()GeometrygetExpectedConvexHull()GeometrygetExpectedDifference()GeometrygetExpectedIntersection()java.lang.StringgetExpectedIntersectionMatrix()GeometrygetExpectedSymDifference()GeometrygetExpectedUnion()java.lang.StringgetFailedMsg()Geometry[]getGeometries()GeometrygetGeometry(int index)IntersectionMatrixgetIntersectionMatrix()java.lang.StringgetName()java.lang.StringgetWellKnownText(int i)(package private) voidinit(java.lang.String name, java.lang.String description, java.lang.String wkta, java.lang.String wktb, java.lang.String expectedIM, Geometry expectedConvexHull, Geometry expectedIntersection, Geometry expectedUnion, Geometry expectedDifference, Geometry expectedSymDifference, Geometry expectedBoundary)voidinitGeometry()booleanisFailed()booleanisPassed()booleanisRun()(package private) IntersectionMatrixrelate(Geometry a, Geometry b)voidrunTest()TestCasesetA(java.lang.String wkta)TestCasesetB(java.lang.String wktb)voidsetDescription(java.lang.String description)TestCasesetExpectedBoundary(java.lang.String wkt)voidsetExpectedBoundary(Geometry expectedBoundary)voidsetExpectedCentroid(Geometry expectedCentroid)voidsetExpectedConvexHull(Geometry expectedConvexHull)voidsetExpectedDifference(Geometry expectedDifference)TestCasesetExpectedIntersection(java.lang.String wkt)voidsetExpectedIntersection(Geometry expectedIntersection)voidsetExpectedIntersectionMatrix(java.lang.String expectedIntersectionMatrix)TestCasesetExpectedRelateMatrix(java.lang.String expectedIntersectionMatrix)voidsetExpectedSymDifference(Geometry expectedSymDifference)voidsetExpectedUnion(Geometry expectedUnion)voidsetGeometry(int index, Geometry g)voidsetIntersectionMatrix(IntersectionMatrix im)voidsetName(java.lang.String name)TestCasesetPrecisionModel(PrecisionModel pm)TestCasesetTestName(java.lang.String name)private GeometrytoNullOrGeometry(java.lang.String wellKnownText)
-
-
-
Field Detail
-
pm
private PrecisionModel pm
-
wktWriter
private WKTWriter wktWriter
-
name
protected java.lang.String name
-
description
protected java.lang.String description
-
expectedIM
protected java.lang.String expectedIM
-
isRun
protected boolean isRun
-
failed
protected boolean failed
-
failedMsg
protected java.lang.String failedMsg
-
expectedConvexHull
private Geometry expectedConvexHull
-
expectedBoundary
private Geometry expectedBoundary
-
expectedIntersection
private Geometry expectedIntersection
-
expectedUnion
private Geometry expectedUnion
-
expectedDifference
private Geometry expectedDifference
-
expectedSymDifference
private Geometry expectedSymDifference
-
expectedCentroid
private Geometry expectedCentroid
-
im
private IntersectionMatrix im
-
geom
private Geometry[] geom
-
wkta
private java.lang.String wkta
-
wktb
private java.lang.String wktb
-
-
Constructor Detail
-
TestCase
public TestCase()
-
TestCase
public TestCase(java.lang.String name)
-
TestCase
public TestCase(java.lang.String name, java.lang.String description, java.lang.String wkta, java.lang.String wktb, java.lang.String expectedIM)
-
TestCase
public TestCase(java.lang.String name, java.lang.String description, java.lang.String wkta, java.lang.String wktb, java.lang.String expectedIM, java.lang.String expectedConvexHull, java.lang.String expectedIntersection, java.lang.String expectedUnion, java.lang.String expectedDifference, java.lang.String expectedSymDifference)
-
TestCase
public TestCase(java.lang.String name, java.lang.String description, java.lang.String wkta, java.lang.String wktb, java.lang.String expectedIM, java.lang.String expectedConvexHull, java.lang.String expectedIntersection, java.lang.String expectedUnion, java.lang.String expectedDifference, java.lang.String expectedSymDifference, java.lang.String expectedBoundary)
-
TestCase
public TestCase(TestCase tc)
-
-
Method Detail
-
setGeometry
public void setGeometry(int index, Geometry g)- Specified by:
setGeometryin interfaceTestable
-
setPrecisionModel
public TestCase setPrecisionModel(PrecisionModel pm)
-
setIntersectionMatrix
public void setIntersectionMatrix(IntersectionMatrix im)
- Specified by:
setIntersectionMatrixin interfaceTestable
-
setExpectedIntersectionMatrix
public void setExpectedIntersectionMatrix(java.lang.String expectedIntersectionMatrix)
-
setExpectedRelateMatrix
public TestCase setExpectedRelateMatrix(java.lang.String expectedIntersectionMatrix)
-
setTestName
public TestCase setTestName(java.lang.String name)
-
setDescription
public void setDescription(java.lang.String description)
-
setExpectedConvexHull
public void setExpectedConvexHull(Geometry expectedConvexHull)
-
setExpectedBoundary
public void setExpectedBoundary(Geometry expectedBoundary)
-
setExpectedIntersection
public void setExpectedIntersection(Geometry expectedIntersection)
-
setExpectedUnion
public void setExpectedUnion(Geometry expectedUnion)
-
setExpectedDifference
public void setExpectedDifference(Geometry expectedDifference)
-
setExpectedSymDifference
public void setExpectedSymDifference(Geometry expectedSymDifference)
-
setExpectedCentroid
public void setExpectedCentroid(Geometry expectedCentroid)
-
setExpectedIntersection
public TestCase setExpectedIntersection(java.lang.String wkt)
-
setExpectedBoundary
public TestCase setExpectedBoundary(java.lang.String wkt)
-
setA
public TestCase setA(java.lang.String wkta)
-
setB
public TestCase setB(java.lang.String wktb)
-
getGeometry
public Geometry getGeometry(int index)
- Specified by:
getGeometryin interfaceTestable
-
getIntersectionMatrix
public IntersectionMatrix getIntersectionMatrix()
- Specified by:
getIntersectionMatrixin interfaceTestable
-
getExpectedIntersectionMatrix
public java.lang.String getExpectedIntersectionMatrix()
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescriptionin interfaceTestable
-
isFailed
public boolean isFailed()
-
getFailedMsg
public java.lang.String getFailedMsg()
-
isPassed
public boolean isPassed()
-
isRun
public boolean isRun()
-
getWellKnownText
public java.lang.String getWellKnownText(int i)
- Specified by:
getWellKnownTextin interfaceTestable
-
getExpectedConvexHull
public Geometry getExpectedConvexHull()
-
getExpectedBoundary
public Geometry getExpectedBoundary()
-
getExpectedIntersection
public Geometry getExpectedIntersection()
-
getExpectedUnion
public Geometry getExpectedUnion()
-
getExpectedDifference
public Geometry getExpectedDifference()
-
getExpectedSymDifference
public Geometry getExpectedSymDifference()
-
getGeometries
public Geometry[] getGeometries()
-
runTest
public void runTest() throws ParseException- Throws:
ParseException
-
initGeometry
public void initGeometry() throws ParseException- Specified by:
initGeometryin interfaceTestable- Throws:
ParseException
-
init
void init(java.lang.String name, java.lang.String description, java.lang.String wkta, java.lang.String wktb, java.lang.String expectedIM, Geometry expectedConvexHull, Geometry expectedIntersection, Geometry expectedUnion, Geometry expectedDifference, Geometry expectedSymDifference, Geometry expectedBoundary)
-
relate
IntersectionMatrix relate(Geometry a, Geometry b)
-
assertEquals
void assertEquals(java.lang.Object o1, java.lang.Object o2, java.lang.String msg)
-
assertTrue
void assertTrue(boolean val, java.lang.String msg)
-
toNullOrGeometry
private Geometry toNullOrGeometry(java.lang.String wellKnownText) throws ParseException
- Throws:
ParseException
-
-