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:
- Performing a click on the row as if the user did.
- Retrieving the
title
set to theRow
viaRow.Builder.setTitle(CharSequence)
. - Retrieving the
text
s added to theRow
viaRow.Builder.addText(CharSequence)
. - Retrieving the
Metadata
set to theRow
viaRow.Builder.setMetadata(Metadata)
. - Checking whether the
Row
is set to be "browsable" viaRow.Builder.setIsBrowsable(boolean)
.
Summary
Public methods | |
---|---|
Row
|
get()
Retrieves the |
MetadataController
|
getMetadata()
Returns a |
List<String>
|
getTextList()
Retrieves the texts set via |
String
|
getTitle()
Retrieves the title set via |
ToggleController
|
getToggle()
Retrieves a |
boolean
|
isBrowsable()
Verifies whether the |
static
RowController
|
of(Row row)
Creates a |
void
|
performClick()
Performs a click on the |
Inherited methods | |
---|---|
Public methods
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".
Row
s 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 |