commonMain.dev.mokkery.internal.answering.autofill.NothingValueProvider.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mokkery-runtime Show documentation
Show all versions of mokkery-runtime Show documentation
Mokkery is a mocking library for Kotlin Multiplatform, easy to use, boilerplate-free and compiler plugin driven.
The newest version!
package dev.mokkery.internal.answering.autofill
import dev.mokkery.answering.autofill.AutofillProvider
import dev.mokkery.internal.DefaultNothingException
import kotlin.reflect.KClass
internal object NothingValueProvider : AutofillProvider {
override fun provide(type: KClass<*>): AutofillProvider.Value.Absent = when (type) {
Nothing::class -> throw DefaultNothingException()
else -> AutofillProvider.Value.Absent
}
}