{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

IntentStubberRegistry

class IntentStubberRegistry


Exposes an implementation of IntentStubber.

Summary

Public constructors

Public functions

java-static IntentStubber!

Returns the loaded Intent Stubber instance.

java-static Boolean
java-static Unit
load(intentStubber: IntentStubber!)

Loads an IntentStubber into this registry.

synchronized java-static Unit

Clears the current instance of Intent Stubber.

Public constructors

IntentStubberRegistry

IntentStubberRegistry()

Public functions

getInstance

java-static fun getInstance(): IntentStubber!

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.

isLoaded

java-static fun isLoaded(): Boolean
Returns
Boolean

if an IntentStubber has been loaded.

load

java-static 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.

reset

synchronized java-static fun reset(): Unit

Clears the current instance of Intent Stubber.