Google is committed to advancing racial equity for Black communities. See how.

PlaceListNavigationTemplateController

public class PlaceListNavigationTemplateController
extends Object

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


A controller that allows testing of a PlaceListNavigationTemplate.

This controller allows:

Summary

Public methods

PlaceListNavigationTemplate get()

Retrieves the PlaceListNavigationTemplate that this controller is controlling.

ActionStripController getActionStrip()

Returns an ActionStripController that contains the ActionStrip in the PlaceListNavigationTemplate 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 PlaceListNavigationTemplate that is being controlled.

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 PlaceListNavigationTemplate that is being controlled, or null if none is present.

boolean isLoading()

Returns true if the template is set to be loading.

static PlaceListNavigationTemplateController of(PlaceListNavigationTemplate placeListNavigationTemplate)

Creates a PlaceListNavigationTemplateController to control an PlaceListNavigationTemplate for testing.

Inherited methods

Public methods

get

public PlaceListNavigationTemplate get ()

Retrieves the PlaceListNavigationTemplate that this controller is controlling.

Returns
PlaceListNavigationTemplate

getActionStrip

public ActionStripController getActionStrip ()

Returns an ActionStripController that contains the ActionStrip in the PlaceListNavigationTemplate 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 PlaceListNavigationTemplate that is being controlled.

Returns
ItemListController

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 PlaceListNavigationTemplate 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 PlaceListNavigationTemplate.Builder.setIsLoading(boolean).

Returns
boolean

of

public static PlaceListNavigationTemplateController of (PlaceListNavigationTemplate placeListNavigationTemplate)

Creates a PlaceListNavigationTemplateController to control an PlaceListNavigationTemplate for testing.

Parameters
placeListNavigationTemplate PlaceListNavigationTemplate

Returns
PlaceListNavigationTemplateController