sam
09/03/2019, 2:22 PMclass FunSpecExampleNewDsl : FunSpec() {
fun foo() { bar() }
fun bar() { bat(); boot() }
fun bat() { }
fun boot() {}
init {
val linuxTag = Tag("linux")
val jvmTag = Tag("JVM")
tags(linuxTag, jvmTag)
set(IsolationMode.InstancePerLeaf)
set(AssertionMode.Error)
set(TestCaseOrder.Random)
listeners(LocaleTestListener(Locale.CANADA_FRENCH), TimeZoneTestListener(TimeZone.getTimeZone("GMT")))
beforeTest { testCase ->
println("Starting test ${testCase.description}")
}
afterTest { testCase, result ->
println("Test ${testCase.description} completed with result $result")
}
beforeSpec { spec ->
println("Starting spec ${spec.description()}")
}
afterSpec { spec ->
println("Completed spec ${spec.description()}")
}
test("this is a test") {
// test here
}
test("this test has config").config(invocations = 1, enabled = true) {
// test here
}
}
})