public class TestFixedTimeController extends Object
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
TestFixedTimeController() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkState(OTSSimulatorInterface simulator,
FixedTimeController ftc,
boolean stopSimulatorOnError)
Check that the current state of a fixed time traffic light controller matches the design.
|
OTSModelInterface |
createModelMock()
Create a mocked OTSModelInterface.
|
TrafficLight |
createTrafficLightMock(String id,
String networkId,
OTSSimulatorInterface simulator)
Mock a traffic light.
|
void |
testConstructors()
Test the constructors and initializers of the signal group and fixed time controller classes.
|
void |
testDisjoint()
Test detection of non-disjoint sets of traffic lights.
|
void |
testTimings()
Test timing of fixed time controller.
|
public void testConstructors()
throws SimRuntimeException,
NamingException,
NetworkException
SimRuntimeException - if that happens uncaught; this test has failedNamingException - if that happens uncaught; this test has failedNetworkExceptionpublic void testDisjoint()
throws SimRuntimeException,
NamingException,
NetworkException
public void testTimings()
throws SimRuntimeException,
NamingException,
NetworkException
SimRuntimeException - if that happens uncaught; this test has failedNamingException - if that happens uncaught; this test has failedNetworkExceptionpublic void checkState(OTSSimulatorInterface simulator, FixedTimeController ftc, boolean stopSimulatorOnError)
simulator - OTSSimulatorInterface; the simulatorftc - FixedTimeController; the fixed time traffic light controllerstopSimulatorOnError - boolean; if true; stop the simulator on error; if false; execute the failing assert on errorpublic OTSModelInterface createModelMock()
public TrafficLight createTrafficLightMock(String id, String networkId, OTSSimulatorInterface simulator)
id - String; value that will be returned by the getId methodnetworkId - String; name of network (prepended to id for result of getFullId method)simulator - TODOCopyright © 2014–2019 Delft University of Technology. All rights reserved.