ActivityResultMatchers

public final class ActivityResultMatchers
extends Object

↳ android.support.test.espresso.contrib.ActivityResultMatchers


Hamcrest matchers for a Instrumentation.ActivityResult .

Summary

Public methods

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

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

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

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

Inherited methods

From class java.lang.Object
Object clone()
boolean equals(Object arg0)
void finalize()
final Class<?> getClass()
int hashCode()
final void notify()
final void notifyAll()
String toString()
final void wait(long arg0, int arg1)
final void wait(long arg0)
final void wait()

Public methods

hasResultCode

Matcher<? super Instrumentation.ActivityResult> hasResultCode (int resultCode)

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

Parameters
resultCode int

Returns
Matcher<? super Instrumentation.ActivityResult>

hasResultData

Matcher<? super Instrumentation.ActivityResult> hasResultData (Matcher<Intent> intentMatcher)

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

Parameters
intentMatcher Matcher

Returns
Matcher<? super Instrumentation.ActivityResult>

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2025年02月10日 UTC.