public class RedTestContext.TimingValidator extends Object
RedTestContext
May be used to validate expected periods of time to pass or not pass,
from the moment of it's creation.
see RedTestContext.timingValidator()| Modifier and Type | Class and Description |
|---|---|
class |
RedTestContext.TimingValidator.NotPassedException
An exception thrown in case a
RedTestContext.TimingValidator passed validation has failed |
class |
RedTestContext.TimingValidator.PassedException
An exception thrown in case a
RedTestContext.TimingValidator not passed validation has failed |
| Modifier and Type | Method and Description |
|---|---|
void |
validateNotPassed(long timeMillis)
Validates whether or not the given period of time in milliseconds
has not passed since the creation of the
RedTestContext.TimingValidator instance. |
void |
validateNotPassed(long time,
TimeUnit unit)
Validates whether or not the given period of time has not passed
since the creation of the
RedTestContext.TimingValidator instance. |
void |
validatePassed(long timeMillis)
Validates whether or not the given period of time in milliseconds
has passed since the creation of the
RedTestContext.TimingValidator instance. |
void |
validatePassed(long time,
TimeUnit unit)
Validates whether or not the given period of time has passed since
the creation of the
RedTestContext.TimingValidator instance. |
public void validatePassed(long time,
TimeUnit unit)
RedTestContext.TimingValidator instance.
If the time has not passed, the test will automatically fail with
RedTestContext.TimingValidator.NotPassedExceptiontime - period of time expected to have passedunit - time unit to usepublic void validatePassed(long timeMillis)
RedTestContext.TimingValidator instance.
If the time has not passed, the test will automatically fail with
RedTestContext.TimingValidator.NotPassedExceptiontimeMillis - milliseconds expected to have passedpublic void validateNotPassed(long time,
TimeUnit unit)
RedTestContext.TimingValidator instance.
If the time has not passed, the test will automatically fail with
RedTestContext.TimingValidator.PassedExceptiontime - period of time expected to not have passedunit - time unit to usepublic void validateNotPassed(long timeMillis)
RedTestContext.TimingValidator instance.
If the time has not passed, the test will automatically fail with
RedTestContext.TimingValidator.PassedExceptiontimeMillis - milliseconds expected to not have passedCopyright © 2017. All rights reserved.