IviServiceTestCase
Base class for running tests that require one or more IVI services.
Test cases can configure:
Which IVI services are registered.
Which IVI services are mocked.
The mocked IVI services all run inside the main process, allowing the test access to the mocks.
The IVI service configurations offered by this class are limited to the main process and thus limited to single process setups only or, when using services in other processes, limited to services that do not need any other non-mocked services. The alternative is to extend the TestApplication and set TestApplication.iviServiceTestConfiguration. A combination is also possible.
The configuration providers are configured at build time and available in all processes. Gradle plugins that implement the com.tomtom.ivi.gradle.api.common.defaults.IviDefaultsPlugin
class can configure static and dynamic configuration providers.
Note: This class depends on the TestApplication to be used as the Application class of the test apk.
Parameters
The initial service configuration to setup when not null
.
Constructors
Types
Properties
Inherited properties
Functions
See the IviServiceRule.hasIviServiceMock overload that takes a IviServiceMockIdentifier instance.
See the IviServiceRule.hasIviServiceMock overload that takes a KClass instance.
See the IviServiceRule.withIviServiceMockOnMainThread overload that takes a IviServiceMockIdentifier instance.
See the IviServiceRule.withIviServiceMockOnMainThread overload that takes a KClass instance.
See the IviServiceRule.withIviServiceMockOnTestThread overload that takes a IviServiceMockIdentifier instance.
See the IviServiceRule.withIviServiceMockOnTestThread overload that takes a KClass instance.