CursorMatchers.CursorMatcher

public class CursorMatchers.CursorMatcher extends BoundedMatcher


A Matcher that matches Cursors based on values in their columns.

Summary

Public constructors

Public methods

void
describeTo(Description description)
boolean
matchesSafely(Cursor cursor)
CursorMatchers.CursorMatcher
withStrictColumnChecks(boolean checkColumns)

Allows test authors to override whether the the matcher should throw an IllegalArgumentException if the column name/count is not valid.

Inherited methods

From androidx.test.espresso.matcher.BoundedMatcher
void
describeMismatch(Object item, Description description)
final boolean

Public constructors

CursorMatcher

public CursorMatcher()

Public methods

describeTo

public void describeTo(Description description)

matchesSafely

public boolean matchesSafely(Cursor cursor)

withStrictColumnChecks

public CursorMatchers.CursorMatcher withStrictColumnChecks(boolean checkColumns)

Allows test authors to override whether the the matcher should throw an IllegalArgumentException if the column name/count is not valid. This is useful in the case where a cursor may iterates over a data set with variable columns. By default, the checks are off.