create
Creates a mock of given type and applies the block or fails if type is not supported by this factory.
inline fun <T : Any> MockFactory.create(noinline block: MokkeryMockConfigurer.Block<T> = { }): T(source)
Creates a mock of given T and applies the block or fails if T is not supported by this factory.
fun SpyFactory.create(type: KType, obj: Any, block: MokkerySpyConfigurer.Block<Any> = { }): Any(source)
Creates a spy of given type wrapping obj or fails if type is not supported by this factory.
obj must be an instance of given type.
inline fun <T : Any> SpyFactory.create(obj: T, noinline block: MokkerySpyConfigurer.Block<T> = { }): T(source)
Creates a spy of given type T wrapping obj or fails if T is not supported by this factory.
Parameters
block
is applied to created spy