CursorMatchers.CursorMatcher


public class CursorMatchers.CursorMatcher extends BoundedMatcher


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

Summary

Public methods

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

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

Inherited methods

From org.hamcrest.BaseMatcher
final void

This method is deprecated.

void
describeMismatch(Object item, Description description)
String
From androidx.test.espresso.matcher.BoundedMatcher
void
describeMismatch(Object item, Description description)
final boolean
From org.hamcrest.Matcher
abstract boolean

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 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.