Package org.djutils.draw.line
Class LineSegment2dTest
java.lang.Object
org.djutils.draw.line.LineSegment2dTest
Segment2dTest.java.
Copyright (c) 2020-2024 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Test the closestPointOnSegment method.void
Test the constructors.void
Test the equals and hasCode methods.void
Test the getLocation methods.void
Test the toExcel method.void
Test the project methods.void
Test the reverse operation.void
verifySegment
(String description, LineSegment2d segment, double expectedStartX, double expectedStartY, double expectedEndX, double expectedEndY) Check that a segment has all the right values.
-
Constructor Details
-
LineSegment2dTest
public LineSegment2dTest()
-
-
Method Details
-
constructorTest
@Test public void constructorTest()Test the constructors. -
verifySegment
public void verifySegment(String description, LineSegment2d segment, double expectedStartX, double expectedStartY, double expectedEndX, double expectedEndY) Check that a segment has all the right values.- Parameters:
description
- String; description of the testsegment
- Segment2d; the segmentexpectedStartX
- double; the expected x value for the start of the segmentexpectedStartY
- double; the expected y 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 segment
-
locationTest
@Test public void locationTest()Test the getLocation methods. -
closestPointOnSegmentTest
@Test public void closestPointOnSegmentTest()Test the closestPointOnSegment method. -
testReverse
@Test public void testReverse()Test the reverse operation. -
testProject
@Test public void testProject()Test the project methods. -
testExports
Test the toExcel method.- Throws:
NumberFormatException
- if that happens, this test has failed
-
equalsAndHashCodeTest
@Test public void equalsAndHashCodeTest()Test the equals and hasCode methods.
-