public static class

CursorMatchers.CursorMatcher

extends BoundedMatcher<ObjectCursor>
java.lang.Object
   ↳ org.hamcrest.BaseMatcher<java.lang.Object>
     ↳ androidx.test.espresso.matcher.BoundedMatcher<java.lang.Objectandroid.database.Cursor>
       ↳ androidx.test.espresso.matcher.CursorMatchers.CursorMatcher

Class Overview

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

Summary

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.
[Expand]
Inherited Methods
From class androidx.test.espresso.matcher.BoundedMatcher
From class org.hamcrest.BaseMatcher
From class java.lang.Object
From interface org.hamcrest.Matcher
From interface org.hamcrest.SelfDescribing

Public Methods

public void describeTo (Description description)

Parameters
description Description

public boolean matchesSafely (Cursor cursor)

Parameters
cursor Cursor
Returns
boolean

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

Parameters
checkColumns boolean
Returns
CursorMatchers.CursorMatcher