Stay organized with collections Save and categorize content based on your preferences.

ActivityResultMatchers

public final class ActivityResultMatchers


Hamcrest matchers for a ActivityResult.

Summary

Public constructors

Public methods

static Matcher<? super ActivityResult>
hasResultCode(int resultCode)

Returns a matcher that verifies that the resultCode of a given ActivityResult matches the given code

static Matcher<? super ActivityResult>
hasResultData(Matcher<Intent> intentMatcher)

Returns a matcher that verifies that the resultData of a given ActivityResult matches the given specification by the intentMatcher

Public constructors

ActivityResultMatchers

public ActivityResultMatchers()

Public methods

hasResultCode

public static Matcher<? super ActivityResult> hasResultCode(int resultCode)

Returns a matcher that verifies that the resultCode of a given ActivityResult matches the given code

hasResultData

public static Matcher<? super ActivityResult> hasResultData(Matcher<Intent> intentMatcher)

Returns a matcher that verifies that the resultData of a given ActivityResult matches the given specification by the intentMatcher