run.smt.ktest.api.MetaProperty.kt Maven / Gradle / Ivy
package run.smt.ktest.api
import java.time.Duration
typealias MetaData = Set>
fun emptyMetaData(): MetaData = emptySet()
fun noMetaData() = emptyMetaData()
abstract class MetaProperty {
abstract val value: T
}
data class NamedMetaProperty(val name: String, override val value: T) : MetaProperty()
data class MultipleInvocationsProperty(override val value: Int) : MetaProperty()
data class Disabled(override val value: String?): MetaProperty() {
constructor(): this(null)
}
data class AnnotationBasedProperty(override val value : A) : MetaProperty() {
constructor(convertible: ConvertibleToAnnotation): this(convertible.toAnnotation())
}
data class TimeoutProperty(override val value: Duration): MetaProperty()
data class ThreadsProperty(override val value: Int): MetaProperty()
data class CategoryProperty(override val value: String): MetaProperty()
interface ConvertibleToAnnotation {
fun toAnnotation(): A
}