CursorMatchers.CursorMatcher

public static class CursorMatchers.CursorMatcher
extends BoundedMatcher<Object, Cursor>

java.lang.Object
   ↳ org.hamcrest.BaseMatcher<java.lang.Object>
     ↳ android.support.test.espresso.matcher.BoundedMatcher<java.lang.Object, android.database.Cursor>
       ↳ android.support.test.espresso.matcher.CursorMatchers.CursorMatcher


MatcherCursor基于列中的值相匹配。

Summary

Public methods

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

允许测试作者覆盖如果列名/计数无效,匹配器是否应该抛出 IllegalArgumentException

Inherited methods

From class android.support.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

describeTo

void describeTo (Description description)

Parameters
description 描述

matchesSafely

boolean matchesSafely (Cursor cursor)

Parameters
cursor Cursor
Returns
boolean

withStrictColumnChecks

CursorMatchers.CursorMatcher withStrictColumnChecks (boolean checkColumns)

允许测试作者覆盖如果列名/计数无效,匹配器是否应该抛出IllegalArgumentException 这在光标可以迭代具有可变列的数据集的情况下很有用。 默认情况下,检查已打开。

Parameters
checkColumns boolean
Returns
CursorMatchers.CursorMatcher