Package com.tomtom.ivi.platform.tools.api.testing.unit
Types
Base class for unit tests that depend on the TomTom Digital Cockpit platform.
TestRule to work around mockk problem that causes intermittent failures of tests with mocked lambdas.
Properties
Functions
Moves the Dispatcher's virtual clock forward by delayTimeMillis. The amount the clock is progressed may be larger than the requested delayTimeMillis if the code under test uses blocking coroutines. The virtual clock time will advance once for each delay resumed until the next delay exceeds the requested delayTimeMills.
Advances the testScheduler by delayTimeMillis and runs the tasks up to that moment (inclusive).
Immediately execute all pending tasks and advance the virtual clock-time to the last delay. If new tasks are scheduled due to advancing virtual time, they will be executed beforek advanceUntilIdle returns. Returns the amount of delay-time that this Dispatcher's clock has been forwarded in milliseconds.
Advances the testScheduler to the point where there are no tasks remaining.
Short hand to answer an IVI service function with a successful result code and return value.
Short hand to answer an IVI service function with a failure result code and optional exception.
Calculates a cartesian product of parameters for ParameterizedRobolectricTestRunner.
Pause the dispatcher. When paused, the dispatcher will not execute any coroutines automatically, and you must call runCurrentDeprecated or advanceTimeByDeprecated, or advanceUntilIdleDeprecated to execute coroutines.
Resume the dispatcher from a paused state. Resumed dispatchers will automatically progress through all coroutines scheduled at the current time. To advance time and execute coroutines scheduled in the future use, one of advanceTimeByDeprecated, or advanceUntilIdleDeprecated.
Convenience method for calling runBlockingTest on an existing TestCoroutineDispatcher.
Executes a testBody inside an immediate execution dispatcher. If context contains CoroutineDispatcher or CoroutineExceptionHandler, then they must implement DelayController and TestCoroutineExceptionHandler respectively. This is similar to runBlocking but it will immediately progress past delays and into launch and async blocks. You can use this to write tests that execute in the presence of calls to delay without causing your test to take extra time.
Runs the tasks that are scheduled to execute at this moment of virtual time.
Run any tasks that are pending at the current virtual time, according to the testScheduler.