Package org.opentrafficsim.core.geometry
Class OTSLine3DTest
- java.lang.Object
-
- org.opentrafficsim.core.geometry.OTSLine3DTest
-
public class OTSLine3DTest extends 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
All Methods Instance Methods Concrete Methods 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(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
testRadius()
Test the getRadius method.void
testTruncate()
Test the truncate method.
-
-
-
Method Detail
-
constructorsTest
public final void constructorsTest() throws OTSGeometryException, NetworkException
Test the constructors of OTSLine3D.- Throws:
OTSGeometryException
- on failureNetworkException
- on failure
-
printPath2D
public final void printPath2D(Path2D path)
Print a Path2D to the console.- Parameters:
path
- Path2D; the path
-
exceptionTest
public final void exceptionTest() throws OTSGeometryException
Test that exception is thrown when it should be.- Throws:
OTSGeometryException
- should not happen; this test has failed if it does happen
-
locationExtendedTest
public final void locationExtendedTest() throws OTSGeometryException
Test the getLocationExtended method and friends.- Throws:
OTSGeometryException
- should not happen; this test has failed if it does happen
-
locationTest
public final void locationTest() throws OTSGeometryException
Test getLocation method.- Throws:
OTSGeometryException
- on failure
-
cleanTest
public final void cleanTest() throws OTSGeometryException
Test the createAndCleanOTSLine3D method.- Throws:
OTSGeometryException
- should never happen
-
equalsTest
public final void equalsTest() throws OTSGeometryException
Test the equals method.- Throws:
OTSGeometryException
- should not happen; this test has failed if it does happen
-
concatenateTest
public final void concatenateTest() throws OTSGeometryException
Test the concatenate method.- Throws:
OTSGeometryException
- should not happen; this test has failed if it does happen
-
noiseFilterRamerDouglasPeuckerTest
public final void noiseFilterRamerDouglasPeuckerTest() throws OTSGeometryException
Test the noiseFilterRamerDouglasPeuker filter method.- Throws:
OTSGeometryException
- if that happens uncaught, this test has failed
-
reverseTest
public final void reverseTest() throws OTSGeometryException
Test the reverse method.- Throws:
OTSGeometryException
- should not happen; this test has failed if it does happen
-
extractTest
public final void extractTest() throws OTSGeometryException
Test the extract and extractFraction methods.- Throws:
OTSGeometryException
- should not happen; this test has failed if it does happen
-
offsetLineTest
public final void offsetLineTest() throws OTSGeometryException
Test the offsetLine method. Only tests a few easy cases.- Throws:
OTSGeometryException
- should not happen (if it does; this test has failed)
-
testFilter
public final void testFilter() throws OTSGeometryException
Test the noiseFilteredLine method.- Throws:
OTSGeometryException
- should not happen (if it does, this test has failed)
-
testFractionalProjection
public final void testFractionalProjection() throws OTSGeometryException
Tests the fractional projection method.- Throws:
OTSGeometryException
- should not happen (if it does, this test has failed)
-
testFind
public final void testFind() throws OTSGeometryException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException
Test the find method.- Throws:
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
public final void testTruncate() throws OTSGeometryException
Test the truncate method.- Throws:
OTSGeometryException
- if that happens uncaught; this test has failed
-
testRadius
public void testRadius() throws OTSGeometryException
Test the getRadius method.- Throws:
OTSGeometryException
- when that happens uncaught; this test has failed
-
-