SessionController
class SessionController
SessionController provides API that allows testing of a Session.
This controller allows:
- Injecting a
TestCarContextinto theSessioninstance, which provides access to the test managers and other testing functionalities.
Summary
Public constructors |
|---|
SessionController(Creates a |
Public functions |
|
|---|---|
Session |
Returns the |
SessionController |
moveToState(state: Lifecycle.State)Moves the |
Public constructors
SessionController
SessionController(
session: Session,
context: TestCarContext,
intent: Intent
)
Creates a SessionController to control the provided Session.
| Parameters | |
|---|---|
session: Session |
the |
context: TestCarContext |
the |
intent: Intent |
the |
| Throws | |
|---|---|
java.lang.NullPointerException |
if |
Public functions
moveToState
fun moveToState(state: Lifecycle.State): SessionController
Moves the Session being controlled to the input state.
Note that DESTROYED is a terminal state, and you cannot move to any other state after the Session reaches that state.
| See also | |
|---|---|
getLifecycle |