Package org.opentrafficsim.core.geometry
Class OTSLine3DTest
java.lang.Object
org.opentrafficsim.core.geometry.OTSLine3DTest
public class OTSLine3DTest
extends java.lang.Object
Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 2 okt. 2015
- Author:
- Peter Knoppers
-
Constructor Summary
Constructors Constructor Description OTSLine3DTest() -
Method Summary
Modifier and Type Method Description voidcleanTest()Test the createAndCleanOTSLine3D method.voidconcatenateTest()Test the concatenate method.voidconstructorsTest()Test the constructors of OTSLine3D.voidequalsTest()Test the equals method.voidexceptionTest()Test that exception is thrown when it should be.voidextractTest()Test the extract and extractFraction methods.voidlocationExtendedTest()Test the getLocationExtended method and friends.voidlocationTest()Test getLocation method.voidnoiseFilterRamerDouglasPeuckerTest()Test the noiseFilterRamerDouglasPeuker filter method.voidoffsetLineTest()Test the offsetLine method.voidprintPath2D(java.awt.geom.Path2D path)Print a Path2D to the console.voidreverseTest()Test the reverse method.voidtestFilter()Test the noiseFilteredLine method.voidtestFind()Test the find method.voidtestFractionalProjection()Tests the fractional projection method.voidtestTruncate()Test the truncate method.
-
Constructor Details
-
OTSLine3DTest
public OTSLine3DTest()
-
-
Method Details
-
constructorsTest
public final void constructorsTest() throws org.opentrafficsim.core.geometry.OTSGeometryException, org.opentrafficsim.core.network.NetworkExceptionTest the constructors of OTSLine3D.- Throws:
org.opentrafficsim.core.geometry.OTSGeometryException- on failureorg.opentrafficsim.core.network.NetworkException- on failure
-
printPath2D
public final void printPath2D(java.awt.geom.Path2D path)Print a Path2D to the console.- Parameters:
path- Path2D; the path
-
exceptionTest
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
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
public final void locationTest() throws org.opentrafficsim.core.geometry.OTSGeometryExceptionTest getLocation method.- Throws:
org.opentrafficsim.core.geometry.OTSGeometryException- on failure
-
cleanTest
public final void cleanTest() throws org.opentrafficsim.core.geometry.OTSGeometryExceptionTest the createAndCleanOTSLine3D method.- Throws:
org.opentrafficsim.core.geometry.OTSGeometryException- should never happen
-
equalsTest
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
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
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
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
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
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)
-
testFilter
public final void testFilter() throws org.opentrafficsim.core.geometry.OTSGeometryExceptionTest the noiseFilteredLine method.- Throws:
org.opentrafficsim.core.geometry.OTSGeometryException- should not happen (if it does, this test has failed)
-
testFractionalProjection
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
public final void testFind() throws org.opentrafficsim.core.geometry.OTSGeometryException, java.lang.NoSuchMethodException, java.lang.SecurityException, java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetExceptionTest the find method.- Throws:
org.opentrafficsim.core.geometry.OTSGeometryException- if that happens uncaught; this test has failedjava.lang.SecurityException- if that happens uncaught; this test has failedjava.lang.NoSuchMethodException- if that happens uncaught; this test has failedjava.lang.reflect.InvocationTargetException- if that happens uncaught; this test has failedjava.lang.IllegalArgumentException- if that happens uncaught; this test has failedjava.lang.IllegalAccessException- if that happens uncaught; this test has failed
-
testTruncate
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
-