spek-api / org.jetbrains.spek.api.dsl / SubjectDsl

SubjectDsl

interface SubjectDsl<T> : Dsl

Author
Ranie Jade Ramiso

Since
1.0



Properties

subject abstract val subject: T

Functions

includeSubjectSpec abstract fun <T, K : SubjectSpek<T>> includeSubjectSpec(spec: KClass<K>): Unit
subject abstract fun subject(mode: CachingMode = CachingMode.TEST, factory: () -> T): Subject<T>

Inherited Functions

afterEach abstract fun afterEach(callback: () -> Unit): Unit
beforeEach abstract fun beforeEach(callback: () -> Unit): Unit
group abstract fun group(description: String, pending: Pending = Pending.No, body: Dsl.() -> Unit): Unit
test abstract fun test(description: String, pending: Pending = Pending.No, body: () -> Unit): Unit

Extension Functions

context fun Dsl.context(description: String, body: Dsl.() -> Unit): Unit

Creates a group.

describe fun Dsl.describe(description: String, body: Dsl.() -> Unit): Unit

Creates a group.

given fun Dsl.given(description: String, body: Dsl.() -> Unit): Unit

Creates a group.

it fun Dsl.it(description: String, body: () -> Unit): Unit

Creates a test.

itBehavesLike fun <T, K : SubjectSpek<T>> SubjectDsl<*>.itBehavesLike(spec: KClass<K>): Unit

Alias for SubjectDsl.includeSubjectSpec.

on fun Dsl.on(description: String, body: Dsl.() -> Unit): Unit

Creates a group.

xcontext fun Dsl.xcontext(description: String, reason: String? = null, body: Dsl.() -> Unit): Unit

Creates a group.

xdescribe fun Dsl.xdescribe(description: String, reason: String? = null, body: Dsl.() -> Unit): Unit

Creates a group.

xgiven fun Dsl.xgiven(description: String, reason: String? = null, body: Dsl.() -> Unit): Unit

Creates a group.

xit fun Dsl.xit(description: String, reason: String? = null, body: () -> Unit = {}): Unit

Creates a pending test.

xon fun Dsl.xon(description: String, reason: String? = null, body: Dsl.() -> Unit = {}): Unit

Creates a pending group.