이제 두 번째 Android 11 개발자 프리뷰를 사용할 수 있습니다. 테스트해 보고 의견을 공유하세요.

PreferenceMatchers

public final class PreferenceMatchers
extends Object

java.lang.Object
   ↳ androidx.test.espresso.matcher.PreferenceMatchers


A collection of hamcrest matchers that match Preferences.

Summary

Public methods

static Matcher<Preference> isEnabled()
static Matcher<Preference> withKey(Matcher<String> keyMatcher)
static Matcher<Preference> withKey(String key)
static Matcher<Preference> withSummary(int resourceId)
static Matcher<Preference> withSummaryText(Matcher<String> summaryMatcher)
static Matcher<Preference> withSummaryText(String summary)
static Matcher<Preference> withTitle(int resourceId)
static Matcher<Preference> withTitleText(String title)
static Matcher<Preference> withTitleText(Matcher<String> titleMatcher)

Inherited methods

From class java.lang.Object

Public methods

isEnabled

Matcher<Preference> isEnabled ()

Returns
Matcher<Preference>

withKey

Matcher<Preference> withKey (Matcher<String> keyMatcher)

Parameters
keyMatcher Matcher

Returns
Matcher<Preference>

withKey

Matcher<Preference> withKey (String key)

Parameters
key String

Returns
Matcher<Preference>

withSummary

Matcher<Preference> withSummary (int resourceId)

Parameters
resourceId int

Returns
Matcher<Preference>

withSummaryText

Matcher<Preference> withSummaryText (Matcher<String> summaryMatcher)

Parameters
summaryMatcher Matcher

Returns
Matcher<Preference>

withSummaryText

Matcher<Preference> withSummaryText (String summary)

Parameters
summary String

Returns
Matcher<Preference>

withTitle

Matcher<Preference> withTitle (int resourceId)

Parameters
resourceId int

Returns
Matcher<Preference>

withTitleText

Matcher<Preference> withTitleText (String title)

Parameters
title String

Returns
Matcher<Preference>

withTitleText

Matcher<Preference> withTitleText (Matcher<String> titleMatcher)

Parameters
titleMatcher Matcher

Returns
Matcher<Preference>