Class LaneTest

java.lang.Object
org.opentrafficsim.road.network.lane.LaneTest
All Implemented Interfaces:
UNITS

public class LaneTest extends Object implements UNITS
Test the Lane class.

Copyright (c) 2013-2023 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Peter Knoppers
  • Constructor Details

    • LaneTest

      public LaneTest()
  • Method Details

    • laneConstructorTest

      public void laneConstructorTest() throws Exception
      Test the constructor.
      Throws:
      Exception - when something goes wrong (should not happen)
    • sensorTest

      public final void sensorTest(Lane lane) throws NetworkException
      Add/Remove some sensor to/from a lane and see if the expected events occur.
      Parameters:
      lane - Lane; the lane to manipulate
      Throws:
      NetworkException - when this happens uncaught; this test has failed
    • lateralOffsetTest

      public final void lateralOffsetTest() throws NetworkException, SimRuntimeException, NamingException, OtsGeometryException
      Test that gradually varying lateral offsets have gradually increasing angles (with respect to the design line) in the first half and gradually decreasing angles in the second half.
      Throws:
      NetworkException - when that happens uncaught; this test has failed
      NamingException - when that happens uncaught; this test has failed
      SimRuntimeException - when that happens uncaught; this test has failed
      OtsGeometryException - when that happens uncaught; this test has failed
    • contourTest

      public final void contourTest() throws Exception
      Test that the contour of a constructed lane covers the expected area. Tests are only performed for straight lanes, but the orientation of the link and the offset of the lane from the link is varied in many ways.
      Throws:
      Exception - when something goes wrong (should not happen)