DataInteraction.DisplayDataMatcher


public final class DataInteraction.DisplayDataMatcher extends TypeSafeMatcher


Internal matcher that is required for onData.

This matcher is only visible to support proto serialization. Do not use this matcher in any Espresso test code!

Summary

Public methods

void
describeTo(Description description)
static DataInteraction.DisplayDataMatcher
displayDataMatcher(
    @NonNull Matcher<View> adapterMatcher,
    @NonNull Matcher<Object> dataMatcher,
    @NonNull Matcher<Root> rootMatcher,
    EspressoOptional<Integer> atPosition,
    @NonNull AdapterViewProtocol adapterViewProtocol
)

This method is deprecated.

use displayDataMatcher instead.

static DataInteraction.DisplayDataMatcher
displayDataMatcher(
    @NonNull Matcher<View> adapterMatcher,
    @NonNull Matcher<Object> dataMatcher,
    @NonNull Matcher<Root> rootMatcher,
    @Nullable Integer atPosition,
    @NonNull AdapterViewProtocol adapterViewProtocol
)

Returns an instance of DisplayDataMatcher.

boolean

Inherited methods

From org.hamcrest.BaseMatcher
final void

This method is deprecated.

String
From org.hamcrest.TypeSafeMatcher
final void
describeMismatch(Object item, Description description)
void
describeMismatchSafely(T item, Description mismatchDescription)
final boolean

Public methods

describeTo

public void describeTo(Description description)

displayDataMatcher

public static DataInteraction.DisplayDataMatcher displayDataMatcher(
    @NonNull Matcher<View> adapterMatcher,
    @NonNull Matcher<Object> dataMatcher,
    @NonNull Matcher<Root> rootMatcher,
    EspressoOptional<Integer> atPosition,
    @NonNull AdapterViewProtocol adapterViewProtocol
)

Returns an instance of DisplayDataMatcher.

Note: This is an internal method, do not call from test code!

Parameters
@NonNull Matcher<View> adapterMatcher

matcher that matches an AdapterView

@NonNull Matcher<Object> dataMatcher

the data matcher for matching a View by it's adapter data

@NonNull Matcher<Root> rootMatcher

matcher for view's root

EspressoOptional<Integer> atPosition

optional position of the view to match

@NonNull AdapterViewProtocol adapterViewProtocol

the AdapterViewProtocol used for this data interaction

displayDataMatcher

public static DataInteraction.DisplayDataMatcher displayDataMatcher(
    @NonNull Matcher<View> adapterMatcher,
    @NonNull Matcher<Object> dataMatcher,
    @NonNull Matcher<Root> rootMatcher,
    @Nullable Integer atPosition,
    @NonNull AdapterViewProtocol adapterViewProtocol
)

Returns an instance of DisplayDataMatcher.

Note: This is an internal method, do not call from test code!

Parameters
@NonNull Matcher<View> adapterMatcher

matcher that matches an AdapterView

@NonNull Matcher<Object> dataMatcher

the data matcher for matching a View by it's adapter data

@NonNull Matcher<Root> rootMatcher

matcher for view's root

@Nullable Integer atPosition

optional zero-based position of the data to be matched

@NonNull AdapterViewProtocol adapterViewProtocol

the AdapterViewProtocol used for this data interaction

matchesSafely

public boolean matchesSafely(View view)