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

commonMain.com.zegreatrob.testmints.async.Exercise.kt Maven / Gradle / Ivy

There is a newer version: 12.1.40
Show newest version
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