Summary: Ctors | Methods | Inherited Methods | [Expand All]

# ResettingStubberImpl

`public final class ResettingStubberImpl`
`extends Object` `implements ResettingStubber`

java.lang.Object
↳ | android.support.test.espresso.intent.ResettingStubberImpl

Implementation of `ResettingStubber`

## Summary

### Public constructors
`ResettingStubberImpl()`

### Public methods
`Instrumentation.ActivityResult` | `getActivityResultForIntent(Intent intent)` Returns the first matching stubbed result for the given activity if stubbed result was set by test author.
`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.

### 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()`
From interface `android.support.test.espresso.intent.ResettingStubber`
`abstract void` | `initialize()` Marks this spy as initialized.
`abstract boolean` | `isInitialized()`
`abstract void` | `reset()` Clears state (initialization, expected responses).
`abstract 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.
From interface `android.support.test.runner.intent.IntentStubber`
`abstract Instrumentation.ActivityResult` | `getActivityResultForIntent(Intent intent)` Returns the first matching stubbed result for the given activity if stubbed result was set by test author.

## Public constructors

### ResettingStubberImpl

    ResettingStubberImpl ()

## Public methods

### getActivityResultForIntent

    Instrumentation.ActivityResult getActivityResultForIntent (Intent intent)

Returns the first matching stubbed result for the given activity if stubbed result was set by test author. The method searches the list of existing matcher/response pairs in reverse order of which they were entered; i.e. the last stubbing has the highest priority. If no stubbed result matching the given intent is found, `null` is returned.

Must be called on main thread.

Parameters
`intent` | `Intent`

Returns
`Instrumentation.ActivityResult` |

### initialize

    void initialize ()

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

### isInitialized

    boolean isInitialized ()

Returns
`boolean` |

### reset

    void reset ()

Clears state (initialization, expected responses).

Must be called on main thread.

### setActivityResultForIntent

    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`

- ## Interfaces

  - ResettingStubber
  - ResolvedIntent
  - VerifiableIntent
  - VerificationMode

- ## Classes

  - Checks
  - Intents
  - OngoingStubbing
  - ResettingStubberImpl
  - VerificationModes