public final class

ResettingStubberImpl

extends Object
implements ResettingStubber
java.lang.Object
   ↳ android.support.test.espresso.intent.ResettingStubberImpl

Class Overview

Implementation of ResettingStubber

Summary

Public Constructors
ResettingStubberImpl()
Public Methods
Instrumentation.ActivityResult getActivityResultForIntent(Intent intent)
void initialize()
Marks this spy as initialized.
boolean isInitialized()
void reset()
Clears state (initialization, expected responses).
void setActivityResultForIntent(Matcher<Intent> matcher, Instrumentation.ActivityResult result)
Sets the result that will be returned to the intent sender (if the sender expects the result), next time an intent matched by the given matcher is launched.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.support.test.espresso.intent.ResettingStubber
From interface android.support.test.runner.intent.IntentStubber

Public Constructors

public ResettingStubberImpl ()

Public Methods

public Instrumentation.ActivityResult getActivityResultForIntent (Intent intent)

Parameters
intent Intent
Returns
Instrumentation.ActivityResult

public void initialize ()

Marks this spy as initialized. Once initialized, ResettingStubber begins recording intents and provides intent stubbing.

public boolean isInitialized ()

Returns
boolean

public void reset ()

Clears state (initialization, expected responses).

Must be called on main thread.

public void setActivityResultForIntent (Matcher<Intent> matcher, Instrumentation.ActivityResult result)

Sets the result that will be returned to the intent sender (if the sender expects the result), next time an intent matched by the given matcher is launched.

Parameters
matcher Matcher
result Instrumentation.ActivityResult