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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy