commonMain.com.bkahlert.kommons.test.testEnum.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kommons-test Show documentation
Show all versions of kommons-test Show documentation
Kommons Test is a Kotlin Multiplatform Library to ease testing.
package com.bkahlert.kommons.test
import io.kotest.assertions.assertSoftly
import io.kotest.inspectors.forAll
/** Asserts the specified [assertions] for each [Enum] entry. */
public inline fun > testEnum(assertions: (E) -> Unit) {
enumValues().forAll {
assertSoftly { assertions(it) }
}
}