TestNavigationManager
public
class
TestNavigationManager
extends NavigationManager
java.lang.Object | ||
↳ | com.google.android.libraries.car.app.navigation.NavigationManager | |
↳ | com.google.android.libraries.car.app.testing.navigation.TestNavigationManager |
The NavigationManager
that is used for testing.
This class will track the following usages of the NavigationManager
throughout your
test:
- All the
Trip
s sent viaNavigationManager.updateTrip(Trip)
. - All the
NavigationManagerListener
s set viaNavigationManager.setListener(NavigationManagerListener)
. - Count of times that the navigation was started via
NavigationManager.navigationStarted()
. - Count of times that the navigation was ended via
NavigationManager.navigationEnded()
.
Summary
Public methods | |
---|---|
int
|
getNavigationEndedCount()
Retrieves the number of times that navigation was ended via |
List<NavigationManagerListener>
|
getNavigationManagerListenersSet()
Retrieves all the |
int
|
getNavigationStartedCount()
Retrieves the number of times that navigation was started via |
List<TripController>
|
getTripsSent()
Retrieves all the |
void
|
reset()
Resets the values tracked by this |
Inherited methods | |
---|---|
Public methods
getNavigationEndedCount
public int getNavigationEndedCount ()
Retrieves the number of times that navigation was ended via NavigationManager.navigationEnded()
since the creation or the last call to reset()
.
Returns | |
---|---|
int |
getNavigationManagerListenersSet
public List<NavigationManagerListener> getNavigationManagerListenersSet ()
Retrieves all the NavigationManagerListener
s added via NavigationManager.setListener(NavigationManagerListener)
.
The listeners are stored in order of calls.
The listeners will be stored until reset()
is called.
Returns | |
---|---|
List<NavigationManagerListener> |
getNavigationStartedCount
public int getNavigationStartedCount ()
Retrieves the number of times that navigation was started via NavigationManager.navigationStarted()
since the creation or the last call to reset()
.
Returns | |
---|---|
int |
getTripsSent
public List<TripController> getTripsSent ()
Retrieves all the Trip
s sent via NavigationManager.updateTrip(Trip)
.
The trips are stored in order of calls.
The trips will be stored until reset()
is called.
Returns | |
---|---|
List<TripController> |