TestCarContext

public class TestCarContext
extends CarContext

java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ androidx.car.app.CarContext
         ↳ androidx.car.app.testing.TestCarContext


The CarContext that is used for testing.

This class will return the test version of car services for tracking calls during testing.

It also allows retrieving the car services already cast to the testing class by calling getCarService(Class) with the class name of the test services:

testCarContext.getCarService(TestAppManager.class)
testCarContext.getCarService(TestNavigationManager.class)
testCarContext.getCarService(TestScreenManager.class)

Allows retrieving all Intents sent via CarContext.startCarApp(Intent).

Summary

Nested classes

class TestCarContext.PermissionRequestInfo

A representation of a permission request including the permissions that were requested as well as the callback provided. 

Inherited constants