{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
public final class IntentStubberRegistry
Exposes an implementation of IntentStubber.
Public constructors |
|
|---|---|
Public methods |
|
|---|---|
static IntentStubber |
Returns the loaded Intent Stubber instance. |
static boolean |
isLoaded() |
static void |
load(IntentStubber intentStubber)Loads an |
synchronized static void |
reset()Clears the current instance of Intent Stubber. |
public static IntentStubber getInstance()
Returns the loaded Intent Stubber instance.
| Throws | |
|---|---|
java.lang.IllegalStateException java.lang.IllegalStateException |
if this method is not called on the main thread. |
java.lang.IllegalStateException java.lang.IllegalStateException |
if no Intent Stubber has been loaded. |
public static void load(IntentStubber intentStubber)
Loads an IntentStubber into this registry. There can only be one active stubber at a time.
Calling this method multiple times in the same instrumentation will result in an exception.
This method can be called from any thread.