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-2019 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 void
cleanTest()
Test the createAndCleanOTSLine3D method.void
concatenateTest()
Test the concatenate method.void
constructorsTest()
Test the constructors of OTSLine3D.void
equalsTest()
Test the equals method.void
exceptionTest()
Test that exception is thrown when it should be.void
extractTest()
Test the extract and extractFraction methods.void
locationExtendedTest()
Test the getLocationExtended method and friends.void
locationTest()
Test getLocation method.void
noiseFilterRamerDouglasPeuckerTest()
Test the noiseFilterRamerDouglasPeuker filter method.void
offsetLineTest()
Test the offsetLine method.void
printPath2D(java.awt.geom.Path2D path)
Print a Path2D to the console.void
reverseTest()
Test the reverse method.void
testFilter()
Test the noiseFilteredLine method.void
testFind()
Test the find method.void
testFractionalProjection()
Tests the fractional projection method.void
testTruncate()
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
-