Package org.opentrafficsim.core.geometry
Class OtsLine2dTest
java.lang.Object
org.opentrafficsim.core.geometry.OtsLine2dTest
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Peter Knoppers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidTest the createAndCleanOtsLine2d method.final voidTest the concatenate method.final voidTest the constructors of OtsLine2d.final voidTest the equals method.final voidTest that exception is thrown when it should be.final voidTest the extract and extractFraction methods.final voidTest the getLocationExtended method and friends.final voidTest getLocation method.final voidTest the noiseFilterRamerDouglasPeuker filter method.final voidTest the offsetLine method.final voidprintPath2D(Path2D path) Print a Path2D to the console.final voidTest the reverse method.final voidtestFind()Test the find method.final voidTests the fractional projection method.voidTest the getRadius method.final voidTest the truncate method.
-
Constructor Details
-
OtsLine2dTest
public OtsLine2dTest()
-
-
Method Details
-
constructorsTest
@Test public final void constructorsTest() throws org.opentrafficsim.core.geometry.OtsGeometryException, org.opentrafficsim.core.network.NetworkExceptionTest the constructors of OtsLine2d.- Throws:
org.opentrafficsim.core.geometry.OtsGeometryException- on failureorg.opentrafficsim.core.network.NetworkException- on failure
-
printPath2D
Print a Path2D to the console.- Parameters:
path- Path2D; the path
-
exceptionTest
@Test public final void exceptionTest() throws org.opentrafficsim.core.geometry.OtsGeometryExceptionTest that exception is thrown when it should be.- Throws:
org.opentrafficsim.core.geometry.OtsGeometryException- should not happen; this test has failed if it does happen
-
locationExtendedTest
@Test public final void locationExtendedTest() throws org.opentrafficsim.core.geometry.OtsGeometryExceptionTest the getLocationExtended method and friends.- Throws:
org.opentrafficsim.core.geometry.OtsGeometryException- should not happen; this test has failed if it does happen
-
locationTest
@Test public final void locationTest() throws org.opentrafficsim.core.geometry.OtsGeometryExceptionTest getLocation method.- Throws:
org.opentrafficsim.core.geometry.OtsGeometryException- on failure
-
cleanTest
@Test public final void cleanTest() throws org.opentrafficsim.core.geometry.OtsGeometryExceptionTest the createAndCleanOtsLine2d method.- Throws:
org.opentrafficsim.core.geometry.OtsGeometryException- should never happen
-
equalsTest
@Test public final void equalsTest() throws org.opentrafficsim.core.geometry.OtsGeometryExceptionTest the equals method.- Throws:
org.opentrafficsim.core.geometry.OtsGeometryException- should not happen; this test has failed if it does happen
-
concatenateTest
@Test public final void concatenateTest() throws org.opentrafficsim.core.geometry.OtsGeometryExceptionTest the concatenate method.- Throws:
org.opentrafficsim.core.geometry.OtsGeometryException- should not happen; this test has failed if it does happen
-
noiseFilterRamerDouglasPeuckerTest
@Test public final void noiseFilterRamerDouglasPeuckerTest() throws org.opentrafficsim.core.geometry.OtsGeometryExceptionTest the noiseFilterRamerDouglasPeuker filter method.- Throws:
org.opentrafficsim.core.geometry.OtsGeometryException- if that happens uncaught, this test has failed
-
reverseTest
@Test public final void reverseTest() throws org.opentrafficsim.core.geometry.OtsGeometryExceptionTest the reverse method.- Throws:
org.opentrafficsim.core.geometry.OtsGeometryException- should not happen; this test has failed if it does happen
-
extractTest
@Test public final void extractTest() throws org.opentrafficsim.core.geometry.OtsGeometryExceptionTest the extract and extractFraction methods.- Throws:
org.opentrafficsim.core.geometry.OtsGeometryException- should not happen; this test has failed if it does happen
-
offsetLineTest
@Test public final void offsetLineTest() throws org.opentrafficsim.core.geometry.OtsGeometryExceptionTest the offsetLine method. Only tests a few easy cases.- Throws:
org.opentrafficsim.core.geometry.OtsGeometryException- should not happen (if it does; this test has failed)
-
testFractionalProjection
@Test public final void testFractionalProjection() throws org.opentrafficsim.core.geometry.OtsGeometryExceptionTests the fractional projection method.- Throws:
org.opentrafficsim.core.geometry.OtsGeometryException- should not happen (if it does, this test has failed)
-
testFind
@Test public final void testFind() throws org.opentrafficsim.core.geometry.OtsGeometryException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetExceptionTest the find method.- Throws:
org.opentrafficsim.core.geometry.OtsGeometryException- if that happens uncaught; this test has failedSecurityException- if that happens uncaught; this test has failedNoSuchMethodException- if that happens uncaught; this test has failedInvocationTargetException- if that happens uncaught; this test has failedIllegalArgumentException- if that happens uncaught; this test has failedIllegalAccessException- if that happens uncaught; this test has failed
-
testTruncate
@Test public final void testTruncate() throws org.opentrafficsim.core.geometry.OtsGeometryExceptionTest the truncate method.- Throws:
org.opentrafficsim.core.geometry.OtsGeometryException- if that happens uncaught; this test has failed
-
testRadius
@Test public void testRadius() throws org.opentrafficsim.core.geometry.OtsGeometryExceptionTest the getRadius method.- Throws:
org.opentrafficsim.core.geometry.OtsGeometryException- when that happens uncaught; this test has failed
-