You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by js...@apache.org on 2026/10/07 10:28:28 UTC
(sis) branch geoapi-4.0 updated: test(Geometry): cleaning and adding d9im tests
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
new 0053d01e09 test(Geometry): cleaning and adding d9im tests
0053d01e09 is described below
commit 0053d01e09d5d4148bfc510f3dd7b1a9381048ee
Author: jsorel <jo...@geomatys.com>
AuthorDate: Wed Oct 7 12:26:40 2026 +0200
test(Geometry): cleaning and adding d9im tests
---
.../org/apache/sis/geometries/DataPointsTest.java | 42 ---
.../test/org/apache/sis/geometries/EmptyTest.java | 76 +----
.../sis/geometries/GeometryCollectionTest.java | 80 +----
.../org/apache/sis/geometries/GeometryTest.java | 66 ++++
.../sis/geometries/OrientedGeometryTest.java | 77 +----
.../test/org/apache/sis/geometries/PointTest.java | 99 +-----
.../test/org/apache/sis/geometries/PrismTest.java | 80 +----
.../org/apache/sis/geometries/cs/BearingTest.java | 8 +-
.../sis/geometries/curve/ArcByBulgeTest.java | 171 +---------
.../sis/geometries/curve/ArcByCenterPointTest.java | 180 +----------
.../org/apache/sis/geometries/curve/ArcTest.java | 18 +-
.../sis/geometries/curve/BSplineCurveTest.java | 183 +----------
.../apache/sis/geometries/curve/BezierTest.java | 6 +-
.../apache/sis/geometries/curve/CircleTest.java | 6 +-
.../sis/geometries/curve/CircularStringTest.java | 168 +---------
.../apache/sis/geometries/curve/ClothoidTest.java | 9 +-
.../sis/geometries/curve/CompoundCurveTest.java | 174 +---------
.../org/apache/sis/geometries/curve/ConicTest.java | 165 +---------
.../sis/geometries/curve/CubicSplineTest.java | 6 +-
.../sis/geometries/curve/EllipticArcTest.java | 6 +-
.../sis/geometries/curve/FunctionArcTest.java | 6 -
.../apache/sis/geometries/curve/GeodesicTest.java | 171 +---------
.../sis/geometries/curve/LineStringTest.java | 229 ++++---------
.../sis/geometries/curve/LinearRingTest.java | 66 +++-
.../sis/geometries/curve/MultiCurveTest.java | 15 +-
.../sis/geometries/curve/MultiLineStringTest.java | 75 ++++-
.../apache/sis/geometries/curve/NurbCurveTest.java | 36 +--
.../sis/geometries/curve/OffsetCurveTest.java | 174 +---------
.../sis/geometries/curve/PolynomialArcTest.java | 6 -
.../sis/geometries/curve/PolynomialSplineTest.java | 192 +----------
.../sis/geometries/curve/ProductCurveTest.java | 174 +---------
.../sis/geometries/curve/RealFunctionTest.java | 12 -
.../sis/geometries/curve/RealPolynomialTest.java | 18 --
.../org/apache/sis/geometries/curve/RhumbTest.java | 174 +---------
.../apache/sis/geometries/curve/SpiralTest.java | 174 +---------
.../internal/shared/DefaultLineStringTest.java | 18 ++
.../internal/shared/DefaultLinearRingTest.java | 18 ++
.../shared/DefaultMultiLineStringTest.java | 23 ++
.../internal/shared/DefaultMultiPointTest.java | 18 ++
.../internal/shared/DefaultMultiPolygonTest.java | 23 ++
.../internal/shared/DefaultPolygonTest.java | 27 ++
.../internal/shared/DefaultRawMultiPointTest.java | 17 +
.../internal/shared/DefaultReversedCurveTest.java | 162 ----------
.../shared/DefaultReversedSurfaceTest.java | 114 -------
.../apache/sis/geometries/mesh/PrimitiveTest.java | 4 +-
.../sis/geometries/mesh/PrimitiveVisitorTest.java | 1 -
.../sis/geometries/operation/AbstractD9IMTest.java | 357 +++++++++++++++++++++
.../sis/geometries/operation/BufferTest.java | 12 +-
.../sis/geometries/operation/ContainsTest.java | 66 ++--
.../sis/geometries/operation/ConvexHullTest.java | 31 +-
.../sis/geometries/operation/CrossesTest.java | 57 +++-
.../sis/geometries/operation/DifferenceTest.java | 41 ++-
.../sis/geometries/operation/DisjointTest.java | 41 ++-
.../sis/geometries/operation/DistanceTest.java | 66 +++-
.../apache/sis/geometries/operation/EqualTest.java | 40 ++-
.../sis/geometries/operation/IntersectionTest.java | 46 ++-
.../sis/geometries/operation/IntersectsTest.java | 69 +++-
.../sis/geometries/operation/LocateAlongTest.java | 12 +-
.../geometries/operation/LocateBetweenTest.java | 14 +-
.../sis/geometries/operation/OverlapsTest.java | 52 ++-
.../sis/geometries/operation/RelateTest.java | 60 +++-
.../geometries/operation/SutherlandHogmanTest.java | 4 +-
.../geometries/operation/SymDifferenceTest.java | 43 ++-
.../apache/sis/geometries/operation/TestData.java | 112 -------
.../apache/sis/geometries/operation/To3DTest.java | 3 +-
.../sis/geometries/operation/TouchesTest.java | 58 +++-
.../sis/geometries/operation/TransformTest.java | 13 +-
.../apache/sis/geometries/operation/UnionTest.java | 41 ++-
.../geometries/operation/WithinDistanceTest.java | 51 ++-
.../sis/geometries/operation/WithinTest.java | 55 +++-
.../operation/spatialanalysis2d/IsoBandTest.java | 2 -
.../sis/geometries/point/MultiPointTest.java | 87 ++++-
.../sis/geometries/point/PointCloudTest.java | 15 -
.../sis/geometries/solid/BSplineSolidTest.java | 123 +------
.../sis/geometries/solid/MultiPolyhedronTest.java | 6 +-
.../sis/geometries/solid/PolyhedronTest.java | 99 +-----
.../sis/geometries/surface/BSplineSurfaceTest.java | 39 +--
.../sis/geometries/surface/BilinearGridTest.java | 6 +-
.../sis/geometries/surface/CurvePolygonTest.java | 132 +-------
.../sis/geometries/surface/MultiPolygonTest.java | 91 +++++-
.../sis/geometries/surface/MultiSurfaceTest.java | 18 +-
.../sis/geometries/surface/NurbSurfaceTest.java | 12 +-
.../surface/ParametricCurveSurfaceTest.java | 138 +-------
.../apache/sis/geometries/surface/PolygonTest.java | 209 +++++-------
.../geometries/surface/PolyhedralSurfaceTest.java | 129 +-------
.../sis/geometries/surface/PreparedTINTest.java | 15 +-
.../org/apache/sis/geometries/surface/TINTest.java | 9 +-
.../sis/geometries/surface/TriangleTest.java | 36 +--
.../org/apache/sis/maths/AbstractArrayTest.java | 1 -
89 files changed, 1683 insertions(+), 4395 deletions(-)
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/DataPointsTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/DataPointsTest.java
index 4171a14d0f..7df18ff71d 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/DataPointsTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/DataPointsTest.java
@@ -27,113 +27,71 @@ import org.junit.jupiter.api.Test;
* @author Johann Sorel (Geomatys)
*/
public class DataPointsTest {
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code size()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSize() {
}
- /**
- * Test of {@code getPoint(int)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPoint() {
}
- /**
- * Test of {@code getPosition(int)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPosition() {
}
- /**
- * Test of {@code setPosition(int, Tuple)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetPosition() {
}
- /**
- * Test of {@code getAttribute(int, String)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttribute() {
}
- /**
- * Test of {@code setAttribute(int, String, Tuple)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetAttribute() {
}
- /**
- * Test of {@code getAttributeArray(String)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributeArray() {
}
- /**
- * Test of {@code getAttributeRange(String)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributeRange() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/EmptyTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/EmptyTest.java
index fb471a324f..b324a85ba9 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/EmptyTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/EmptyTest.java
@@ -22,7 +22,6 @@ import org.opengis.geometry.Envelope;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.apache.sis.geometry.AbstractEnvelope;
import org.apache.sis.geometry.GeneralDirectPosition;
-import org.apache.sis.referencing.CommonCRS;
// Test dependencies
import static org.junit.jupiter.api.Assertions.*;
@@ -39,17 +38,7 @@ import org.junit.jupiter.api.Disabled;
*
* @author Johann Sorel (Geomatys)
*/
-public abstract class EmptyTest {
- /**
- * An arbitrary two-dimensional coordinate reference system used by the tests.
- */
- protected static final CoordinateReferenceSystem CRS_2D = CommonCRS.WGS84.normalizedGeographic();
-
- /**
- * An arbitrary three-dimensional coordinate reference system used by the tests.
- */
- protected static final CoordinateReferenceSystem CRS_3D = CommonCRS.WGS84.geographic3D();
-
+public abstract class EmptyTest extends GeometryTest {
/**
* Creates a new test case.
*/
@@ -66,58 +55,37 @@ public abstract class EmptyTest {
*/
protected abstract Empty createEmpty(CoordinateReferenceSystem crs);
- /**
- * Test of {@code isEmpty()}.
- */
@Test
public void testIsEmpty() {
assertTrue(createEmpty(CRS_2D).isEmpty());
}
- /**
- * Test of {@code getGeometryType()}.
- */
@Test
public void testGetGeometryType() {
assertEquals(GeometryType.EMPTY, createEmpty(CRS_2D).getGeometryType());
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
public void testGetTopologicDimension() {
assertEquals(-1, createEmpty(CRS_2D).getTopologicDimension());
assertEquals(-1, createEmpty(CRS_3D).getTopologicDimension());
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
public void testIsCycle() {
assertTrue(createEmpty(CRS_2D).isCycle(), "The boundary of the empty set is empty.");
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
public void testIsSimple() {
assertTrue(createEmpty(CRS_2D).isSimple(), "The empty set has no anomalous position.");
}
- /**
- * Test of {@code isValid()}.
- */
@Test
public void testIsValid() {
assertTrue(createEmpty(CRS_2D).isValid());
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
public void testGetBoundary() {
final Empty empty = createEmpty(CRS_2D);
@@ -126,9 +94,6 @@ public abstract class EmptyTest {
assertTrue(boundary.isEmpty());
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
public void testGetClosure() {
final Empty empty = createEmpty(CRS_2D);
@@ -137,9 +102,6 @@ public abstract class EmptyTest {
assertTrue(closure.isEmpty());
}
- /**
- * Test of {@code convexHull()}.
- */
@Test
public void testConvexHull() {
final Empty empty = createEmpty(CRS_2D);
@@ -148,34 +110,22 @@ public abstract class EmptyTest {
assertTrue(hull.isEmpty());
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
public void testGetCentroid() {
assertNull(createEmpty(CRS_2D).getCentroid(), "The centroid of the empty set is undefined.");
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
public void testGetRepresentativePoint() {
assertNull(createEmpty(CRS_2D).getRepresentativePoint(), "The empty set has no interior position.");
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
public void testGetCoordinateReferenceSystem() {
assertEquals(CRS_2D, createEmpty(CRS_2D).getCoordinateReferenceSystem());
assertEquals(CRS_3D, createEmpty(CRS_3D).getCoordinateReferenceSystem());
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
public void testSetCoordinateReferenceSystem() {
final Empty empty = createEmpty(CRS_2D);
@@ -189,9 +139,6 @@ public abstract class EmptyTest {
assertEquals(CRS_3D, empty.getCoordinateReferenceSystem());
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
public void testGetAttributesType() {
final Empty empty = createEmpty(CRS_2D);
@@ -205,18 +152,12 @@ public abstract class EmptyTest {
assertEquals(CRS_2D, type.getAttributeSystem(DataPointsType.ATT_POSITION).getCoordinateReferenceSystem());
}
- /**
- * Test of {@code getDimension()}.
- */
@Test
public void testGetDimension() {
assertEquals(2, createEmpty(CRS_2D).getDimension());
assertEquals(3, createEmpty(CRS_3D).getDimension());
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
public void testGetDimension_DirectPosition() {
final Empty empty = createEmpty(CRS_2D);
@@ -229,27 +170,18 @@ public abstract class EmptyTest {
assertThrows(UnsupportedOperationException.class, () -> empty.getDimension(position));
}
- /**
- * Test of {@code is3D()}.
- */
@Test
public void testIs3D() {
assertFalse(createEmpty(CRS_2D).is3D());
assertTrue (createEmpty(CRS_3D).is3D());
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
public void testGetSpatialDimension() {
assertEquals(2, createEmpty(CRS_2D).getSpatialDimension());
assertEquals(3, createEmpty(CRS_3D).getSpatialDimension());
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled
public void testGetBoundaryType() {
@@ -261,9 +193,6 @@ public abstract class EmptyTest {
assertThrows(UnsupportedOperationException.class, () -> empty.getBoundaryType());
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
public void testGetEnvelope() {
final Empty empty = createEmpty(CRS_2D);
@@ -275,9 +204,6 @@ public abstract class EmptyTest {
"The envelope of an empty geometry contains no position.");
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
public void testUserProperties() {
final Empty empty = createEmpty(CRS_2D);
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/GeometryCollectionTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/GeometryCollectionTest.java
index 059e23441a..a44d7a0712 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/GeometryCollectionTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/GeometryCollectionTest.java
@@ -26,210 +26,132 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class GeometryCollectionTest {
- /**
- * Test of {@code getGeometryType()}.
- */
+public class GeometryCollectionTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getElementType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetElementType() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getNumGeometries()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumGeometries() {
}
- /**
- * Test of {@code getGeometryN(int)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryN() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/GeometryTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/GeometryTest.java
new file mode 100644
index 0000000000..0687e3d550
--- /dev/null
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/GeometryTest.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.geometries;
+
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.apache.sis.referencing.CommonCRS;
+
+// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+
+/**
+ * Base class of the tests of the {@link Geometry} types.
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public abstract class GeometryTest {
+ /**
+ * A two-dimensional reference system in degrees. The axes are
+ * (<var>longitude</var>, <var>latitude</var>).
+ */
+ protected static final CoordinateReferenceSystem CRS_2D = CommonCRS.WGS84.normalizedGeographic();
+
+ /**
+ * A three-dimensional reference system, the two first axes of which are in degrees
+ * and the third one in metres.
+ */
+ protected static final CoordinateReferenceSystem CRS_3D = CommonCRS.WGS84.geographic3D();
+
+ /**
+ * Tolerance threshold on the measurements and on the coordinates.
+ * For rounding errors of the floating point arithmetic.
+ */
+ protected static final double TOLERANCE = 1E-9;
+
+ protected GeometryTest() {
+ }
+
+ /**
+ * Asserts that the given position is the expected one.
+ *
+ * @param x the expected value of the first ordinate.
+ * @param y the expected value of the second ordinate.
+ * @param actual the position to verify.
+ */
+ protected static void assertPositionEquals(final double x, final double y, final Point actual) {
+ final double[] position = actual.getPosition().toArrayDouble();
+ assertEquals(2, position.length, "Unexpected number of dimensions.");
+ assertEquals(x, position[0], TOLERANCE);
+ assertEquals(y, position[1], TOLERANCE);
+ }
+}
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/OrientedGeometryTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/OrientedGeometryTest.java
index e287ef0b9d..4bbdd9e833 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/OrientedGeometryTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/OrientedGeometryTest.java
@@ -26,202 +26,127 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class OrientedGeometryTest {
- /**
- * Test of {@code getTransform()}.
- */
+public class OrientedGeometryTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetTransform() {
}
- /**
- * Test of {@code getUnorientedEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetUnorientedEnvelope() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code getDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getGeometryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/PointTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/PointTest.java
index 3ebcd2862e..1ed325da5f 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/PointTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/PointTest.java
@@ -18,15 +18,9 @@ package org.apache.sis.geometries;
import java.util.List;
import java.util.Map;
-import org.opengis.geometry.DirectPosition;
import org.opengis.geometry.Envelope;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
-import org.apache.sis.geometry.GeneralDirectPosition;
-import org.apache.sis.maths.DataType;
-import org.apache.sis.maths.SampleSystem;
import org.apache.sis.maths.Tuple;
-import org.apache.sis.maths.Vector;
-import org.apache.sis.maths.Vectors;
import org.apache.sis.referencing.CommonCRS;
// Test dependencies
@@ -44,11 +38,7 @@ import org.junit.jupiter.api.Disabled;
*
* @author Johann Sorel (Geomatys)
*/
-public abstract class PointTest {
-
- protected static final CoordinateReferenceSystem CRS_2D = CommonCRS.WGS84.normalizedGeographic();
- protected static final CoordinateReferenceSystem CRS_3D = CommonCRS.WGS84.geographic3D();
-
+public abstract class PointTest extends GeometryTest {
private static final double[] POSITION_2D = {10, 5};
private static final double[] POSITION_3D = {10, 5, 100};
@@ -78,9 +68,6 @@ public abstract class PointTest {
return createPoint(CRS_3D, POSITION_3D.clone());
}
- /**
- * Test of {@code getPosition()}.
- */
@Test
public void testGetPosition() {
final Tuple<?> position = createPoint2D().getPosition();
@@ -90,9 +77,6 @@ public abstract class PointTest {
assertArrayEquals(POSITION_3D, createPoint3D().getPosition().toArrayDouble());
}
- /**
- * Test of {@code getAttribute(String)}.
- */
@Test
public void testGetAttribute() {
final Point point = createPoint2D();
@@ -102,9 +86,6 @@ public abstract class PointTest {
assertNull(point.getAttribute("Not an attribute of this point."));
}
- /**
- * Test of {@code setAttribute(String, Tuple)}.
- */
@Test
public void testSetAttribute() {
final Point point = createPoint2D();
@@ -115,9 +96,6 @@ public abstract class PointTest {
"Setting the positions attribute shall move the point.");
}
- /**
- * Test of {@code asDataPoint()}.
- */
@Test
public void testAsDataPoint() {
final Point point = createPoint2D();
@@ -131,26 +109,17 @@ public abstract class PointTest {
assertNotNull(points.getType());
}
- /**
- * Test of {@code getGeometryType()}.
- */
@Test
public void testGetGeometryType() {
assertEquals(GeometryType.POINT, createPoint2D().getGeometryType());
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
public void testGetTopologicDimension() {
assertEquals(0, createPoint2D().getTopologicDimension());
assertEquals(0, createPoint3D().getTopologicDimension());
}
- /**
- * Test of {@code getSegments()}.
- */
@Test
public void testGetSegments() {
final List<Primitive> segments = createPoint2D().getSegments();
@@ -158,41 +127,26 @@ public abstract class PointTest {
assertTrue(segments.isEmpty(), "A point cannot be decomposed.");
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
public void testIsCycle() {
assertTrue(createPoint2D().isCycle(), "The boundary of a point is empty.");
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
public void testIsSimple() {
assertTrue(createPoint2D().isSimple(), "A single location can neither self-intersect nor self-tangent.");
}
- /**
- * Test of {@code isValid()}.
- */
@Test
public void testIsValid() {
assertTrue(createPoint2D().isValid());
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
public void testIsEmpty() {
assertFalse(createPoint2D().isEmpty(), "A point always has a location.");
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
public void testGetBoundary() {
final Point point = createPoint2D();
@@ -203,63 +157,42 @@ public abstract class PointTest {
assertEquals(CRS_2D, boundary.getCoordinateReferenceSystem());
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
public void testGetClosure() {
final Point point = createPoint2D();
assertSame(point, point.getClosure(), "A point contains its empty boundary, therefore it is its own closure.");
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
public void testGetCentroid() {
final Point point = createPoint2D();
assertSame(point, point.getCentroid(), "A point is its own centroid.");
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
public void testGetRepresentativePoint() {
final Point point = createPoint2D();
assertSame(point, point.getRepresentativePoint(), "A point is interior to itself.");
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled
public void testGetMaximalComplex() {
// todo
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled
public void testGetMetadata() {
// todo
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
public void testGetCoordinateReferenceSystem() {
assertEquals(CRS_2D, createPoint2D().getCoordinateReferenceSystem());
assertEquals(CRS_3D, createPoint3D().getCoordinateReferenceSystem());
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
public void testSetCoordinateReferenceSystem() {
final Point point = createPoint2D();
@@ -276,9 +209,6 @@ public abstract class PointTest {
"Changing the reference system shall not move the coordinates.");
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
public void testGetAttributesType() {
final Point point = createPoint2D();
@@ -293,36 +223,24 @@ public abstract class PointTest {
assertEquals(CRS_2D, type.getAttributeSystem(DataPointsType.ATT_POSITION).getCoordinateReferenceSystem());
}
- /**
- * Test of {@code getDimension()}.
- */
@Test
public void testGetDimension() {
assertEquals(2, createPoint2D().getDimension());
assertEquals(3, createPoint3D().getDimension());
}
- /**
- * Test of {@code is3D()}.
- */
@Test
public void testIs3D() {
assertFalse(createPoint2D().is3D());
assertTrue (createPoint3D().is3D());
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
public void testGetSpatialDimension() {
assertEquals(2, createPoint2D().getSpatialDimension());
assertEquals(3, createPoint3D().getSpatialDimension());
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled
public void testGetBoundaryType() {
@@ -333,9 +251,6 @@ public abstract class PointTest {
assertThrows(UnsupportedOperationException.class, () -> point.getBoundaryType());
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
public void testGetEnvelope() {
final Point point = createPoint2D();
@@ -350,36 +265,24 @@ public abstract class PointTest {
}
}
- /**
- * Test of {@code vectorToPoint(DirectPosition)}.
- */
@Test
@Disabled
public void testVectorToPoint() {
// TODO
}
- /**
- * Test of {@code bearing(DirectPosition)}.
- */
@Test
@Disabled
public void testBearing() {
// TODO
}
- /**
- * Test of {@code pointAtDistance(Vector)}.
- */
@Test
@Disabled
public void testPointAtDistance() {
// TODO
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
public void testUserProperties() {
final Point point = createPoint2D();
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/PrismTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/PrismTest.java
index 3c74a7e80e..6d0a0705ec 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/PrismTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/PrismTest.java
@@ -26,210 +26,132 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class PrismTest {
- /**
- * Test of {@code getGeometryType()}.
- */
+public class PrismTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code getBase()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBase() {
}
- /**
- * Test of {@code getExtrusionRange()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetExtrusionRange() {
}
- /**
- * Test of {@code getExtrusionCrs()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetExtrusionCrs() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/cs/BearingTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/cs/BearingTest.java
index f10b731cba..feaf3c3671 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/cs/BearingTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/cs/BearingTest.java
@@ -126,7 +126,7 @@ public class BearingTest {
};
/**
- * Test of {@code ofAzimuth(Quantity)} default values.
+ * The default values applied by {@code ofAzimuth(Quantity)}.
*/
@Test
public void testDefaults() {
@@ -325,9 +325,6 @@ public class BearingTest {
assertSame(outer, nested.getReference());
}
- /**
- * Test of {@code equals(Object)} and {@code hashCode()}.
- */
@Test
public void testEqualsAndHashCode() {
final Bearing bearing = Bearing.ofAzimuth(deg(45), deg(10));
@@ -384,9 +381,6 @@ public class BearingTest {
assertEquals( 0, azimuth(Bearing.ofDirection(vector(northEast, 1, 0))), TOLERANCE, "Toward north.");
}
- /**
- * Test of {@code toString()}.
- */
@Test
public void testToString() {
final String text = Bearing.ofAzimuth(deg(45), deg(10)).toString();
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcByBulgeTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcByBulgeTest.java
index 18bbfdb899..fd307aa43b 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcByBulgeTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcByBulgeTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,450 +27,282 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class ArcByBulgeTest {
- /**
- * Test of {@code getGeometryType()}.
- */
+public class ArcByBulgeTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getDataPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDataPoints() {
}
- /**
- * Test of {@code getBulge()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBulge() {
}
- /**
- * Test of {@code getNormal()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNormal() {
}
- /**
- * Test of {@code getControlPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetControlPoints() {
}
- /**
- * Test of {@code getInterpolation()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code isClosed()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsClosed() {
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getLength()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength() {
}
- /**
- * Test of {@code getStartPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartPoint() {
}
- /**
- * Test of {@code getEndPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndPoint() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isRing()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRing() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code getKnots()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnots() {
}
- /**
- * Test of {@code getStartConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartConstrParam() {
}
- /**
- * Test of {@code getEndConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndConstrParam() {
}
- /**
- * Test of {@code getStartParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartParam() {
}
- /**
- * Test of {@code getEndParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndParam() {
}
- /**
- * Test of {@code getNumDerivativesInterior()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesInterior() {
}
- /**
- * Test of {@code getNumDerivativesStart()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesStart() {
}
- /**
- * Test of {@code getNumDerivativesEnd()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesEnd() {
}
- /**
- * Test of {@code getReverse()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetReverse() {
}
- /**
- * Test of {@code asLine(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testAsLine() {
}
- /**
- * Test of {@code constrParam(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testConstrParam() {
}
- /**
- * Test of {@code getLength(DirectPosition, DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_DirectPosition_DirectPosition() {
}
- /**
- * Test of {@code getLength(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_double_double() {
}
- /**
- * Test of {@code param(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParam() {
}
- /**
- * Test of {@code paramForPoint(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParamForPoint() {
}
- /**
- * Test of {@code tangent(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_Length() {
}
- /**
- * Test of {@code tangent(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_double() {
}
- /**
- * Test of {@code subCurve(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_double_double() {
}
- /**
- * Test of {@code subCurve(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_Length_Length() {
}
- /**
- * Test of {@code getOrientationSign()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetOrientationSign() {
}
- /**
- * Test of {@code getProxy()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetProxy() {
}
- /**
- * Test of {@code getPrimitive()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPrimitive() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getSegments()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegments() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcByCenterPointTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcByCenterPointTest.java
index 244a420010..cd63c41206 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcByCenterPointTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcByCenterPointTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,474 +27,297 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class ArcByCenterPointTest {
- /**
- * Test of {@code getGeometryType()}.
- */
+public class ArcByCenterPointTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getCenter()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCenter() {
}
- /**
- * Test of {@code getRadius()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRadius() {
}
- /**
- * Test of {@code getRadiusUnit()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRadiusUnit() {
}
- /**
- * Test of {@code getStartAngle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartAngle() {
}
- /**
- * Test of {@code getEndAngle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndAngle() {
}
- /**
- * Test of {@code getInterpolation()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code getDataPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDataPoints() {
}
- /**
- * Test of {@code getControlPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetControlPoints() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getLength()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength() {
}
- /**
- * Test of {@code getStartPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartPoint() {
}
- /**
- * Test of {@code getEndPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndPoint() {
}
- /**
- * Test of {@code isClosed()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsClosed() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isRing()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRing() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code getKnots()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnots() {
}
- /**
- * Test of {@code getStartConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartConstrParam() {
}
- /**
- * Test of {@code getEndConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndConstrParam() {
}
- /**
- * Test of {@code getStartParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartParam() {
}
- /**
- * Test of {@code getEndParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndParam() {
}
- /**
- * Test of {@code getNumDerivativesInterior()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesInterior() {
}
- /**
- * Test of {@code getNumDerivativesStart()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesStart() {
}
- /**
- * Test of {@code getNumDerivativesEnd()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesEnd() {
}
- /**
- * Test of {@code getReverse()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetReverse() {
}
- /**
- * Test of {@code asLine(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testAsLine() {
}
- /**
- * Test of {@code constrParam(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testConstrParam() {
}
- /**
- * Test of {@code getLength(DirectPosition, DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_DirectPosition_DirectPosition() {
}
- /**
- * Test of {@code getLength(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_double_double() {
}
- /**
- * Test of {@code param(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParam() {
}
- /**
- * Test of {@code paramForPoint(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParamForPoint() {
}
- /**
- * Test of {@code tangent(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_Length() {
}
- /**
- * Test of {@code tangent(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_double() {
}
- /**
- * Test of {@code subCurve(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_double_double() {
}
- /**
- * Test of {@code subCurve(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_Length_Length() {
}
- /**
- * Test of {@code getOrientationSign()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetOrientationSign() {
}
- /**
- * Test of {@code getProxy()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetProxy() {
}
- /**
- * Test of {@code getPrimitive()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPrimitive() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getSegments()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegments() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcTest.java
index 54a9da8974..3922aae682 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,42 +27,27 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class ArcTest {
- /**
- * Test of {@code getInterpolation()}.
- */
+public class ArcTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code getNumArc()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumArc() {
}
- /**
- * Test of {@code getControlPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetControlPoints() {
}
- /**
- * Test of {@code getDataPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDataPoints() {
}
- /**
- * Test of {@code getRadius()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRadius() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/BSplineCurveTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/BSplineCurveTest.java
index b7fb5d6749..61593b9d9a 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/BSplineCurveTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/BSplineCurveTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,482 +27,302 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class BSplineCurveTest {
- /**
- * Test of {@code getInterpolation()}.
- */
+public class BSplineCurveTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code getCurveForm()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCurveForm() {
}
- /**
- * Test of {@code getKnots()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnots() {
}
- /**
- * Test of {@code getDegree()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDegree() {
}
- /**
- * Test of {@code getKnotSpec()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnotSpec() {
}
- /**
- * Test of {@code isRational()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRational() {
}
- /**
- * Test of {@code getNumArc()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumArc() {
}
- /**
- * Test of {@code getSegment(int)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegment() {
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getDataPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDataPoints() {
}
- /**
- * Test of {@code getLength()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength() {
}
- /**
- * Test of {@code getStartPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartPoint() {
}
- /**
- * Test of {@code getEndPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndPoint() {
}
- /**
- * Test of {@code isClosed()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsClosed() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isRing()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRing() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code getControlPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetControlPoints() {
}
- /**
- * Test of {@code getStartConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartConstrParam() {
}
- /**
- * Test of {@code getEndConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndConstrParam() {
}
- /**
- * Test of {@code getStartParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartParam() {
}
- /**
- * Test of {@code getEndParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndParam() {
}
- /**
- * Test of {@code getNumDerivativesInterior()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesInterior() {
}
- /**
- * Test of {@code getNumDerivativesStart()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesStart() {
}
- /**
- * Test of {@code getNumDerivativesEnd()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesEnd() {
}
- /**
- * Test of {@code getReverse()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetReverse() {
}
- /**
- * Test of {@code asLine(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testAsLine() {
}
- /**
- * Test of {@code constrParam(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testConstrParam() {
}
- /**
- * Test of {@code getLength(DirectPosition, DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_DirectPosition_DirectPosition() {
}
- /**
- * Test of {@code getLength(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_double_double() {
}
- /**
- * Test of {@code param(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParam() {
}
- /**
- * Test of {@code paramForPoint(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParamForPoint() {
}
- /**
- * Test of {@code tangent(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_Length() {
}
- /**
- * Test of {@code tangent(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_double() {
}
- /**
- * Test of {@code subCurve(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_double_double() {
}
- /**
- * Test of {@code subCurve(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_Length_Length() {
}
- /**
- * Test of {@code getOrientationSign()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetOrientationSign() {
}
- /**
- * Test of {@code getProxy()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetProxy() {
}
- /**
- * Test of {@code getPrimitive()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPrimitive() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getSegments()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegments() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getGeometryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/BezierTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/BezierTest.java
index 055c975fa3..df9521bea2 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/BezierTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/BezierTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,10 +27,7 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class BezierTest {
- /**
- * Test of {@code getInterpolation()}.
- */
+public class BezierTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CircleTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CircleTest.java
index 0f616134e5..069fc0dd2b 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CircleTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CircleTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,10 +27,7 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class CircleTest {
- /**
- * Test of {@code isCycle()}.
- */
+public class CircleTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CircularStringTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CircularStringTest.java
index f634c83c8c..ea051eea77 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CircularStringTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CircularStringTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,442 +27,277 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class CircularStringTest {
- /**
- * Test of {@code getGeometryType()}.
- */
+public class CircularStringTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getNumArcs()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumArcs() {
}
- /**
- * Test of {@code getInterpolation()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code getDataPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDataPoints() {
}
- /**
- * Test of {@code getControlPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetControlPoints() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getLength()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength() {
}
- /**
- * Test of {@code getStartPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartPoint() {
}
- /**
- * Test of {@code getEndPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndPoint() {
}
- /**
- * Test of {@code isClosed()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsClosed() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isRing()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRing() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code getKnots()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnots() {
}
- /**
- * Test of {@code getStartConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartConstrParam() {
}
- /**
- * Test of {@code getEndConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndConstrParam() {
}
- /**
- * Test of {@code getStartParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartParam() {
}
- /**
- * Test of {@code getEndParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndParam() {
}
- /**
- * Test of {@code getNumDerivativesInterior()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesInterior() {
}
- /**
- * Test of {@code getNumDerivativesStart()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesStart() {
}
- /**
- * Test of {@code getNumDerivativesEnd()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesEnd() {
}
- /**
- * Test of {@code getReverse()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetReverse() {
}
- /**
- * Test of {@code asLine(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testAsLine() {
}
- /**
- * Test of {@code constrParam(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testConstrParam() {
}
- /**
- * Test of {@code getLength(DirectPosition, DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_DirectPosition_DirectPosition() {
}
- /**
- * Test of {@code getLength(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_double_double() {
}
- /**
- * Test of {@code param(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParam() {
}
- /**
- * Test of {@code paramForPoint(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParamForPoint() {
}
- /**
- * Test of {@code tangent(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_Length() {
}
- /**
- * Test of {@code tangent(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_double() {
}
- /**
- * Test of {@code subCurve(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_double_double() {
}
- /**
- * Test of {@code subCurve(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_Length_Length() {
}
- /**
- * Test of {@code getOrientationSign()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetOrientationSign() {
}
- /**
- * Test of {@code getProxy()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetProxy() {
}
- /**
- * Test of {@code getPrimitive()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPrimitive() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getSegments()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegments() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ClothoidTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ClothoidTest.java
index 12d9ed087f..eb30a8f014 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ClothoidTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ClothoidTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,18 +27,12 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class ClothoidTest {
- /**
- * Test of {@code getInterpolation()}.
- */
+public class ClothoidTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code getTorsion()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTorsion() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CompoundCurveTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CompoundCurveTest.java
index 9c7e657c77..bfe3739f64 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CompoundCurveTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CompoundCurveTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,458 +27,287 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class CompoundCurveTest {
- /**
- * Test of {@code getGeometryType()}.
- */
+public class CompoundCurveTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getNumCurves()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumCurves() {
}
- /**
- * Test of {@code getCurveN(int)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCurveN() {
}
- /**
- * Test of {@code getCurves()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCurves() {
}
- /**
- * Test of {@code getInterpolation()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code getStartPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartPoint() {
}
- /**
- * Test of {@code getEndPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndPoint() {
}
- /**
- * Test of {@code getLength()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength() {
}
- /**
- * Test of {@code isClosed()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsClosed() {
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getDataPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDataPoints() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isRing()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRing() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code getControlPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetControlPoints() {
}
- /**
- * Test of {@code getKnots()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnots() {
}
- /**
- * Test of {@code getStartConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartConstrParam() {
}
- /**
- * Test of {@code getEndConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndConstrParam() {
}
- /**
- * Test of {@code getStartParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartParam() {
}
- /**
- * Test of {@code getEndParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndParam() {
}
- /**
- * Test of {@code getNumDerivativesInterior()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesInterior() {
}
- /**
- * Test of {@code getNumDerivativesStart()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesStart() {
}
- /**
- * Test of {@code getNumDerivativesEnd()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesEnd() {
}
- /**
- * Test of {@code getReverse()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetReverse() {
}
- /**
- * Test of {@code asLine(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testAsLine() {
}
- /**
- * Test of {@code constrParam(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testConstrParam() {
}
- /**
- * Test of {@code getLength(DirectPosition, DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_DirectPosition_DirectPosition() {
}
- /**
- * Test of {@code getLength(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_double_double() {
}
- /**
- * Test of {@code param(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParam() {
}
- /**
- * Test of {@code paramForPoint(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParamForPoint() {
}
- /**
- * Test of {@code tangent(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_Length() {
}
- /**
- * Test of {@code tangent(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_double() {
}
- /**
- * Test of {@code subCurve(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_double_double() {
}
- /**
- * Test of {@code subCurve(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_Length_Length() {
}
- /**
- * Test of {@code getOrientationSign()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetOrientationSign() {
}
- /**
- * Test of {@code getProxy()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetProxy() {
}
- /**
- * Test of {@code getPrimitive()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPrimitive() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getSegments()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegments() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ConicTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ConicTest.java
index 8a8e78ef7a..ebe05c53c7 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ConicTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ConicTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,434 +27,272 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class ConicTest {
- /**
- * Test of {@code getInterpolation()}.
- */
+public class ConicTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code getDataPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDataPoints() {
}
- /**
- * Test of {@code getControlPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetControlPoints() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getLength()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength() {
}
- /**
- * Test of {@code getStartPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartPoint() {
}
- /**
- * Test of {@code getEndPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndPoint() {
}
- /**
- * Test of {@code isClosed()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsClosed() {
}
- /**
- * Test of {@code isRing()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRing() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code getKnots()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnots() {
}
- /**
- * Test of {@code getStartConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartConstrParam() {
}
- /**
- * Test of {@code getEndConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndConstrParam() {
}
- /**
- * Test of {@code getStartParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartParam() {
}
- /**
- * Test of {@code getEndParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndParam() {
}
- /**
- * Test of {@code getNumDerivativesInterior()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesInterior() {
}
- /**
- * Test of {@code getNumDerivativesStart()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesStart() {
}
- /**
- * Test of {@code getNumDerivativesEnd()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesEnd() {
}
- /**
- * Test of {@code getReverse()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetReverse() {
}
- /**
- * Test of {@code asLine(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testAsLine() {
}
- /**
- * Test of {@code constrParam(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testConstrParam() {
}
- /**
- * Test of {@code getLength(DirectPosition, DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_DirectPosition_DirectPosition() {
}
- /**
- * Test of {@code getLength(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_double_double() {
}
- /**
- * Test of {@code param(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParam() {
}
- /**
- * Test of {@code paramForPoint(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParamForPoint() {
}
- /**
- * Test of {@code tangent(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_Length() {
}
- /**
- * Test of {@code tangent(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_double() {
}
- /**
- * Test of {@code subCurve(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_double_double() {
}
- /**
- * Test of {@code subCurve(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_Length_Length() {
}
- /**
- * Test of {@code getOrientationSign()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetOrientationSign() {
}
- /**
- * Test of {@code getProxy()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetProxy() {
}
- /**
- * Test of {@code getPrimitive()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPrimitive() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getSegments()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegments() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getGeometryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CubicSplineTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CubicSplineTest.java
index 2238217929..baeb83f221 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CubicSplineTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CubicSplineTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,10 +27,7 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class CubicSplineTest {
- /**
- * Test of {@code getDegree()}.
- */
+public class CubicSplineTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetDegree() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/EllipticArcTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/EllipticArcTest.java
index 044692eff0..afbe307900 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/EllipticArcTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/EllipticArcTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,10 +27,7 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class EllipticArcTest {
- /**
- * Test of {@code getInterpolation()}.
- */
+public class EllipticArcTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/FunctionArcTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/FunctionArcTest.java
index ae5c88fc5c..7695af16a0 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/FunctionArcTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/FunctionArcTest.java
@@ -27,17 +27,11 @@ import org.junit.jupiter.api.Test;
* @author Johann Sorel (Geomatys)
*/
public class FunctionArcTest {
- /**
- * Test of {@code getDomain()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDomain() {
}
- /**
- * Test of {@code function(FunctionArc, Vector)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testFunction() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/GeodesicTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/GeodesicTest.java
index 178681f9e8..7a0d6a1035 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/GeodesicTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/GeodesicTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,450 +27,282 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class GeodesicTest {
- /**
- * Test of {@code getGeometryType()}.
- */
+public class GeodesicTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getInterpolation()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code getNumPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumPoints() {
}
- /**
- * Test of {@code getPointN(int)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPointN() {
}
- /**
- * Test of {@code getControlPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetControlPoints() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getDataPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDataPoints() {
}
- /**
- * Test of {@code getLength()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength() {
}
- /**
- * Test of {@code getStartPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartPoint() {
}
- /**
- * Test of {@code getEndPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndPoint() {
}
- /**
- * Test of {@code isClosed()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsClosed() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isRing()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRing() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code getKnots()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnots() {
}
- /**
- * Test of {@code getStartConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartConstrParam() {
}
- /**
- * Test of {@code getEndConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndConstrParam() {
}
- /**
- * Test of {@code getStartParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartParam() {
}
- /**
- * Test of {@code getEndParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndParam() {
}
- /**
- * Test of {@code getNumDerivativesInterior()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesInterior() {
}
- /**
- * Test of {@code getNumDerivativesStart()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesStart() {
}
- /**
- * Test of {@code getNumDerivativesEnd()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesEnd() {
}
- /**
- * Test of {@code getReverse()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetReverse() {
}
- /**
- * Test of {@code asLine(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testAsLine() {
}
- /**
- * Test of {@code constrParam(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testConstrParam() {
}
- /**
- * Test of {@code getLength(DirectPosition, DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_DirectPosition_DirectPosition() {
}
- /**
- * Test of {@code getLength(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_double_double() {
}
- /**
- * Test of {@code param(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParam() {
}
- /**
- * Test of {@code paramForPoint(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParamForPoint() {
}
- /**
- * Test of {@code tangent(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_Length() {
}
- /**
- * Test of {@code tangent(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_double() {
}
- /**
- * Test of {@code subCurve(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_double_double() {
}
- /**
- * Test of {@code subCurve(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_Length_Length() {
}
- /**
- * Test of {@code getOrientationSign()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetOrientationSign() {
}
- /**
- * Test of {@code getProxy()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetProxy() {
}
- /**
- * Test of {@code getPrimitive()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPrimitive() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getSegments()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegments() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/LineStringTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/LineStringTest.java
index c9e610cf55..a52872d2c7 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/LineStringTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/LineStringTest.java
@@ -16,7 +16,15 @@
*/
package org.apache.sis.geometries.curve;
+import javax.measure.Quantity;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.apache.sis.geometries.Geometry;
+import org.apache.sis.geometries.GeometryTest;
+import org.apache.sis.geometries.point.MultiPoint;
+import org.apache.sis.measure.Units;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
@@ -26,458 +34,351 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class LineStringTest {
+public abstract class LineStringTest extends GeometryTest {
+ /**
+ * A horizontal segment of length 10, from (0 0) to (10 0).
+ */
+ private static final double[] SEGMENT = {0,0, 10,0};
+
/**
- * Test of {@code getGeometryType()}.
+ * The diagonal of a square of 10 × 10, of length 10√2.
*/
+ private static final double[] DIAGONAL = {0,0, 10,10};
+
+ /**
+ * A curve crossing itself at (5 5). It is valid, a curve being allowed to cross itself,
+ * but it is not simple.
+ */
+ private static final double[] SELF_CROSSING = {0,0, 10,10, 10,0, 0,10};
+
+ protected LineStringTest() {
+ }
+
+ /**
+ * Creates a curve through the given positions in the given coordinate reference system.
+ *
+ * @param crs the coordinate reference system of the curve to create, not null.
+ * @param coordinates the coordinates of the positions, in the axis order of the given system.
+ * @return a new curve through the given positions, never null.
+ */
+ protected abstract LineString createLineString(CoordinateReferenceSystem crs, double... coordinates);
+
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getInterpolation()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code asLine(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testAsLine() {
}
- /**
- * Test of {@code getNumPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumPoints() {
}
- /**
- * Test of {@code getPointN(int)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPointN() {
}
- /**
- * Test of {@code getControlPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetControlPoints() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code isLine()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsLine() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getDataPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDataPoints() {
}
/**
- * Test of {@code getLength()}.
+ * The length is measured in the units of the coordinate system axes: stating it in metres would
+ * claim a measurement on the reference surface, which is not what is computed.
*/
@Test
- @Disabled("Not implemented yet.")
public void testGetLength() {
+ final Quantity<?> length = createLineString(CRS_2D, SEGMENT).getLength();
+ assertEquals(10, length.getValue().doubleValue(), TOLERANCE, "A horizontal segment of 10.");
+ assertEquals(Units.DEGREE, length.getUnit(), "The length shall use the unit of the axes.");
+ assertEquals(10 * Math.sqrt(2), createLineString(CRS_2D, DIAGONAL).getLength().getValue().doubleValue(),
+ TOLERANCE, "The diagonal of a square of 10 × 10.");
}
- /**
- * Test of {@code getStartPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartPoint() {
}
- /**
- * Test of {@code getEndPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndPoint() {
}
- /**
- * Test of {@code isClosed()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsClosed() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isRing()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRing() {
}
/**
- * Test of {@code getBoundary()}.
+ * The boundary of an open curve is its two end positions.
*/
@Test
- @Disabled("Not implemented yet.")
public void testGetBoundary() {
+ final Geometry boundary = createLineString(CRS_2D, SEGMENT).getBoundary();
+ final MultiPoint<?> ends = assertInstanceOf(MultiPoint.class, boundary,
+ "The boundary of an open curve is its two end positions.");
+ assertEquals(2, ends.getNumGeometries());
}
- /**
- * Test of {@code getKnots()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnots() {
}
- /**
- * Test of {@code getStartConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartConstrParam() {
}
- /**
- * Test of {@code getEndConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndConstrParam() {
}
- /**
- * Test of {@code getStartParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartParam() {
}
- /**
- * Test of {@code getEndParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndParam() {
}
- /**
- * Test of {@code getNumDerivativesInterior()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesInterior() {
}
- /**
- * Test of {@code getNumDerivativesStart()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesStart() {
}
- /**
- * Test of {@code getNumDerivativesEnd()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesEnd() {
}
- /**
- * Test of {@code getReverse()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetReverse() {
}
- /**
- * Test of {@code constrParam(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testConstrParam() {
}
- /**
- * Test of {@code getLength(DirectPosition, DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_DirectPosition_DirectPosition() {
}
- /**
- * Test of {@code getLength(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_double_double() {
}
- /**
- * Test of {@code param(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParam() {
}
- /**
- * Test of {@code paramForPoint(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParamForPoint() {
}
- /**
- * Test of {@code tangent(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_Length() {
}
- /**
- * Test of {@code tangent(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_double() {
}
- /**
- * Test of {@code subCurve(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_double_double() {
}
- /**
- * Test of {@code subCurve(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_Length_Length() {
}
- /**
- * Test of {@code getOrientationSign()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetOrientationSign() {
}
- /**
- * Test of {@code getProxy()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetProxy() {
}
- /**
- * Test of {@code getPrimitive()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPrimitive() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getSegments()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegments() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
/**
- * Test of {@code getCentroid()}.
+ * The centroid of a curve is weighted by length, and is therefore the middle of a segment.
*/
@Test
- @Disabled("Not implemented yet.")
public void testGetCentroid() {
+ assertPositionEquals(5, 0, createLineString(CRS_2D, SEGMENT).getCentroid());
+ assertPositionEquals(5, 5, createLineString(CRS_2D, DIAGONAL).getCentroid());
}
/**
- * Test of {@code getRepresentativePoint()}.
+ * Contrarily to the centroid, the returned position shall lie on the curve, but which position
+ * is returned is left to the implementation. The segment under test being horizontal, lying on
+ * it means having a null second ordinate and a first ordinate within the range of the segment.
*/
@Test
- @Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
+ final double[] position = createLineString(CRS_2D, SEGMENT).getRepresentativePoint()
+ .getPosition().toArrayDouble();
+ assertEquals(0, position[1], TOLERANCE, "The position shall lie on the segment.");
+ assertTrue(position[0] >= 0 && position[0] <= 10, "The position shall lie on the segment.");
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
/**
- * Test of {@code isSimple()}.
+ * A curve is simple when it does not cross itself.
*/
@Test
- @Disabled("Not implemented yet.")
public void testIsSimple() {
+ assertTrue (createLineString(CRS_2D, SEGMENT).isSimple(), "A segment does not cross itself.");
+ assertTrue (createLineString(CRS_2D, DIAGONAL).isSimple(), "A segment does not cross itself.");
+ assertFalse(createLineString(CRS_2D, SELF_CROSSING).isSimple(), "A curve crossing itself is not simple.");
}
/**
- * Test of {@code isValid()}.
+ * Validity and simplicity are independent on a curve: a curve is allowed to cross itself and
+ * stays valid.
*/
@Test
- @Disabled("Not implemented yet.")
public void testIsValid() {
+ assertTrue(createLineString(CRS_2D, SEGMENT).isValid(), "A segment is a valid curve.");
+ assertTrue(createLineString(CRS_2D, SELF_CROSSING).isValid(), "A curve is allowed to cross itself.");
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/LinearRingTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/LinearRingTest.java
index 7bea173ac3..28c8efcf08 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/LinearRingTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/LinearRingTest.java
@@ -16,7 +16,13 @@
*/
package org.apache.sis.geometries.curve;
+import javax.measure.Quantity;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.apache.sis.geometries.GeometryTest;
+import org.apache.sis.measure.Units;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
@@ -26,36 +32,80 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class LinearRingTest {
+public abstract class LinearRingTest extends GeometryTest {
+ /**
+ * The ring of a square of 10 × 10, therefore of length 40.
+ * Its first position is repeated at the end, a ring being closed.
+ */
+ private static final double[] SQUARE = {0,0, 10,0, 10,10, 0,10, 0,0};
+
+ protected LinearRingTest() {
+ }
+
/**
- * Test of {@code getGeometryType()}.
+ * Creates a ring through the given positions in the given coordinate reference system.
+ * The caller is responsible for repeating the first position at the end.
+ *
+ * @param crs the coordinate reference system of the ring to create, not null.
+ * @param coordinates the coordinates of the positions, in the axis order of the given system.
+ * @return a new ring through the given positions, never null.
*/
+ protected abstract LinearRing createLinearRing(CoordinateReferenceSystem crs, double... coordinates);
+
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
/**
- * Test of {@code isClosed()}.
+ * A ring is closed by definition, whatever the implementation of the operation on the curves it
+ * specializes.
*/
@Test
- @Disabled("Not implemented yet.")
public void testIsClosed() {
+ assertTrue(createLinearRing(CRS_2D, SQUARE).isClosed(), "A linear ring is closed by definition.");
}
/**
- * Test of {@code isSimple()}.
+ * A ring is simple by definition, whatever the implementation of the operation on the curves it
+ * specializes.
*/
@Test
- @Disabled("Not implemented yet.")
public void testIsSimple() {
+ assertTrue(createLinearRing(CRS_2D, SQUARE).isSimple(), "A linear ring is simple by definition.");
}
/**
- * Test of {@code isRing()}.
+ * A ring is both closed and simple, and is therefore a ring.
*/
@Test
- @Disabled("Not implemented yet.")
public void testIsRing() {
+ assertTrue(createLinearRing(CRS_2D, SQUARE).isRing(), "A linear ring is a ring by definition.");
+ }
+
+ /**
+ * The length of a ring is the perimeter of the area it bounds, and is measured in the units of
+ * the coordinate system axes.
+ */
+ @Test
+ public void testGetLength() {
+ final Quantity<?> length = createLinearRing(CRS_2D, SQUARE).getLength();
+ assertEquals(40, length.getValue().doubleValue(), TOLERANCE, "The four edges of a square of 10 × 10.");
+ assertEquals(Units.DEGREE, length.getUnit(), "The length shall use the unit of the axes.");
+ }
+
+ /**
+ * A ring closes on itself, so it has no end position and therefore no boundary.
+ */
+ @Test
+ public void testGetBoundary() {
+ assertTrue(createLinearRing(CRS_2D, SQUARE).getBoundary().isEmpty(),
+ "A closed curve has no boundary.");
+ }
+
+ @Test
+ public void testIsValid() {
+ assertTrue(createLinearRing(CRS_2D, SQUARE).isValid(), "The ring of a square is valid.");
}
+
}
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/MultiCurveTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/MultiCurveTest.java
index cd988497bf..8a6fe7da1e 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/MultiCurveTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/MultiCurveTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,34 +27,22 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class MultiCurveTest {
- /**
- * Test of {@code getGeometryType()}.
- */
+public class MultiCurveTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getElementType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetElementType() {
}
- /**
- * Test of {@code isClosed()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsClosed() {
}
- /**
- * Test of {@code getLength()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/MultiLineStringTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/MultiLineStringTest.java
index 80072276b1..ac9fa36195 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/MultiLineStringTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/MultiLineStringTest.java
@@ -16,7 +16,14 @@
*/
package org.apache.sis.geometries.curve;
+import javax.measure.Quantity;
+import org.apache.sis.geometries.Geometry;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.apache.sis.geometries.GeometryTest;
+import org.apache.sis.measure.Units;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
@@ -26,20 +33,78 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class MultiLineStringTest {
+public abstract class MultiLineStringTest extends GeometryTest {
+ /**
+ * A horizontal segment of length 10 at the origin, and a parallel one 20 above it.
+ * Both have the same length, so the centroid of the set is half way between theirs.
+ */
+ private static final double[] SEGMENT_1 = {0,0, 10,0};
+ private static final double[] SEGMENT_2 = {0,20, 10,20};
+
+ protected MultiLineStringTest() {
+ }
+
/**
- * Test of {@code getGeometryType()}.
+ * Creates a set of curves in the given coordinate reference system.
+ *
+ * @param crs the coordinate reference system of the set to create, not null.
+ * @param lines the coordinates of each curve, in the axis order of the given system.
+ * @return a new set holding the given curves, never null.
*/
+ protected abstract MultiLineString createMultiLineString(CoordinateReferenceSystem crs, double[]... lines);
+
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getElementType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetElementType() {
}
+
+ /**
+ * The length of a set of curves is the sum of the lengths of its elements, measured in the
+ * units of the coordinate system axes.
+ */
+ @Test
+ public void testGetLength() {
+ final Quantity<?> length = createMultiLineString(CRS_2D, SEGMENT_1, SEGMENT_2).getLength();
+ assertEquals(20, length.getValue().doubleValue(), TOLERANCE, "Two segments of 10 each.");
+ assertEquals(Units.DEGREE, length.getUnit(), "The length shall use the unit of the axes.");
+ }
+
+ /**
+ * The centroid of a set of curves is weighted by length, so two segments of the same length
+ * give the middle of their two centroids.
+ */
+ @Test
+ public void testGetCentroid() {
+ final double[] centroid = createMultiLineString(CRS_2D, SEGMENT_1, SEGMENT_2).getCentroid()
+ .getPosition().toArrayDouble();
+ assertEquals( 5, centroid[0], TOLERANCE);
+ assertEquals(10, centroid[1], TOLERANCE);
+ }
+
+ /**
+ * The boundary of a set of open curves is the set of their end positions, so two disjoint
+ * segments are bounded by four positions.
+ */
+ @Test
+ public void testGetBoundary() {
+ final Geometry boundary = createMultiLineString(CRS_2D, SEGMENT_1, SEGMENT_2).getBoundary();
+ assertFalse(boundary.isEmpty(), "Two open curves have end positions.");
+ assertEquals(0, boundary.getTopologicDimension(), "The boundary of a curve is made of positions.");
+ }
+
+ /**
+ * Two curves which neither cross themselves nor each other are both simple and valid.
+ */
+ @Test
+ public void testIsSimpleAndValid() {
+ final MultiLineString lines = createMultiLineString(CRS_2D, SEGMENT_1, SEGMENT_2);
+ assertTrue(lines.isSimple(), "Two disjoint segments are simple.");
+ assertTrue(lines.isValid(), "Two disjoint segments are valid.");
+ }
+
}
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/NurbCurveTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/NurbCurveTest.java
index 19c5d98d86..ae52a6b4d5 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/NurbCurveTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/NurbCurveTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,90 +27,57 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class NurbCurveTest {
- /**
- * Test of {@code getGeometryType()}.
- */
+public class NurbCurveTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getInterpolation()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code getCurveForm()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCurveForm() {
}
- /**
- * Test of {@code getKnotSpec()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnotSpec() {
}
- /**
- * Test of {@code isRational()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRational() {
}
- /**
- * Test of {@code getNumArc()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumArc() {
}
- /**
- * Test of {@code getSegment(int)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegment() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/OffsetCurveTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/OffsetCurveTest.java
index 86199ba135..0d16f72118 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/OffsetCurveTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/OffsetCurveTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,458 +27,287 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class OffsetCurveTest {
- /**
- * Test of {@code getDistance()}.
- */
+public class OffsetCurveTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetDistance() {
}
- /**
- * Test of {@code getRefDirection()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRefDirection() {
}
- /**
- * Test of {@code getBaseCurve()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBaseCurve() {
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getDataPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDataPoints() {
}
- /**
- * Test of {@code getLength()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength() {
}
- /**
- * Test of {@code getStartPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartPoint() {
}
- /**
- * Test of {@code getEndPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndPoint() {
}
- /**
- * Test of {@code isClosed()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsClosed() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isRing()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRing() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code getControlPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetControlPoints() {
}
- /**
- * Test of {@code getKnots()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnots() {
}
- /**
- * Test of {@code getInterpolation()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code getStartConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartConstrParam() {
}
- /**
- * Test of {@code getEndConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndConstrParam() {
}
- /**
- * Test of {@code getStartParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartParam() {
}
- /**
- * Test of {@code getEndParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndParam() {
}
- /**
- * Test of {@code getNumDerivativesInterior()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesInterior() {
}
- /**
- * Test of {@code getNumDerivativesStart()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesStart() {
}
- /**
- * Test of {@code getNumDerivativesEnd()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesEnd() {
}
- /**
- * Test of {@code getReverse()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetReverse() {
}
- /**
- * Test of {@code asLine(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testAsLine() {
}
- /**
- * Test of {@code constrParam(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testConstrParam() {
}
- /**
- * Test of {@code getLength(DirectPosition, DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_DirectPosition_DirectPosition() {
}
- /**
- * Test of {@code getLength(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_double_double() {
}
- /**
- * Test of {@code param(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParam() {
}
- /**
- * Test of {@code paramForPoint(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParamForPoint() {
}
- /**
- * Test of {@code tangent(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_Length() {
}
- /**
- * Test of {@code tangent(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_double() {
}
- /**
- * Test of {@code subCurve(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_double_double() {
}
- /**
- * Test of {@code subCurve(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_Length_Length() {
}
- /**
- * Test of {@code getOrientationSign()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetOrientationSign() {
}
- /**
- * Test of {@code getProxy()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetProxy() {
}
- /**
- * Test of {@code getPrimitive()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPrimitive() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getSegments()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegments() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getGeometryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/PolynomialArcTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/PolynomialArcTest.java
index c6898a5ecd..22b8fd5e5c 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/PolynomialArcTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/PolynomialArcTest.java
@@ -27,17 +27,11 @@ import org.junit.jupiter.api.Test;
* @author Johann Sorel (Geomatys)
*/
public class PolynomialArcTest {
- /**
- * Test of {@code getDegree()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDegree() {
}
- /**
- * Test of {@code function(int)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testFunction() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/PolynomialSplineTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/PolynomialSplineTest.java
index 87b7cb981b..292b5e0845 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/PolynomialSplineTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/PolynomialSplineTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,506 +27,317 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class PolynomialSplineTest {
- /**
- * Test of {@code getInterpolation()}.
- */
+public class PolynomialSplineTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code isRational()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRational() {
}
- /**
- * Test of {@code getDerivativeAtStart()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDerivativeAtStart() {
}
- /**
- * Test of {@code getDerivativeInterior()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDerivativeInterior() {
}
- /**
- * Test of {@code getDerivativeAtEnd()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDerivativeAtEnd() {
}
- /**
- * Test of {@code getCurveForm()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCurveForm() {
}
- /**
- * Test of {@code getKnots()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnots() {
}
- /**
- * Test of {@code getDegree()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDegree() {
}
- /**
- * Test of {@code getKnotSpec()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnotSpec() {
}
- /**
- * Test of {@code getNumArc()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumArc() {
}
- /**
- * Test of {@code getSegment(int)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegment() {
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getDataPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDataPoints() {
}
- /**
- * Test of {@code getLength()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength() {
}
- /**
- * Test of {@code getStartPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartPoint() {
}
- /**
- * Test of {@code getEndPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndPoint() {
}
- /**
- * Test of {@code isClosed()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsClosed() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isRing()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRing() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code getControlPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetControlPoints() {
}
- /**
- * Test of {@code getStartConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartConstrParam() {
}
- /**
- * Test of {@code getEndConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndConstrParam() {
}
- /**
- * Test of {@code getStartParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartParam() {
}
- /**
- * Test of {@code getEndParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndParam() {
}
- /**
- * Test of {@code getNumDerivativesInterior()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesInterior() {
}
- /**
- * Test of {@code getNumDerivativesStart()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesStart() {
}
- /**
- * Test of {@code getNumDerivativesEnd()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesEnd() {
}
- /**
- * Test of {@code getReverse()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetReverse() {
}
- /**
- * Test of {@code asLine(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testAsLine() {
}
- /**
- * Test of {@code constrParam(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testConstrParam() {
}
- /**
- * Test of {@code getLength(DirectPosition, DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_DirectPosition_DirectPosition() {
}
- /**
- * Test of {@code getLength(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_double_double() {
}
- /**
- * Test of {@code param(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParam() {
}
- /**
- * Test of {@code paramForPoint(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParamForPoint() {
}
- /**
- * Test of {@code tangent(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_Length() {
}
- /**
- * Test of {@code tangent(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_double() {
}
- /**
- * Test of {@code subCurve(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_double_double() {
}
- /**
- * Test of {@code subCurve(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_Length_Length() {
}
- /**
- * Test of {@code getOrientationSign()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetOrientationSign() {
}
- /**
- * Test of {@code getProxy()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetProxy() {
}
- /**
- * Test of {@code getPrimitive()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPrimitive() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getSegments()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegments() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getGeometryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ProductCurveTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ProductCurveTest.java
index f9a3fc3ac0..b8d1a61f83 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ProductCurveTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ProductCurveTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,458 +27,287 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class ProductCurveTest {
- /**
- * Test of {@code getInterpolation()}.
- */
+public class ProductCurveTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getElementType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetElementType() {
}
- /**
- * Test of {@code getParameterRange()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetParameterRange() {
}
- /**
- * Test of {@code getProjection()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetProjection() {
}
- /**
- * Test of {@code getDataPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDataPoints() {
}
- /**
- * Test of {@code getLength()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength() {
}
- /**
- * Test of {@code getStartPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartPoint() {
}
- /**
- * Test of {@code getEndPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndPoint() {
}
- /**
- * Test of {@code isClosed()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsClosed() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isRing()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRing() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code getControlPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetControlPoints() {
}
- /**
- * Test of {@code getKnots()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnots() {
}
- /**
- * Test of {@code getStartConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartConstrParam() {
}
- /**
- * Test of {@code getEndConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndConstrParam() {
}
- /**
- * Test of {@code getStartParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartParam() {
}
- /**
- * Test of {@code getEndParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndParam() {
}
- /**
- * Test of {@code getNumDerivativesInterior()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesInterior() {
}
- /**
- * Test of {@code getNumDerivativesStart()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesStart() {
}
- /**
- * Test of {@code getNumDerivativesEnd()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesEnd() {
}
- /**
- * Test of {@code getReverse()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetReverse() {
}
- /**
- * Test of {@code asLine(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testAsLine() {
}
- /**
- * Test of {@code constrParam(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testConstrParam() {
}
- /**
- * Test of {@code getLength(DirectPosition, DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_DirectPosition_DirectPosition() {
}
- /**
- * Test of {@code getLength(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_double_double() {
}
- /**
- * Test of {@code param(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParam() {
}
- /**
- * Test of {@code paramForPoint(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParamForPoint() {
}
- /**
- * Test of {@code tangent(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_Length() {
}
- /**
- * Test of {@code tangent(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_double() {
}
- /**
- * Test of {@code subCurve(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_double_double() {
}
- /**
- * Test of {@code subCurve(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_Length_Length() {
}
- /**
- * Test of {@code getOrientationSign()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetOrientationSign() {
}
- /**
- * Test of {@code getProxy()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetProxy() {
}
- /**
- * Test of {@code getPrimitive()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPrimitive() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getSegments()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegments() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getGeometryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/RealFunctionTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/RealFunctionTest.java
index 169ea94d9e..276b66f842 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/RealFunctionTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/RealFunctionTest.java
@@ -27,33 +27,21 @@ import org.junit.jupiter.api.Test;
* @author Johann Sorel (Geomatys)
*/
public class RealFunctionTest {
- /**
- * Test of {@code getName()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetName() {
}
- /**
- * Test of {@code getDomain()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDomain() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code value(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testValue() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/RealPolynomialTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/RealPolynomialTest.java
index f3c31d58ab..22be200d26 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/RealPolynomialTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/RealPolynomialTest.java
@@ -27,49 +27,31 @@ import org.junit.jupiter.api.Test;
* @author Johann Sorel (Geomatys)
*/
public class RealPolynomialTest {
- /**
- * Test of {@code getName()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetName() {
}
- /**
- * Test of {@code getDomain()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDomain() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getDegree()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDegree() {
}
- /**
- * Test of {@code getC()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetC() {
}
- /**
- * Test of {@code value(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testValue() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/RhumbTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/RhumbTest.java
index 2a4fad9970..7fe17e4b3c 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/RhumbTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/RhumbTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,458 +27,287 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class RhumbTest {
- /**
- * Test of {@code getGeometryType()}.
- */
+public class RhumbTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getInterpolation()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code getBearing()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBearing() {
}
- /**
- * Test of {@code getNumPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumPoints() {
}
- /**
- * Test of {@code getPointN(int)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPointN() {
}
- /**
- * Test of {@code getControlPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetControlPoints() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getDataPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDataPoints() {
}
- /**
- * Test of {@code getLength()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength() {
}
- /**
- * Test of {@code getStartPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartPoint() {
}
- /**
- * Test of {@code getEndPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndPoint() {
}
- /**
- * Test of {@code isClosed()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsClosed() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isRing()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRing() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code getKnots()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnots() {
}
- /**
- * Test of {@code getStartConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartConstrParam() {
}
- /**
- * Test of {@code getEndConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndConstrParam() {
}
- /**
- * Test of {@code getStartParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartParam() {
}
- /**
- * Test of {@code getEndParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndParam() {
}
- /**
- * Test of {@code getNumDerivativesInterior()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesInterior() {
}
- /**
- * Test of {@code getNumDerivativesStart()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesStart() {
}
- /**
- * Test of {@code getNumDerivativesEnd()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesEnd() {
}
- /**
- * Test of {@code getReverse()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetReverse() {
}
- /**
- * Test of {@code asLine(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testAsLine() {
}
- /**
- * Test of {@code constrParam(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testConstrParam() {
}
- /**
- * Test of {@code getLength(DirectPosition, DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_DirectPosition_DirectPosition() {
}
- /**
- * Test of {@code getLength(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_double_double() {
}
- /**
- * Test of {@code param(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParam() {
}
- /**
- * Test of {@code paramForPoint(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParamForPoint() {
}
- /**
- * Test of {@code tangent(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_Length() {
}
- /**
- * Test of {@code tangent(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_double() {
}
- /**
- * Test of {@code subCurve(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_double_double() {
}
- /**
- * Test of {@code subCurve(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_Length_Length() {
}
- /**
- * Test of {@code getOrientationSign()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetOrientationSign() {
}
- /**
- * Test of {@code getProxy()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetProxy() {
}
- /**
- * Test of {@code getPrimitive()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPrimitive() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getSegments()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegments() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/SpiralTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/SpiralTest.java
index 1726791fa1..30318c8b71 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/SpiralTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/SpiralTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.curve;
// Test dependencies
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,458 +27,287 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class SpiralTest {
- /**
- * Test of {@code getInterpolation()}.
- */
+public class SpiralTest extends GeometryTest {
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code getCurvature()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCurvature() {
}
- /**
- * Test of {@code getTorsion()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTorsion() {
}
- /**
- * Test of {@code getStartFrame()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartFrame() {
}
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getDataPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDataPoints() {
}
- /**
- * Test of {@code getLength()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength() {
}
- /**
- * Test of {@code getStartPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartPoint() {
}
- /**
- * Test of {@code getEndPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndPoint() {
}
- /**
- * Test of {@code isClosed()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsClosed() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isRing()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRing() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code getControlPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetControlPoints() {
}
- /**
- * Test of {@code getKnots()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnots() {
}
- /**
- * Test of {@code getStartConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartConstrParam() {
}
- /**
- * Test of {@code getEndConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndConstrParam() {
}
- /**
- * Test of {@code getStartParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartParam() {
}
- /**
- * Test of {@code getEndParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndParam() {
}
- /**
- * Test of {@code getNumDerivativesInterior()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesInterior() {
}
- /**
- * Test of {@code getNumDerivativesStart()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesStart() {
}
- /**
- * Test of {@code getNumDerivativesEnd()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesEnd() {
}
- /**
- * Test of {@code getReverse()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetReverse() {
}
- /**
- * Test of {@code asLine(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testAsLine() {
}
- /**
- * Test of {@code constrParam(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testConstrParam() {
}
- /**
- * Test of {@code getLength(DirectPosition, DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_DirectPosition_DirectPosition() {
}
- /**
- * Test of {@code getLength(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_double_double() {
}
- /**
- * Test of {@code param(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParam() {
}
- /**
- * Test of {@code paramForPoint(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParamForPoint() {
}
- /**
- * Test of {@code tangent(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_Length() {
}
- /**
- * Test of {@code tangent(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_double() {
}
- /**
- * Test of {@code subCurve(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_double_double() {
}
- /**
- * Test of {@code subCurve(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_Length_Length() {
}
- /**
- * Test of {@code getOrientationSign()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetOrientationSign() {
}
- /**
- * Test of {@code getProxy()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetProxy() {
}
- /**
- * Test of {@code getPrimitive()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPrimitive() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getSegments()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegments() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getGeometryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultLineStringTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultLineStringTest.java
index 241f3618b7..e1b19b2d7f 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultLineStringTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultLineStringTest.java
@@ -16,6 +16,12 @@
*/
package org.apache.sis.geometries.internal.shared;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.apache.sis.geometries.DataPoints;
+import org.apache.sis.maths.NDArrays;
+import org.apache.sis.maths.SampleSystem;
+import org.apache.sis.geometries.curve.LineString;
+
// Test dependencies
import org.apache.sis.geometries.curve.LineStringTest;
@@ -26,4 +32,16 @@ import org.apache.sis.geometries.curve.LineStringTest;
* @author Johann Sorel (Geomatys)
*/
public class DefaultLineStringTest extends LineStringTest {
+
+ @Override
+ protected LineString createLineString(final CoordinateReferenceSystem crs, final double... coordinates) {
+ return new DefaultLineString(sequence(crs, coordinates));
+ }
+
+ /**
+ * Creates the positions of a geometry from a flat list of ordinate values.
+ */
+ private static DataPoints sequence(final CoordinateReferenceSystem crs, final double... coordinates) {
+ return new ArrayDataPoints(NDArrays.of(SampleSystem.of(crs), coordinates));
+ }
}
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultLinearRingTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultLinearRingTest.java
index 03b4a3f27f..fafd55edd1 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultLinearRingTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultLinearRingTest.java
@@ -16,6 +16,12 @@
*/
package org.apache.sis.geometries.internal.shared;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.apache.sis.geometries.DataPoints;
+import org.apache.sis.maths.NDArrays;
+import org.apache.sis.maths.SampleSystem;
+import org.apache.sis.geometries.curve.LinearRing;
+
// Test dependencies
import org.apache.sis.geometries.curve.LinearRingTest;
@@ -26,4 +32,16 @@ import org.apache.sis.geometries.curve.LinearRingTest;
* @author Johann Sorel (Geomatys)
*/
public class DefaultLinearRingTest extends LinearRingTest {
+
+ @Override
+ protected LinearRing createLinearRing(final CoordinateReferenceSystem crs, final double... coordinates) {
+ return new DefaultLinearRing(sequence(crs, coordinates));
+ }
+
+ /**
+ * Creates the positions of a geometry from a flat list of ordinate values.
+ */
+ private static DataPoints sequence(final CoordinateReferenceSystem crs, final double... coordinates) {
+ return new ArrayDataPoints(NDArrays.of(SampleSystem.of(crs), coordinates));
+ }
}
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultMultiLineStringTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultMultiLineStringTest.java
index 888773a2df..a3b425859b 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultMultiLineStringTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultMultiLineStringTest.java
@@ -16,6 +16,13 @@
*/
package org.apache.sis.geometries.internal.shared;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.apache.sis.geometries.DataPoints;
+import org.apache.sis.maths.NDArrays;
+import org.apache.sis.maths.SampleSystem;
+import org.apache.sis.geometries.curve.LineString;
+import org.apache.sis.geometries.curve.MultiLineString;
+
// Test dependencies
import org.apache.sis.geometries.curve.MultiLineStringTest;
@@ -26,4 +33,20 @@ import org.apache.sis.geometries.curve.MultiLineStringTest;
* @author Johann Sorel (Geomatys)
*/
public class DefaultMultiLineStringTest extends MultiLineStringTest {
+
+ @Override
+ protected MultiLineString createMultiLineString(final CoordinateReferenceSystem crs, final double[]... lines) {
+ final LineString[] elements = new LineString[lines.length];
+ for (int i = 0; i < elements.length; i++) {
+ elements[i] = new DefaultLineString(sequence(crs, lines[i]));
+ }
+ return new DefaultMultiLineString(crs, elements);
+ }
+
+ /**
+ * Creates the positions of a geometry from a flat list of ordinate values.
+ */
+ private static DataPoints sequence(final CoordinateReferenceSystem crs, final double... coordinates) {
+ return new ArrayDataPoints(NDArrays.of(SampleSystem.of(crs), coordinates));
+ }
}
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultMultiPointTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultMultiPointTest.java
index 6437f001a9..30212717ee 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultMultiPointTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultMultiPointTest.java
@@ -16,6 +16,12 @@
*/
package org.apache.sis.geometries.internal.shared;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.apache.sis.geometries.DataPoints;
+import org.apache.sis.maths.NDArrays;
+import org.apache.sis.maths.SampleSystem;
+import org.apache.sis.geometries.point.MultiPoint;
+
// Test dependencies
import org.apache.sis.geometries.point.MultiPointTest;
@@ -26,4 +32,16 @@ import org.apache.sis.geometries.point.MultiPointTest;
* @author Johann Sorel (Geomatys)
*/
public class DefaultMultiPointTest extends MultiPointTest {
+
+ @Override
+ protected MultiPoint<?> createMultiPoint(final CoordinateReferenceSystem crs, final double... coordinates) {
+ return new DefaultMultiPoint(sequence(crs, coordinates));
+ }
+
+ /**
+ * Creates the positions of a geometry from a flat list of ordinate values.
+ */
+ private static DataPoints sequence(final CoordinateReferenceSystem crs, final double... coordinates) {
+ return new ArrayDataPoints(NDArrays.of(SampleSystem.of(crs), coordinates));
+ }
}
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultMultiPolygonTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultMultiPolygonTest.java
index ba909fd021..b21e00c8fa 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultMultiPolygonTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultMultiPolygonTest.java
@@ -16,6 +16,13 @@
*/
package org.apache.sis.geometries.internal.shared;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.apache.sis.geometries.DataPoints;
+import org.apache.sis.maths.NDArrays;
+import org.apache.sis.maths.SampleSystem;
+import org.apache.sis.geometries.surface.MultiPolygon;
+import org.apache.sis.geometries.surface.Polygon;
+
// Test dependencies
import org.apache.sis.geometries.surface.MultiPolygonTest;
@@ -26,4 +33,20 @@ import org.apache.sis.geometries.surface.MultiPolygonTest;
* @author Johann Sorel (Geomatys)
*/
public class DefaultMultiPolygonTest extends MultiPolygonTest {
+
+ @Override
+ protected MultiPolygon createMultiPolygon(final CoordinateReferenceSystem crs, final double[]... rings) {
+ final Polygon[] elements = new Polygon[rings.length];
+ for (int i = 0; i < elements.length; i++) {
+ elements[i] = new DefaultPolygon(new DefaultLinearRing(sequence(crs, rings[i])));
+ }
+ return new DefaultMultiPolygon(crs, elements);
+ }
+
+ /**
+ * Creates the positions of a geometry from a flat list of ordinate values.
+ */
+ private static DataPoints sequence(final CoordinateReferenceSystem crs, final double... coordinates) {
+ return new ArrayDataPoints(NDArrays.of(SampleSystem.of(crs), coordinates));
+ }
}
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultPolygonTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultPolygonTest.java
index 8deba5d838..41a7d3b9b8 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultPolygonTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultPolygonTest.java
@@ -16,6 +16,15 @@
*/
package org.apache.sis.geometries.internal.shared;
+import java.util.ArrayList;
+import java.util.List;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.apache.sis.geometries.DataPoints;
+import org.apache.sis.geometries.curve.LinearRing;
+import org.apache.sis.geometries.surface.Polygon;
+import org.apache.sis.maths.NDArrays;
+import org.apache.sis.maths.SampleSystem;
+
// Test dependencies
import org.apache.sis.geometries.surface.PolygonTest;
@@ -26,4 +35,22 @@ import org.apache.sis.geometries.surface.PolygonTest;
* @author Johann Sorel (Geomatys)
*/
public class DefaultPolygonTest extends PolygonTest {
+
+ @Override
+ protected Polygon createPolygon(final CoordinateReferenceSystem crs,
+ final double[] exterior, final double[]... holes)
+ {
+ final List<LinearRing> interiors = new ArrayList<>(holes.length);
+ for (final double[] hole : holes) {
+ interiors.add(new DefaultLinearRing(sequence(crs, hole)));
+ }
+ return new DefaultPolygon(new DefaultLinearRing(sequence(crs, exterior)), interiors);
+ }
+
+ /**
+ * Creates the positions of a geometry from a flat list of ordinate values.
+ */
+ private static DataPoints sequence(final CoordinateReferenceSystem crs, final double... coordinates) {
+ return new ArrayDataPoints(NDArrays.of(SampleSystem.of(crs), coordinates));
+ }
}
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultRawMultiPointTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultRawMultiPointTest.java
index 81f195fc06..0d03931b93 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultRawMultiPointTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultRawMultiPointTest.java
@@ -16,6 +16,10 @@
*/
package org.apache.sis.geometries.internal.shared;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.apache.sis.geometries.Point;
+import org.apache.sis.geometries.point.MultiPoint;
+
// Test dependencies
import org.apache.sis.geometries.point.MultiPointTest;
@@ -26,4 +30,17 @@ import org.apache.sis.geometries.point.MultiPointTest;
* @author Johann Sorel (Geomatys)
*/
public class DefaultRawMultiPointTest extends MultiPointTest {
+
+ /**
+ * Creates the set from an array of positions rather than from a sequence of positions,
+ * which is the difference between this implementation and {@link DefaultMultiPoint}.
+ */
+ @Override
+ protected MultiPoint<?> createMultiPoint(final CoordinateReferenceSystem crs, final double... coordinates) {
+ final Point[] points = new Point[coordinates.length / 2];
+ for (int i = 0; i < points.length; i++) {
+ points[i] = new DefaultPoint(crs, coordinates[i*2], coordinates[i*2 + 1]);
+ }
+ return new DefaultRawMultiPoint(crs, points);
+ }
}
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultReversedCurveTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultReversedCurveTest.java
index 59f47cc473..6e6880f9fd 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultReversedCurveTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultReversedCurveTest.java
@@ -27,433 +27,271 @@ import org.junit.jupiter.api.Test;
* @author Johann Sorel (Geomatys)
*/
public class DefaultReversedCurveTest {
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getDataPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDataPoints() {
}
- /**
- * Test of {@code getLength()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength() {
}
- /**
- * Test of {@code getStartPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartPoint() {
}
- /**
- * Test of {@code getEndPoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndPoint() {
}
- /**
- * Test of {@code isClosed()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsClosed() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isRing()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsRing() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code getControlPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetControlPoints() {
}
- /**
- * Test of {@code getKnots()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnots() {
}
- /**
- * Test of {@code getInterpolation()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code getStartConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartConstrParam() {
}
- /**
- * Test of {@code getEndConstrParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndConstrParam() {
}
- /**
- * Test of {@code getStartParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetStartParam() {
}
- /**
- * Test of {@code getEndParam()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEndParam() {
}
- /**
- * Test of {@code getNumDerivativesInterior()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesInterior() {
}
- /**
- * Test of {@code getNumDerivativesStart()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesStart() {
}
- /**
- * Test of {@code getNumDerivativesEnd()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesEnd() {
}
- /**
- * Test of {@code getReverse()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetReverse() {
}
- /**
- * Test of {@code asLine(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testAsLine() {
}
- /**
- * Test of {@code constrParam(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testConstrParam() {
}
- /**
- * Test of {@code getLength(DirectPosition, DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_DirectPosition_DirectPosition() {
}
- /**
- * Test of {@code getLength(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetLength_double_double() {
}
- /**
- * Test of {@code param(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParam() {
}
- /**
- * Test of {@code paramForPoint(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testParamForPoint() {
}
- /**
- * Test of {@code tangent(Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_Length() {
}
- /**
- * Test of {@code tangent(double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testTangent_double() {
}
- /**
- * Test of {@code subCurve(double, double)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_double_double() {
}
- /**
- * Test of {@code subCurve(Length, Length)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSubCurve_Length_Length() {
}
- /**
- * Test of {@code getOrientationSign()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetOrientationSign() {
}
- /**
- * Test of {@code getProxy()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetProxy() {
}
- /**
- * Test of {@code getPrimitive()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPrimitive() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getSegments()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegments() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getGeometryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultReversedSurfaceTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultReversedSurfaceTest.java
index 38607739a3..24ba76d2ac 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultReversedSurfaceTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultReversedSurfaceTest.java
@@ -27,305 +27,191 @@ import org.junit.jupiter.api.Test;
* @author Johann Sorel (Geomatys)
*/
public class DefaultReversedSurfaceTest {
- /**
- * Test of {@code getTopologicDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
}
- /**
- * Test of {@code getArea()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetArea() {
}
- /**
- * Test of {@code getCentroid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCentroid() {
}
- /**
- * Test of {@code getPointOnSurface()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPointOnSurface() {
}
- /**
- * Test of {@code getBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundary() {
}
- /**
- * Test of {@code getInterpolation()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetInterpolation() {
}
- /**
- * Test of {@code getNumDerivativesBoundary()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativesBoundary() {
}
- /**
- * Test of {@code getNumDerivativeInterior()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetNumDerivativeInterior() {
}
- /**
- * Test of {@code getPerimeter()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPerimeter() {
}
- /**
- * Test of {@code getDataPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDataPoints() {
}
- /**
- * Test of {@code getControlPoints()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetControlPoints() {
}
- /**
- * Test of {@code getKnots()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetKnots() {
}
- /**
- * Test of {@code upNormal(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUpNormal() {
}
- /**
- * Test of {@code getOrientationSign()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetOrientationSign() {
}
- /**
- * Test of {@code getProxy()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetProxy() {
}
- /**
- * Test of {@code getPrimitive()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetPrimitive() {
}
- /**
- * Test of {@code getReverse()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetReverse() {
}
- /**
- * Test of {@code getBoundaryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetBoundaryType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension() {
}
- /**
- * Test of {@code getSegments()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSegments() {
}
- /**
- * Test of {@code getCoordinateReferenceSystem()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code setCoordinateReferenceSystem(CoordinateReferenceSystem)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testSetCoordinateReferenceSystem() {
}
- /**
- * Test of {@code getMetadata()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMetadata() {
}
- /**
- * Test of {@code getAttributesType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetAttributesType() {
}
- /**
- * Test of {@code getDimension(DirectPosition)}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetDimension_DirectPosition() {
}
- /**
- * Test of {@code is3D()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIs3D() {
}
- /**
- * Test of {@code getSpatialDimension()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetSpatialDimension() {
}
- /**
- * Test of {@code getGeometryType()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType() {
}
- /**
- * Test of {@code getGeometryType2()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetGeometryType2() {
}
- /**
- * Test of {@code getEnvelope()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetEnvelope() {
}
- /**
- * Test of {@code getRepresentativePoint()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetRepresentativePoint() {
}
- /**
- * Test of {@code getClosure()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetClosure() {
}
- /**
- * Test of {@code getMaximalComplex()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testGetMaximalComplex() {
}
- /**
- * Test of {@code isEmpty()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsEmpty() {
}
- /**
- * Test of {@code isSimple()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsSimple() {
}
- /**
- * Test of {@code isCycle()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsCycle() {
}
- /**
- * Test of {@code isValid()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testIsValid() {
}
- /**
- * Test of {@code userProperties()}.
- */
@Test
@Disabled("Not implemented yet.")
public void testUserProperties() {
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/mesh/PrimitiveTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/mesh/PrimitiveTest.java
index 23ad25e363..77f31375ea 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/mesh/PrimitiveTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/mesh/PrimitiveTest.java
@@ -19,6 +19,7 @@ package org.apache.sis.geometries.mesh;
import java.util.Arrays;
import java.util.List;
import org.apache.sis.geometries.Geometries;
+import org.apache.sis.geometries.GeometryTest;
import org.apache.sis.maths.NDArrays;
// Test dependencies
@@ -30,8 +31,7 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class PrimitiveTest {
-
+public class PrimitiveTest extends GeometryTest {
/**
* Test remove duplicate method.
* In this test vertex 0 and 3 are duplicates.
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/mesh/PrimitiveVisitorTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/mesh/PrimitiveVisitorTest.java
index ff51291212..4da049c0c7 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/mesh/PrimitiveVisitorTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/mesh/PrimitiveVisitorTest.java
@@ -46,7 +46,6 @@ public class PrimitiveVisitorTest {
private static final CoordinateReferenceSystem CRS3D = Geometries.getUndefinedCRS(3);
private static final SampleSystem SS3D = SampleSystem.of(CRS3D);
-
/**
* Test visiting Points.
*/
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/operation/AbstractD9IMTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/operation/AbstractD9IMTest.java
new file mode 100644
index 0000000000..53d54afda6
--- /dev/null
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/operation/AbstractD9IMTest.java
@@ -0,0 +1,357 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.geometries.operation;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.apache.sis.geometries.Curve;
+import org.apache.sis.geometries.Empty;
+import org.apache.sis.geometries.Geometry;
+import org.apache.sis.geometries.GeometryCollection;
+import org.apache.sis.geometries.GeometryFactory;
+import org.apache.sis.geometries.Point;
+import org.apache.sis.geometries.Surface;
+import org.apache.sis.geometries.adapter.WellKnownText;
+import org.apache.sis.geometries.curve.LineString;
+import org.apache.sis.geometries.curve.MultiCurve;
+import org.apache.sis.geometries.curve.MultiLineString;
+import org.apache.sis.geometries.point.MultiPoint;
+import org.apache.sis.geometries.surface.MultiPolygon;
+import org.apache.sis.geometries.surface.MultiSurface;
+import org.apache.sis.geometries.surface.Polygon;
+import org.apache.sis.referencing.CommonCRS;
+
+// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+
+/**
+ * Base class of the tests of the spatial relationships and of the operations derived from them.
+ * It holds the geometries those tests share, so that a test class inherits them by extending
+ * this class instead of importing them one by one.
+ *
+ * <p>The geometries are immutable, which allows the test classes to declare them once and to
+ * reuse the same instances in every test case. They are declared as Well-Known Text, so that
+ * the shape under test can be read at a glance, and their coordinates are chosen so that every
+ * expected value is exact.</p>
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public abstract class AbstractD9IMTest {
+ /**
+ * The coordinate reference system of all the geometries declared in this class.
+ */
+ public static final CoordinateReferenceSystem CRS_2D = CommonCRS.WGS84.geographic();
+
+ /**
+ * Tolerance threshold on the measurements computed by the operations.
+ * For floating point arithmetic errors.
+ */
+ protected static final double TOLERANCE = 1E-9;
+
+ /**
+ * An empty geometry. Together with {@link #EMPTY_2}, it allows to verify that the result of an
+ * operation on the empty set depends on the emptiness of the operands, not on their identity.
+ */
+ public static final Empty EMPTY_1 = GeometryFactory.createEmpty(CRS_2D);
+
+ /**
+ * Another empty geometry, distinct from {@link #EMPTY_1} but equal to it as a set of positions.
+ */
+ public static final Empty EMPTY_2 = GeometryFactory.createEmpty(CRS_2D);
+
+ /**
+ * An arbitrary geometry which is not empty, used as the other operand of the operations
+ * tested against the empty set.
+ */
+ public static final Point NON_EMPTY = GeometryFactory.createPoint(CRS_2D, 10.0, 5.0);
+
+ /**
+ * An arbitrary point. Together with {@link #POINT_A_BIS}, it allows to verify that the result
+ * of an operation on two points depends on their positions, not on their identity.
+ */
+ public static final Point POINT_A = GeometryFactory.createPoint(CRS_2D, 10.0, 5.0);
+
+ /**
+ * Another point, distinct from {@link #POINT_A} but at the same position.
+ */
+ public static final Point POINT_A_BIS = GeometryFactory.createPoint(CRS_2D, 10.0, 5.0);
+
+ /**
+ * A point at a position different than {@link #POINT_A}.
+ */
+ public static final Point POINT_B = GeometryFactory.createPoint(CRS_2D, 20.0, 15.0);
+
+ /**
+ * The empty geometry expected as the result of an operation which found no position,
+ * for example the intersection of {@link #POINT_A} with {@link #POINT_B}.
+ * It is a distinct instance from {@link #EMPTY_1} on purpose: an operation builds its
+ * result rather than returning an operand when neither operand is empty.
+ */
+ public static final Empty EMPTY_RESULT = GeometryFactory.createEmpty(CRS_2D);
+
+ /*
+ * ────────────────────────────────────────────────────────────────────────────────────────
+ * Geometries used by the tests of the measurements, of the derived positions and of the
+ * spatial relationships. They describe what those operations shall answer, not how they
+ * compute it, so that they keep their meaning if the implementation changes. They are
+ * declared as Well-Known Text so that the shape under test can be read at a glance.
+ *
+ * The operations are specified in terms of the interior, the boundary and the exterior of
+ * their operands, so one geometry per combination of those is enough: a `LinearRing` is a
+ * `LineString`, and asking the same question about both asks the same question twice. The
+ * combinations covered are a position, a set of positions, a curve, a set of curves, a
+ * surface, a surface with a hole, a set of surfaces and a heterogeneous collection.
+ *
+ * All the geometries below are laid out on the following grid, so that every expected
+ * result is an exact value which can be checked by hand:
+ *
+ * y=20 ├─ LINE_FAR ─┤
+ * y=15 ┌────────────┐
+ * y=10 ┌────────────┬────┼───┐ │ SQUARE_OVERLAP = [5…15]²
+ * │ SQUARE │ SQUARE_TOUCHING │
+ * │ [0…10]² │ │ │ │
+ * y=0 └────────────┴────┴───┘────────┘
+ * x=0 x=10 x=15 x=20
+ * ────────────────────────────────────────────────────────────────────────────────────────
+ */
+
+ /**
+ * A position strictly inside {@link #SQUARE}, and strictly inside the hole of
+ * {@link #SQUARE_WITH_HOLE} and therefore outside that polygon.
+ */
+ public static final Point POINT_CENTER = (Point) wkt("POINT (5 5)");
+
+ /**
+ * A position on the boundary of {@link #SQUARE} and in the interior of {@link #LINE_BOTTOM}.
+ */
+ public static final Point POINT_ON_EDGE = (Point) wkt("POINT (5 0)");
+
+ /**
+ * A corner of {@link #SQUARE}, which is also an end point of {@link #LINE_BOTTOM}
+ * and therefore on the boundary of that curve.
+ */
+ public static final Point POINT_CORNER = (Point) wkt("POINT (0 0)");
+
+ /**
+ * The other end point of {@link #LINE_BOTTOM}.
+ */
+ public static final Point POINT_LINE_END = (Point) wkt("POINT (10 0)");
+
+ /**
+ * A position outside every other geometry declared in this class, except the aggregates
+ * which include {@link #SQUARE_DISJOINT}.
+ */
+ public static final Point POINT_OUTSIDE = (Point) wkt("POINT (20 20)");
+
+ /**
+ * A curve of length 10 lying exactly on the bottom edge of {@link #SQUARE}.
+ * Its interior is therefore entirely on the boundary of that polygon.
+ */
+ public static final LineString LINE_BOTTOM = (LineString) wkt("LINESTRING (0 0, 10 0)");
+
+ /**
+ * A curve of length 10√2 joining two opposite corners of {@link #SQUARE}.
+ * It meets {@link #LINE_BOTTOM} only at the end point they have in common.
+ */
+ public static final LineString LINE_DIAGONAL = (LineString) wkt("LINESTRING (0 0, 10 10)");
+
+ /**
+ * A curve passing right through {@link #SQUARE}, entering by its bottom edge and leaving by
+ * its top edge. It meets {@link #LINE_BOTTOM} at one position interior to both of them.
+ */
+ public static final LineString LINE_CROSSING = (LineString) wkt("LINESTRING (5 -5, 5 15)");
+
+ /**
+ * A curve of length 6 strictly inside {@link #SQUARE}, end points included.
+ */
+ public static final LineString LINE_INSIDE = (LineString) wkt("LINESTRING (2 5, 8 5)");
+
+ /**
+ * A curve collinear with {@link #LINE_BOTTOM}, which it overlaps on half of its length.
+ */
+ public static final LineString LINE_COLLINEAR = (LineString) wkt("LINESTRING (5 0, 15 0)");
+
+ /**
+ * A curve of length 10 parallel to {@link #LINE_BOTTOM}, at a distance of 20 from it
+ * and at a distance of 10 from {@link #SQUARE}.
+ */
+ public static final LineString LINE_FAR = (LineString) wkt("LINESTRING (0 20, 10 20)");
+
+ /**
+ * A curve crossing itself at (5 5). It is {@linkplain Geometry#isValid() valid}, since a
+ * curve is allowed to cross itself, but it is not {@linkplain Geometry#isSimple() simple}.
+ */
+ public static final LineString LINE_SELF_CROSSING = (LineString) wkt("LINESTRING (0 0, 10 10, 10 0, 0 10)");
+
+ /**
+ * A square of 10 × 10, therefore of area 100 and of perimeter 40, with its centroid at (5 5).
+ */
+ public static final Polygon SQUARE = (Polygon) wkt("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))");
+
+ /**
+ * Another square at the same position as {@link #SQUARE}, but a distinct instance.
+ * It allows to verify that the operations depend on the positions, not on the identity.
+ */
+ public static final Polygon SQUARE_BIS = (Polygon) wkt("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))");
+
+ /**
+ * {@link #SQUARE} with a square hole of 2 × 2 at its center, therefore of area 96 and of
+ * boundary length 48. Its centroid stays at (5 5) by symmetry, but that position is in the
+ * hole and therefore outside the polygon.
+ */
+ public static final Polygon SQUARE_WITH_HOLE =
+ (Polygon) wkt("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0), (4 4, 6 4, 6 6, 4 6, 4 4))");
+
+ /**
+ * A square of area 4 strictly inside {@link #SQUARE}.
+ */
+ public static final Polygon SQUARE_INNER = (Polygon) wkt("POLYGON ((2 2, 4 2, 4 4, 2 4, 2 2))");
+
+ /**
+ * A square of area 100 overlapping {@link #SQUARE} on a quarter of its area.
+ */
+ public static final Polygon SQUARE_OVERLAP = (Polygon) wkt("POLYGON ((5 5, 15 5, 15 15, 5 15, 5 5))");
+
+ /**
+ * A square sharing a whole edge with {@link #SQUARE} but no interior position.
+ */
+ public static final Polygon SQUARE_TOUCHING = (Polygon) wkt("POLYGON ((10 0, 20 0, 20 10, 10 10, 10 0))");
+
+ /**
+ * A square of area 100 having no position in common with {@link #SQUARE},
+ * the shortest distance between the two being 10√2.
+ */
+ public static final Polygon SQUARE_DISJOINT = (Polygon) wkt("POLYGON ((20 20, 30 20, 30 30, 20 30, 20 20))");
+
+ /**
+ * A polygon whose ring crosses itself at (5 5), and which is therefore not
+ * {@linkplain Geometry#isValid() valid}.
+ */
+ public static final Polygon SQUARE_BOWTIE = (Polygon) wkt("POLYGON ((0 0, 10 10, 10 0, 0 10, 0 0))");
+
+ /**
+ * Two positions strictly inside {@link #SQUARE}.
+ */
+ public static final MultiPoint<?> MULTI_POINT_INSIDE = (MultiPoint<?>) wkt("MULTIPOINT ((2 2), (5 5))");
+
+ /**
+ * Two positions, one inside {@link #SQUARE} and one outside it. A set of positions straddling
+ * a surface this way crosses it, which a single position can never do.
+ */
+ public static final MultiPoint<?> MULTI_POINT_SPREAD = (MultiPoint<?>) wkt("MULTIPOINT ((5 5), (20 20))");
+
+ /**
+ * The same position twice, which makes this set of positions not
+ * {@linkplain Geometry#isSimple() simple}.
+ */
+ public static final MultiPoint<?> MULTI_POINT_REPEATED = (MultiPoint<?>) wkt("MULTIPOINT ((5 5), (5 5))");
+
+ /**
+ * Two disjoint curves of length 10 each, therefore of total length 20.
+ */
+ public static final MultiLineString MULTI_LINE =
+ (MultiLineString) wkt("MULTILINESTRING ((0 0, 10 0), (0 20, 10 20))");
+
+ /**
+ * Two disjoint squares of area 100 each, therefore of total area 200,
+ * with their centroid half way between the two centroids.
+ */
+ public static final MultiPolygon MULTI_POLYGON = (MultiPolygon) wkt("MULTIPOLYGON (((0 0, 10 0, 10 10, 0 10, 0 0)), ((20 20, 30 20, 30 30, 20 30, 20 20)))");
+
+ /**
+ * A heterogeneous collection of a position and a curve. Only the components of the largest
+ * dimension contribute to the centroid, which is therefore the centroid of the curve.
+ */
+ public static final GeometryCollection<?> COLLECTION =
+ (GeometryCollection<?>) wkt("GEOMETRYCOLLECTION (POINT (5 5), LINESTRING (0 0, 10 0))");
+
+ /**
+ * Decodes the given Well-Known Text in the {@link #CRS_2D} reference system.
+ * The geometries of this class are declared this way so that the shape under
+ * test can be read at a glance.
+ *
+ * @param text the Well-Known Text to decode.
+ * @return the geometry represented by the given text.
+ */
+ public static Geometry wkt(final String text) {
+ return new WellKnownText().decode(text, CRS_2D);
+ }
+
+ /**
+ * Returns the area of the given geometry, which shall be a surface or a set of surfaces.
+ * This method also verifies that the geometry has the expected dimension, an operation
+ * which returns a surface never being allowed to return a curve or a position instead.
+ *
+ * @param geometry the geometry from which to get the area.
+ * @return area of the given geometry, in the units of the coordinate system axes.
+ */
+ public static double areaOf(final Geometry geometry) {
+ if (geometry instanceof Surface s) {
+ return s.getArea().getValue().doubleValue();
+ }
+ if (geometry instanceof MultiSurface<?> m) {
+ return m.getArea().getValue().doubleValue();
+ }
+ throw new AssertionError("Not a surface: " + geometry.getClass().getSimpleName());
+ }
+
+ /**
+ * Returns the length of the given geometry, which shall be a curve or a set of curves.
+ *
+ * @param geometry the geometry from which to get the length.
+ * @return length of the given geometry, in the units of the coordinate system axes.
+ */
+ public static double lengthOf(final Geometry geometry) {
+ if (geometry instanceof Curve c) {
+ return c.getLength().getValue().doubleValue();
+ }
+ if (geometry instanceof MultiCurve<?> m) {
+ return m.getLength().getValue().doubleValue();
+ }
+ throw new AssertionError("Not a curve: " + geometry.getClass().getSimpleName());
+ }
+
+ /**
+ * Creates a new test case. Reserved to the subclasses,
+ * this class holding the shared geometries but no test.
+ */
+ protected AbstractD9IMTest() {
+ }
+
+ /**
+ * Asserts that the given collection contains exactly the positions of the given points,
+ * in any order. This is used for the results of the operations which are specified as a
+ * set of positions, the order of which is left to the implementation.
+ *
+ * @param actual the collection of points to verify.
+ * @param expected the points which shall be in the given collection, in any order.
+ */
+ public static void assertPositionsEqual(final MultiPoint<?> actual, final Point... expected) {
+ final List<String> remaining = new ArrayList<>(expected.length);
+ for (final Point point : expected) {
+ remaining.add(Arrays.toString(point.getPosition().toArrayDouble()));
+ }
+ for (int i = 0; i < actual.getNumGeometries(); i++) {
+ final String position = Arrays.toString(actual.getGeometryN(i).getPosition().toArrayDouble());
+ assertTrue(remaining.remove(position), () -> "Unexpected position " + position + '.');
+ }
+ assertTrue(remaining.isEmpty(), () -> "Missing positions " + remaining + '.');
+ }
+}
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/operation/BufferTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/operation/BufferTest.java
index ab33f01b8f..e602b83f56 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/operation/BufferTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/operation/BufferTest.java
@@ -21,8 +21,6 @@ import org.apache.sis.geometries.Geometry;
import org.apache.sis.geometries.Surface;
import org.apache.sis.measure.Quantities;
import org.apache.sis.measure.Units;
-import static org.apache.sis.geometries.operation.TestData.EMPTY_1;
-import static org.apache.sis.geometries.operation.TestData.POINT_A;
// Test dependencies
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -38,7 +36,7 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class BufferTest {
+public class BufferTest extends AbstractD9IMTest {
/**
* The inputs and expected result of a single test of {@code buffer(Geometry, Quantity)}.
*
@@ -48,9 +46,9 @@ public class BufferTest {
* @param error the type of the expected exception, or {@code null} if the operation should succeed.
*/
private record TestCase(Geometry input,
- Quantity<?> radius,
- Geometry expected,
- Class<? extends Exception> error)
+ Quantity<?> radius,
+ Geometry expected,
+ Class<? extends Exception> error)
{
}
@@ -114,7 +112,7 @@ public class BufferTest {
*/
@Test
public void testBufferOfPointWithZeroRadius() {
- final Geometry result = new GeometryProcessor().buffer(POINT_A, Quantities.create(0, Units.METRE));
+ final Geometry result = new GeometryProcessor().buffer(POINT_A, Quantities.create( 0, Units.METRE));
assertTrue(result.isEmpty(), "The buffer of a point with a radius of zero is empty.");
}
}
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/operation/ContainsTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/operation/ContainsTest.java
index b44e7311c9..f9467191e0 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/operation/ContainsTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/operation/ContainsTest.java
@@ -17,12 +17,6 @@
package org.apache.sis.geometries.operation;
import org.apache.sis.geometries.Geometry;
-import static org.apache.sis.geometries.operation.TestData.EMPTY_1;
-import static org.apache.sis.geometries.operation.TestData.EMPTY_2;
-import static org.apache.sis.geometries.operation.TestData.NON_EMPTY;
-import static org.apache.sis.geometries.operation.TestData.POINT_A;
-import static org.apache.sis.geometries.operation.TestData.POINT_A_BIS;
-import static org.apache.sis.geometries.operation.TestData.POINT_B;
// Test dependencies
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -35,7 +29,7 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class ContainsTest {
+public class ContainsTest extends AbstractD9IMTest {
/**
* The inputs and expected result of a single test of {@code contains(Geometry, Geometry)}.
*
@@ -45,9 +39,9 @@ public class ContainsTest {
* @param error the type of the expected exception, or {@code null} if the operation should succeed.
*/
private record TestCase(Geometry input,
- Geometry other,
- Boolean expected,
- Class<? extends Exception> error)
+ Geometry other,
+ Boolean expected,
+ Class<? extends Exception> error)
{
}
@@ -56,15 +50,51 @@ public class ContainsTest {
*/
private static final TestCase[] ENTRIES = {
// The empty set is a superset of itself only, and a subset of every geometry.
- new TestCase(EMPTY_1, EMPTY_1, true, null),
- new TestCase(EMPTY_1, EMPTY_2, true, null),
- new TestCase(EMPTY_1, NON_EMPTY, false, null),
- new TestCase(NON_EMPTY, EMPTY_1, true, null),
+ new TestCase(EMPTY_1, EMPTY_1, true, null),
+ new TestCase(EMPTY_1, EMPTY_2, true, null),
+ new TestCase(EMPTY_1, NON_EMPTY, false, null),
+ new TestCase(NON_EMPTY, EMPTY_1, true, null),
// points
- new TestCase(POINT_A, POINT_A, true, null),
- new TestCase(POINT_A, POINT_A_BIS, true, null),
- new TestCase(POINT_A, POINT_B, false, null),
- new TestCase(POINT_B, POINT_A, false, null)
+ new TestCase(POINT_A, POINT_A, true, null),
+ new TestCase(POINT_A, POINT_A_BIS, true, null),
+ new TestCase(POINT_A, POINT_B, false, null),
+ new TestCase(POINT_B, POINT_A, false, null),
+ /*
+ * A surface and a position. Only the positions interior to the surface are contained:
+ * the center of a surface with a hole is in that hole and is therefore not.
+ *
+ * A position exactly on the boundary of a surface is left out of this table on purpose.
+ * That case is verified by `WithinTest`, which states the same thing the other way round
+ * without going through the point-in-polygon shortcut of `contains(Polygon, Point)`.
+ */
+ new TestCase(SQUARE, POINT_CENTER, true, null),
+ new TestCase(SQUARE, POINT_OUTSIDE, false, null),
+ new TestCase(SQUARE_WITH_HOLE, POINT_CENTER, false, null),
+ /*
+ * A curve and a position. An end position of the curve is on its boundary,
+ * and a geometry does not contain the positions of its own boundary.
+ */
+ new TestCase(LINE_BOTTOM, POINT_ON_EDGE, true, null),
+ new TestCase(LINE_BOTTOM, POINT_CORNER, false, null),
+ /*
+ * A surface and a curve. A curve lying on the boundary of a surface is not contained
+ * by it, no position of that curve being interior to the surface.
+ */
+ new TestCase(SQUARE, LINE_INSIDE, true, null),
+ new TestCase(SQUARE, LINE_BOTTOM, false, null),
+ new TestCase(SQUARE, LINE_CROSSING, false, null),
+ /*
+ * Two surfaces. Two surfaces at the same position contain each other.
+ */
+ new TestCase(SQUARE, SQUARE_INNER, true, null),
+ new TestCase(SQUARE, SQUARE_OVERLAP, false, null),
+ new TestCase(SQUARE, SQUARE_BIS, true, null),
+ /*
+ * Sets of geometries. A set is contained when all of its elements are.
+ */
+ new TestCase(SQUARE, MULTI_POINT_INSIDE, true, null),
+ new TestCase(SQUARE, MULTI_POINT_SPREAD, false, null),
+ new TestCase(MULTI_POLYGON, SQUARE, true, null)
};
/**
diff --git a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/operation/ConvexHullTest.java b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/operation/ConvexHullTest.java
index 2c45b36460..8fd6b67d27 100644
--- a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/operation/ConvexHullTest.java
+++ b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/operation/ConvexHullTest.java
@@ -17,8 +17,6 @@
package org.apache.sis.geometries.operation;
import org.apache.sis.geometries.Geometry;
-import static org.apache.sis.geometries.operation.TestData.EMPTY_1;
-import static org.apache.sis.geometries.operation.TestData.POINT_A;
// Test dependencies
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -31,7 +29,7 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class ConvexHullTest {
+public class ConvexHullTest extends AbstractD9IMTest {
/**
* The inputs and expected result of a single test of {@code convexHull(Geometry)}.
*
@@ -40,8 +38,8 @@ public class ConvexHullTest {
* @param error the type of the expected exception, or {@code null} if the operation should succeed.
*/
private record TestCase(Geometry input,
- Geometry expected,
- Class<? extends Exception> error)
+ Geometry expected,
+ Class<? extends Exception> error)
{
}
@@ -72,4 +70,27 @@ public class ConvexHullTest {
}
}
}
+
+ /**
+ * Tests {@code convexHull(Geometry)} on the geometries which are not already convex.
+ * The hull of a convex surface is that surface, and the hull of a curve crossing itself
+ * is the smallest convex surface enclosing all of its positions.
+ */
+ @Test
+ public void testConvexHullOfShapes() {
+ final GeometryProcessor processor = new GeometryProcessor();
+ assertEquals(100, areaOf(processor.convexHull(SQUARE)), TOLERANCE, "A square is already convex.");
+ assertEquals(100, areaOf(processor.convexHull(SQUARE_WITH_HOLE)), TOLERANCE, "The hull of a square with a hole fills that hole.");
+ /*
+ * The four positions of that curve are the four corners of a square of 10 × 10,
+ * whatever the order in which the curve visits them.
+ */
+ assertEquals(100, areaOf(processor.convexHull(LINE_SELF_CROSSING)), TOLERANCE, "The hull of a curve visiting the four corners of a square is that square.");
+ /*
+ * The hull of the two squares [0…10]² and [20…30]² is the hexagon
+ * (0 0), (10 0), (30 20), (30 30), (20 30), (0 10), of area 500.
... 4437 lines suppressed ...