mockkService
Mocks the IVI service returned by createApi. This is for services that are always expected to be registered. For services that are optionally registered, use mockkOptionalService instead.
Return
A reference to the created service mock. The caller does not need to keep a reference in order to prevent the mock from being garbage collected.
Parameters
The type of the service API.
A function reference to the createApi
call used by production code to get a reference to the service API.
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.
The MockK block for the service mock, containing things like every statements.
Mocks the IVI service returned by createApi. This is for services that are always expected to be registered. For services that are optionally registered, use mockkOptionalService instead.
Return
A reference to the created service mock. The caller does not need to keep a reference in order to prevent the mock from being garbage collected.
Parameters
The type of the service API.
T function reference to the createApi
call used by production code to get a reference to the service API.
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.
The MockK block for the service mock, containing things like every statements.
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
The type of the service API.
A function reference to the createApis
call used by production code to get references to the service APIs.
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.
The MockK service mock.