added working test casres for groovy style markup builders
This commit is contained in:
@@ -102,6 +102,17 @@ fun fails(block: ()-> Any) {
|
||||
block()
|
||||
Assert.fail("Expected an exception to be thrown")
|
||||
} catch (e: Exception) {
|
||||
println("Caught excepted exception: $e")
|
||||
// OK
|
||||
}
|
||||
}
|
||||
|
||||
fun <T: Exception> failsWith(block: ()-> Any) {
|
||||
try {
|
||||
block()
|
||||
Assert.fail("Expected an exception to be thrown")
|
||||
} catch (e: T) {
|
||||
println("Caught excepted exception: $e")
|
||||
// OK
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user