SessionController

public class SessionController
extends Object

java.lang.Object
   ↳ androidx.car.app.testing.SessionController


SessionController provides API that allows testing of a Session.

This controller allows:

  • Injecting a TestCarContext into the Session instance, which provides access to the test managers and other testing functionalities.

Summary

Public constructors

SessionController(Session session, TestCarContext context, Intent intent)

Creates a SessionController to control the provided Session.

Public methods

Session getSession()

Returns the Session that is being controlled.

SessionController moveToState(Lifecycle.State state)

Moves the Session being controlled to the input state.

Inherited methods

Public constructors

SessionController

public SessionController (Session session, 
                TestCarContext context, 
                Intent intent)

Creates a SessionController to control the provided Session.