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 void
concatenateTest()
Test the concatenate method.void
constructorsTest()
Test the constructors of PolyLine3d.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
filterTest()
Test the filtering constructors.void
locationExtendedTest()
Test the getLocationExtended method and friends.static String
marker(double x, double y)
Draw a X marker.void
printPath2D(Path2D path)
Print a Path2D to the console.void
reverseAndProjectTest()
Test the reverse and project methods.void
testConstructors()
Test all constructors of a Line2d.void
testDegenerate()
Test the degenerate PolyLine3d.void
testExports()
Test the debugging output methods.void
testFind()
Test the find method.void
testOtherMethods()
Test other methods of PolyLine3d.void
testOTS2Problem()
Problem with limited precision when getting location almost at end.void
testProjectProblem()
Test for a problem that occurred in OTS2.void
testToStringHashCodeAndEquals()
Test the hashCode and Equals methods.void
testTransitionLine()
Test the transitionLine method.void
testTruncate()
Test the truncate method.
-
-
-
Method Detail
-
constructorsTest
public final void constructorsTest() throws DrawRuntimeException
Test 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, DrawRuntimeException
Test 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 DrawRuntimeException
Test 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 DrawRuntimeException
Test the getLocationExtended method and friends.- Throws:
DrawRuntimeException
- should not happen; this test has failed if it does happen
-
filterTest
public final void filterTest() throws DrawRuntimeException
Test the filtering constructors.- Throws:
DrawRuntimeException
- should never happen
-
equalsTest
public final void equalsTest() throws DrawRuntimeException
Test the equals method.- Throws:
DrawRuntimeException
- should not happen; this test has failed if it does happen
-
concatenateTest
public final void concatenateTest() throws DrawRuntimeException
Test the concatenate method.- Throws:
DrawRuntimeException
- should not happen; this test has failed if it does happen
-
reverseAndProjectTest
public final void reverseAndProjectTest() throws DrawRuntimeException
Test the reverse and project methods.- Throws:
DrawRuntimeException
- should not happen; this test has failed if it does happen
-
extractTest
public final void extractTest() throws DrawRuntimeException
Test the extract and extractFraction methods.- Throws:
DrawRuntimeException
- should not happen; this test has failed if it does happen
-
testOtherMethods
public final void testOtherMethods() throws DrawRuntimeException
Test 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, InvocationTargetException
Test 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 DrawRuntimeException
Test 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, DrawRuntimeException
Test 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 DrawRuntimeException
Test 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 DrawRuntimeException
Problem with limited precision when getting location almost at end.- Throws:
DrawRuntimeException
- when that happens this test has triggered the problem
-
-