All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.dev.mokkery.internal.answering.autofill.NothingValueProvider.kt Maven / Gradle / Ivy

Go to download

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
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy