Package org.djutils.draw.line
Class PolyLine3dTest
- java.lang.Object
-
- org.djutils.draw.line.PolyLine3dTest
-
public class PolyLine3dTest extends Object
TestLine3d.java.Copyright (c) 2020-2023 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUTILS License.- Author:
- Alexander Verbraeck, Peter Knoppers
-
-
Constructor Summary
Constructors Constructor Description PolyLine3dTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconcatenateTest()Test the concatenate method.voidconstructorsTest()Test the constructors of PolyLine3d.voidequalsTest()Test the equals method.voidexceptionTest()Test that exception is thrown when it should be.voidextractTest()Test the extract and extractFraction methods.voidfilterTest()Test the filtering constructors.voidlocationExtendedTest()Test the getLocationExtended method and friends.static Stringmarker(double x, double y)Draw a X marker.voidprintPath2D(Path2D path)Print a Path2D to the console.voidreverseAndProjectTest()Test the reverse and project methods.voidtestConstructors()Test all constructors of a Line2d.voidtestDegenerate()Test the degenerate PolyLine3d.voidtestExports()Test the debugging output methods.voidtestFind()Test the find method.voidtestOtherMethods()Test other methods of PolyLine3d.voidtestOTS2Problem()Problem with limited precision when getting location almost at end.voidtestProjectProblem()Test for a problem that occurred in OTS2.voidtestToStringHashCodeAndEquals()Test the hashCode and Equals methods.voidtestTransitionLine()Test the transitionLine method.voidtestTruncate()Test the truncate method.
-
-
-
Method Detail
-
constructorsTest
public final void constructorsTest() throws DrawRuntimeExceptionTest the constructors of PolyLine3d.- Throws:
DrawRuntimeException- on failure
-
printPath2D
public final void printPath2D(Path2D path)
Print a Path2D to the console.- Parameters:
path- Path2D; the path
-
testConstructors
public void testConstructors() throws DrawRuntimeException, DrawRuntimeExceptionTest all constructors of a Line2d.- Throws:
DrawRuntimeException- if that happens uncaught; this test has failedDrawRuntimeException- if that happens uncaught; this test has failed
-
exceptionTest
public final void exceptionTest() throws DrawRuntimeExceptionTest that exception is thrown when it should be.- Throws:
DrawRuntimeException- should not happen; this test has failed if it does happen
-
locationExtendedTest
public final void locationExtendedTest() throws DrawRuntimeExceptionTest the getLocationExtended method and friends.- Throws:
DrawRuntimeException- should not happen; this test has failed if it does happen
-
filterTest
public final void filterTest() throws DrawRuntimeExceptionTest the filtering constructors.- Throws:
DrawRuntimeException- should never happen
-
equalsTest
public final void equalsTest() throws DrawRuntimeExceptionTest the equals method.- Throws:
DrawRuntimeException- should not happen; this test has failed if it does happen
-
concatenateTest
public final void concatenateTest() throws DrawRuntimeExceptionTest the concatenate method.- Throws:
DrawRuntimeException- should not happen; this test has failed if it does happen
-
reverseAndProjectTest
public final void reverseAndProjectTest() throws DrawRuntimeExceptionTest the reverse and project methods.- Throws:
DrawRuntimeException- should not happen; this test has failed if it does happen
-
extractTest
public final void extractTest() throws DrawRuntimeExceptionTest the extract and extractFraction methods.- Throws:
DrawRuntimeException- should not happen; this test has failed if it does happen
-
testOtherMethods
public final void testOtherMethods() throws DrawRuntimeExceptionTest other methods of PolyLine3d.- Throws:
DrawRuntimeException- should not happen (if it does, this test has failed)
-
testFind
public final void testFind() throws DrawRuntimeException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetExceptionTest the find method.- Throws:
DrawRuntimeException- 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 DrawRuntimeExceptionTest the truncate method.- Throws:
DrawRuntimeException- if that happens uncaught; this test has failed
-
testExports
public void testExports()
Test the debugging output methods.
-
testToStringHashCodeAndEquals
public void testToStringHashCodeAndEquals() throws NullPointerException, DrawRuntimeExceptionTest the hashCode and Equals methods.- Throws:
DrawRuntimeException- when that happens uncaught; this test has failedNullPointerException- when that happens uncaught; this test has failed
-
testProjectProblem
public void testProjectProblem() throws DrawRuntimeExceptionTest for a problem that occurred in OTS2.- Throws:
DrawRuntimeException- when that happens, this test has failed
-
testTransitionLine
public void testTransitionLine()
Test the transitionLine method.
-
testDegenerate
public void testDegenerate()
Test the degenerate PolyLine3d.
-
marker
public static String marker(double x, double y)
Draw a X marker.- Parameters:
x- double; x locationy- double; y location- Returns:
- String
-
testOTS2Problem
public void testOTS2Problem() throws DrawRuntimeExceptionProblem with limited precision when getting location almost at end.- Throws:
DrawRuntimeException- when that happens this test has triggered the problem
-
-