IviServiceMock

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class IviServiceMock(val functionsInterface: KClass<*>)

The generated <Interface>Mock classes are annotated with this annotation to inform the test framework about the class that needs to be mocked for mocking the functions of the IVI service.

The generated <Interface>Mock class allows mocking an IVI service in an integration test. However it is test code in production modules. For this reason, the generated code for mocking an IVI service is kept to a minimum and the actual creation of the mock is not part of the generated code. The alternative is to generate code in two modules which is considered to be too complex for what it actually solves.

Constructors

Link copied to clipboard
fun IviServiceMock(functionsInterface: KClass<*>)

Properties

Link copied to clipboard
val functionsInterface: KClass<*>

The <Interface>Functions interface class that needs to be mocked.