io.mockk.impl.annotations.SpyK.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockk-common Show documentation
Show all versions of mockk-common Show documentation
Common(JS and Java) MockK module
The newest version!
package io.mockk.impl.annotations
/**
* Creates a spyk.
*
* Example:
*
* ```
* @SpyK
* @AdditionalInterface(Runnable::class)
* private var carSpy = Car()
* ```
*
* Requires MockKAnnotations.init() being called on an object
* declaring variable with this this annotation.
*
* As an option to MockKAnnotations.init for JUnit 5 check [io.mockk.junit5.MockKExtension]
*
* @param name name of a spyk
* @param recordPrivateCalls enables recording of private calls
*
*/
annotation class SpyK(
val name: String = "",
val recordPrivateCalls: Boolean = true
)
© 2015 - 2024 Weber Informatics LLC | Privacy Policy