mockkDiscoverableService

@JvmName(name = "mockkServiceKFunction3")
inline fun <T : AnyIviServiceApiBase> mockkDiscoverableService(    createApis: (LifecycleOwner, IviServiceProvider, Any) -> List<T>,     queuedActions: MutableList<() -> Unit> = mutableListOf(),     vararg mockServices: T): List<T>

Mocks the IVI services returned by createApis. This is for discoverable services that may have multiple registered services.

Return

A reference to mockServices for convenience. The caller does not need to keep a reference in order to prevent the mock from being garbage collected.

Parameters

T

The type of the service API.

createApis

A function reference to the createApis call used by production code to get references to the service APIs.

queuedActions

If IviServiceApiBase.queueOrRunAction is called while the service is not available (IviServiceApiBase.serviceAvailable is false), the lambda given to IviServiceApiBase.queueOrRunAction is added to this list.

mockServices

The MockK service mock.