commonMain.com.zegreatrob.testmints.async.Exercise.kt Maven / Gradle / Ivy
package com.zegreatrob.testmints.async
import kotlinx.coroutines.Deferred
class Exercise(
val timeoutMs: Long,
private val runTestAsync: (suspend C.(R) -> Unit) -> (suspend C.(R?) -> Unit) -> Deferred,
) {
infix fun verify(assertionFunctions: suspend C.(R) -> Unit) = finalTransform(timeoutMs) {
runTestAsync(assertionFunctions).invoke { }
}
infix fun verifyAnd(assertionFunctions: suspend C.(R) -> Unit) = Verify(timeoutMs, runTestAsync(assertionFunctions))
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy