Class LaneTest

  • All Implemented Interfaces:
    UNITS

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

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

    $LastChangedDate: 2015-09-16 19:20:07 +0200 (Wed, 16 Sep 2015) $, @version $Revision: 1405 $, by $Author: averbraeck $, initial version 21 jan. 2015

    Author:
    Peter Knoppers
    • Constructor Detail

      • LaneTest

        public LaneTest()
    • Method Detail

      • 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
      • 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)