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

ResettingStubberImpl

class ResettingStubberImpl : ResettingStubber


Implementation of ResettingStubber

Summary

Public constructors

Public functions

ActivityResult!
getActivityResultForIntent(intent: Intent!)
Unit

Marks this spy as initialized.

Boolean
Unit

Clears state (initialization, expected responses).

Unit
setActivityResultForIntent(
    matcher: Matcher<Intent>!,
    result: ActivityResult!
)

Sets the result that will be returned to the intent sender (if the sender expects the result), next time an intent matched by the given matcher is launched.

Unit
setActivityResultFunctionForIntent(
    matcher: Matcher<Intent>!,
    result: ActivityResultFunction!
)

Sets a result function that will be called by the intent sender (if the sender expects the result), next time an intent matched by the given matcher is launched.

Public constructors

ResettingStubberImpl

ResettingStubberImpl()

Public functions

getActivityResultForIntent

fun getActivityResultForIntent(intent: Intent!): ActivityResult!

initialize

fun initialize(): Unit

Marks this spy as initialized. Once initialized, ResettingStubber begins recording intents and provides intent stubbing.

isInitialized

fun isInitialized(): Boolean
Returns
Boolean

true if this spy is initialized

reset

fun reset(): Unit

Clears state (initialization, expected responses).

Must be called on main thread.

setActivityResultForIntent

fun setActivityResultForIntent(
    matcher: Matcher<Intent>!,
    result: ActivityResult!
): Unit

Sets the result that will be returned to the intent sender (if the sender expects the result), next time an intent matched by the given matcher is launched.

setActivityResultFunctionForIntent

fun setActivityResultFunctionForIntent(
    matcher: Matcher<Intent>!,
    result: ActivityResultFunction!
): Unit

Sets a result function that will be called by the intent sender (if the sender expects the result), next time an intent matched by the given matcher is launched.