ActionController
public
class
ActionController
extends Object
java.lang.Object | |
↳ | com.google.android.libraries.car.app.testing.model.ActionController |
A controller that allows testing of an Action
.
This controller allows:
- Performing a click on the
Action
as if the user did. - Retrieving the
Action
's title. - Retrieving the
Action
's background color.
Summary
Public methods | |
---|---|
Action
|
get()
Retrieves the |
CarColor
|
getBackgroundColor()
Retrieves the color set via |
String
|
getTitle()
Retrieves the title set via |
static
ActionController
|
of(Action action)
Creates an |
void
|
performClick()
Performs a click on the |
Inherited methods | |
---|---|
Public methods
getBackgroundColor
public CarColor getBackgroundColor ()
Retrieves the color set via Action.Builder.setBackgroundColor(CarColor)
, or CarColor.DEFAULT
if no background color is set.
Returns | |
---|---|
CarColor |
getTitle
public String getTitle ()
Retrieves the title set via Action.Builder.setTitle(CharSequence)
, or null
if no title is
present.
The value returned is the CharSequence.toString()
for the title provided.
Returns | |
---|---|
String |
of
public static ActionController of (Action action)
Creates an ActionController
to control an Action
for testing.
Parameters | |
---|---|
action |
Action |
Returns | |
---|---|
ActionController |
performClick
public void performClick ()
Performs a click on the Action
controlled by this controller.