TimeFixture
allows you to control when callbacks passed to window.setTimeout() and window.setInterval() are executed.TimeFixture
:
given("time.timeMode = 'NextStep'")
and(...)
// All timed events fired for the 'and' step above
and(...)
// All timed events fired for the 'and' step above
when(...)
// All timed events set up in the "when" step are fired
then(...)
given("time.timeMode = 'Manual'")
and(...)
when(...)
and("time.passedBy => 2000")
// timed events from the 'given' and 'when' steps set to execute 2 seconds in the future are fired
then(...)
Attributes | Name and Description |
---|---|
|
caplin.testing.fixture.TimeFixture( oTimeUtility)
|
Attributes | Name and Description |
---|---|
|
void
doGiven(String sPropertyName, Variant vValue)
|
|
void
doThen(String sPropertyName, Variant vValue)
TimeFixture does not support doThen. |
|
void
doWhen(String sPropertyName, Variant vValue)
|
►
caplin.testing.fixture.TimeFixture( oTimeUtility)
oTimeUtility |
►
void
doGiven(String sPropertyName, Variant vValue)
String | sPropertyName | The property name (e.g. 'time.timeMode' or 'time.passedBy') |
Variant | vValue | The value to set |
►
void
doThen(String sPropertyName, Variant vValue)
TimeFixture does not support doThen.
String | sPropertyName | The property name |
Variant | vValue | The value to set |
►
void
doWhen(String sPropertyName, Variant vValue)
String | sPropertyName | The property name (e.g. 'time.timeMode' or 'time.passedBy') |
Variant | vValue | The value to set |