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

ActivityResultMatchers

class ActivityResultMatchers


Hamcrest matchers for a ActivityResult.

Summary

Public constructors

Public functions

java-static Matcher<Any!>!
hasResultCode(resultCode: Int)

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

java-static Matcher<Any!>!
hasResultData(intentMatcher: Matcher<Intent!>!)

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

Public constructors

ActivityResultMatchers

ActivityResultMatchers()

Public functions

hasResultCode

java-static fun hasResultCode(resultCode: Int): Matcher<Any!>!

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

hasResultData

java-static fun hasResultData(intentMatcher: Matcher<Intent!>!): Matcher<Any!>!

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