Package org.opentrafficsim.base.geometry
Class OtsLine2dTest
java.lang.Object
org.opentrafficsim.base.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
-
Method Summary
Modifier and TypeMethodDescriptionvoidTest the createAndCleanOtsLine2d method.voidTest the concatenate method.voidTest the constructors of OtsLine2d.voidTest the equals method.voidTest that exception is thrown when it should be.voidTest the extract and extractFraction methods.voidTest the getLocationExtended method and friends.voidTest getLocation method.voidTest the offsetLine method.voidprintPath2D(Path2D path) Print a Path2D to the console.voidTest the reverse method.voidtestFind()Test the find method.voidTests the fractional projection method.voidTest the getRadius method.voidTest the truncate method.
-
Method Details
-
constructorsTest
Test the constructors of OtsLine2d. -
printPath2D
Print a Path2D to the console.- Parameters:
path- the path
-
exceptionTest
Test that exception is thrown when it should be. -
locationExtendedTest
Test the getLocationExtended method and friends. -
locationTest
Test getLocation method. -
cleanTest
Test the createAndCleanOtsLine2d method. -
equalsTest
Test the equals method. -
concatenateTest
Test the concatenate method. -
reverseTest
Test the reverse method. -
extractTest
Test the extract and extractFraction methods. -
offsetLineTest
Test the offsetLine method. Only tests a few easy cases. -
testFractionalProjection
Tests the fractional projection method. -
testFind
@Test public void testFind() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetExceptionTest the find method.- Throws:
SecurityException- 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 the truncate method. -
testRadius
Test the getRadius method.
-