Package org.djutils.draw.line
Class LineSegment3dTest
- java.lang.Object
-
- org.djutils.draw.line.LineSegment3dTest
-
public class LineSegment3dTest extends Object
Segment3dTest.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 LineSegment3dTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closestPointOnSegmentTest()
Test the closestPointOnSegment method.void
constructorTest()
Test the constructors.void
equalsAndHashCodeTest()
Test the equals and hasCode methods.void
locationTest()
Test the getLocation methods.void
testProject()
Test the project methods.void
testReverse()
Test the reverse operation.void
testToExcel()
Test the toExcel method.void
verifySegment(String description, LineSegment3d segment, double expectedStartX, double expectedStartY, double expectedStartZ, double expectedEndX, double expectedEndY, double expectedEndZ)
Check that a segment has all the right values.
-
-
-
Method Detail
-
constructorTest
public void constructorTest()
Test the constructors.
-
verifySegment
public void verifySegment(String description, LineSegment3d segment, double expectedStartX, double expectedStartY, double expectedStartZ, double expectedEndX, double expectedEndY, double expectedEndZ)
Check that a segment has all the right values.- Parameters:
description
- String; description of the testsegment
- Segment3d; the segmentexpectedStartX
- double; the expected x value for the start of the segmentexpectedStartY
- double; the expected y value for the start of the segmentexpectedStartZ
- double; the expected z value for the start of the segmentexpectedEndX
- double; the expected x value for the end of the segmentexpectedEndY
- double; the expected y value for the end of the segmentexpectedEndZ
- double; the expected y value for the end of the segment
-
locationTest
public void locationTest()
Test the getLocation methods.
-
closestPointOnSegmentTest
public void closestPointOnSegmentTest()
Test the closestPointOnSegment method.
-
testReverse
public void testReverse()
Test the reverse operation.
-
testProject
public void testProject()
Test the project methods.
-
testToExcel
public void testToExcel() throws NumberFormatException
Test the toExcel method.- Throws:
NumberFormatException
- if that happens, this test has failed
-
equalsAndHashCodeTest
public void equalsAndHashCodeTest()
Test the equals and hasCode methods.
-
-