IntentStubberRegistry
public final class IntentStubberRegistry
Exposes an implementation of IntentStubber
.
Summary
Public methods |
|
---|---|
static @NonNull IntentStubber |
Returns the loaded Intent Stubber instance. |
static @NonNull boolean |
isLoaded() |
static @NonNull void |
load(@NonNull IntentStubber intentStubber) Loads an |
static synchronized @NonNull void |
reset() Clears the current instance of Intent Stubber. |
Public methods
getInstance
@NonNull
public static IntentStubber getInstance()
Returns the loaded Intent Stubber instance.
Throws | |
---|---|
java.lang.IllegalStateException |
if this method is not called on the main thread. |
java.lang.IllegalStateException |
if no Intent Stubber has been loaded. |
isLoaded
@NonNull
public static boolean isLoaded()
Returns | |
---|---|
boolean |
if an |
load
@NonNull
public static void load(@NonNull 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.
reset
@NonNull
public static synchronized void reset()
Clears the current instance of Intent Stubber.