IntentStubberRegistry
class IntentStubberRegistry
Exposes an implementation of IntentStubber
.
Summary
Public functions |
|
---|---|
IntentStubber |
Returns the loaded Intent Stubber instance. |
Boolean |
isLoaded() |
Unit |
load(intentStubber: IntentStubber) Loads an |
synchronized Unit |
reset() Clears the current instance of Intent Stubber. |
Public functions
getInstance
fun getInstance(): IntentStubber
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. |
load
fun load(intentStubber: IntentStubber): Unit
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.