RowController

public class RowController
extends Object implements ItemController<Row>

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


A controller that allows testing of a Row.

This controller allows:

Summary

Public methods

Row get()

Retrieves the Row that this controller is controlling.

MetadataController getMetadata()

Returns a MetadataController for the Metadata that is contained in the Row being controlled.

List<String> getTextList()

Retrieves the texts set via Row.Builder.addText(CharSequence).

String getTitle()

Retrieves the title set via Row.Builder.setTitle(CharSequence), or null if no title is present.

ToggleController getToggle()

Retrieves a ToggleController that controls the Toggle which was set via Row.Builder.setToggle(Toggle), or null if the Row being controlled does not have a Toggle.

boolean isBrowsable()

Verifies whether the Row controlled by this controller is "browsable".

static RowController of(Row row)

Creates a RowController to control a Row for testing.

void performClick()

Performs a click on the Row controlled by this controller.

Inherited methods

Public methods

get

public Row get ()

Retrieves the Row that this controller is controlling.

Returns
Row

getMetadata

public MetadataController getMetadata ()

Returns a MetadataController for the Metadata that is contained in the Row being controlled.

The Metadata is the one set via Row.Builder.setMetadata(Metadata), or Metadata.EMPTY_METADATA if none was set.

Returns
MetadataController

getTextList

public List<String> getTextList ()

Retrieves the texts set via Row.Builder.addText(CharSequence).

The values returned are the CharSequence.toString() for the texts provided.

Returns
List<String>

getTitle

public String getTitle ()

Retrieves the title set via Row.Builder.setTitle(CharSequence), or null if no title is present.

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

Returns
String

getToggle

public ToggleController getToggle ()

Retrieves a ToggleController that controls the Toggle which was set via Row.Builder.setToggle(Toggle), or null if the Row being controlled does not have a Toggle.

Returns
ToggleController

isBrowsable

public boolean isBrowsable ()

Verifies whether the Row controlled by this controller is "browsable".

Rows are set as browsable via calling Row.Builder.setIsBrowsable(boolean).

Returns
boolean

of

public static RowController of (Row row)

Creates a RowController to control a Row for testing.

Parameters
row Row

Returns
RowController

performClick

public void performClick ()

Performs a click on the Row controlled by this controller.