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

run.smt.ktest.api.Case.kt Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package run.smt.ktest.api

import java.time.Duration
import java.util.*

data class Case(
    val suite: Suite,
    val name: String,
    val metaData: MetaData,
    val body: () -> Unit
) {
    val uid = UUID.randomUUID().toString()

    val inheritedMetadata = metaData + suite.inheritedMetaData

    private val disabled = metaData.filterIsInstance().firstOrNull()

    val disablingReason = disabled?.value
    val enabled = disabled == null

    val invocations = metaData.filterIsInstance().firstOrNull()?.value ?: 1

    val timeout = metaData.filterIsInstance().firstOrNull()?.value ?: Duration.ofNanos(Long.MAX_VALUE)!!
    val threads = metaData.filterIsInstance().firstOrNull()?.value ?: 1
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy