{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

CursorMatchers.CursorMatcher

class CursorMatchers.CursorMatcher : BoundedMatcher

kotlin.Any
   ↳ org.hamcrest.BaseMatcher
     ↳ androidx.test.espresso.matcher.BoundedMatcher
       ↳ androidx.test.espresso.matcher.CursorMatchers.CursorMatcher

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

Summary

Public constructors

Public functions

Unit
describeTo(description: Description!)
Boolean
CursorMatchers.CursorMatcher!

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

Inherited functions

From class org.hamcrest.BaseMatcher
From class androidx.test.espresso.matcher.BoundedMatcher
Unit
describeMismatch(item: Any!, description: Description!)
Boolean
matches(item: Any!)
From class org.hamcrest.Matcher
abstract Boolean
matches(p: Any!)

Public constructors

CursorMatcher

CursorMatcher()

Public functions

describeTo

fun describeTo(description: Description!): Unit

matchesSafely

fun matchesSafely(cursor: Cursor!): Boolean

withStrictColumnChecks

fun withStrictColumnChecks(checkColumns: Boolean): CursorMatchers.CursorMatcher!

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.