# OngoingStubbing

Artifact: [androidx.test.espresso:espresso-intents](https://developer.android.com/jetpack/androidx/releases/test-espresso) [View Source](https://cs.android.com/search?q=file:androidx/test/espresso/intent/OngoingStubbing.java+class:androidx.test.espresso.intent.OngoingStubbing)

*** ** * ** ***


```
public final class OngoingStubbing
```

<br />

*** ** * ** ***

Supports method chaining after @Intents#intending method call.

## Summary

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/test/espresso/intent/OngoingStubbing#respondWith(android.app.Instrumentation.ActivityResult)(https://developer.android.com/reference/android/app/Instrumentation.ActivityResult.html result)` Sets a response for the intent being stubbed. |
| `void` | `https://developer.android.com/reference/androidx/test/espresso/intent/OngoingStubbing#respondWithFunction(androidx.test.espresso.intent.ActivityResultFunction)(https://developer.android.com/reference/androidx/test/espresso/intent/ActivityResultFunction result)` Sets a response callable for the intent being stubbed. |

## Public methods

### respondWith

```
public void respondWith(Instrumentation.ActivityResult result)
```

Sets a response for the intent being stubbed.

### respondWithFunction

```
public void respondWithFunction(ActivityResultFunction result)
```

Sets a response callable for the intent being stubbed.