mockkStatic

inline fun mockkStatic(vararg classes: KClass<*>)(source)

Builds a static mock. Any mocks of this exact class are cancelled before it's mocked

See also

To manually cancel mock


inline fun mockkStatic(vararg classes: String)(source)

Builds a static mock. Old static mocks of same classes are cancelled before.

See also

To manually cancel mock


inline fun mockkStatic(vararg classes: KClass<*>, block: () -> Unit)(source)
inline fun mockkStatic(vararg classes: String, block: () -> Unit)(source)

Builds a static mock and unmocks it after the block has been executed.

fun mockkStatic(vararg functions: KFunction<*>)(source)
fun mockkStatic(vararg functions: KProperty<*>)(source)

Builds a static mock. Any mocks of this function's declaring class are cancelled before it's mocked


inline fun mockkStatic(vararg functions: KFunction<*>, block: () -> Unit)(source)
inline fun mockkStatic(vararg functions: KProperty<*>, block: () -> Unit)(source)

Builds a static mock and unmocks it after the block has been executed.