RoutePreviewNavigationTemplateController

public class RoutePreviewNavigationTemplateController
extends Object

java.lang.Object
   ↳ com.google.android.libraries.car.app.testing.navigation.model.RoutePreviewNavigationTemplateController


A controller that allows testing of a RoutePreviewNavigationTemplate.

This controller allows:

Summary

Public methods

RoutePreviewNavigationTemplate get()

Retrieves the RoutePreviewNavigationTemplate that this controller is controlling.

ActionStripController getActionStrip()

Returns an ActionStripController that contains the ActionStrip in the RoutePreviewNavigationTemplate that is being controlled, or null if one is not present.

ActionController getHeaderAction()

Retrieves a ActionController for the header Action that is being controlled, or null if none is present.

ItemListController getItemList()

Returns an ItemListController that contains the ItemList in the RoutePreviewNavigationTemplate that is being controlled.

ActionController getNavigateAction()

Returns an ActionController that contains the navigate action in the RoutePreviewNavigationTemplateController being controlled, or null if one is not present.

RowController getRowByTitle(String title)

Returns a RowController that contains the first Row in the ItemList, which has the given title as its title, or null if one is not present.

String getTitle()

Retrieves the title set in the RoutePreviewNavigationTemplate that is being controlled, or null if none is present.

boolean isLoading()

Returns true if the template is set to be loading.

static RoutePreviewNavigationTemplateController of(RoutePreviewNavigationTemplate routePreviewNavigationTemplate)

Creates a RoutePreviewNavigationTemplateController to control an RoutePreviewNavigationTemplate for testing.

Inherited methods

Public methods

get

public RoutePreviewNavigationTemplate get ()

Retrieves the RoutePreviewNavigationTemplate that this controller is controlling.

Returns
RoutePreviewNavigationTemplate

getActionStrip

public ActionStripController getActionStrip ()

Returns an ActionStripController that contains the ActionStrip in the RoutePreviewNavigationTemplate that is being controlled, or null if one is not present.

Returns
ActionStripController

getHeaderAction

public ActionController getHeaderAction ()

Retrieves a ActionController for the header Action that is being controlled, or null if none is present.

Returns
ActionController

getItemList

public ItemListController getItemList ()

Returns an ItemListController that contains the ItemList in the RoutePreviewNavigationTemplate that is being controlled.

Returns
ItemListController

getNavigateAction

public ActionController getNavigateAction ()

Returns an ActionController that contains the navigate action in the RoutePreviewNavigationTemplateController being controlled, or null if one is not present.

Returns
ActionController

getRowByTitle

public RowController getRowByTitle (String title)

Returns a RowController that contains the first Row in the ItemList, which has the given title as its title, or null if one is not present.

The value should be the CharSequence.toString() for the title originally provided.

Parameters
title String

Returns
RowController

getTitle

public String getTitle ()

Retrieves the title set in the RoutePreviewNavigationTemplate that is being controlled, or null if none is present.

The value returned is the CharSequence.toString() for the title originally provided.

Returns
String

isLoading

public boolean isLoading ()

Returns true if the template is set to be loading.

This state is set via calling RoutePreviewNavigationTemplate.Builder.setIsLoading(boolean).

Returns
boolean

of

public static RoutePreviewNavigationTemplateController of (RoutePreviewNavigationTemplate routePreviewNavigationTemplate)

Creates a RoutePreviewNavigationTemplateController to control an RoutePreviewNavigationTemplate for testing.

Parameters
routePreviewNavigationTemplate RoutePreviewNavigationTemplate

Returns
RoutePreviewNavigationTemplateController