Adapted usage of failsWith().

This commit is contained in:
Evgeny Gerashchenko
2013-01-29 20:43:36 +04:00
parent 719ed4c795
commit dd4b508213
7 changed files with 54 additions and 54 deletions
+3 -3
View File
@@ -189,7 +189,7 @@ class CollectionTest {
list.reduce { a, b -> a + b }
}
failsWith<UnsupportedOperationException> {
failsWith(javaClass<UnsupportedOperationException>()) {
arrayList<Int>().reduce { a, b -> a + b}
}
}
@@ -200,7 +200,7 @@ class CollectionTest {
list.reduceRight { a, b -> a + b }
}
failsWith<UnsupportedOperationException> {
failsWith(javaClass<UnsupportedOperationException>()) {
arrayList<Int>().reduceRight { a, b -> a + b}
}
}
@@ -271,7 +271,7 @@ class CollectionTest {
assertEquals(arrayList("foo", "bar"), notNull)
val hasNulls = arrayList("foo", null, "bar")
failsWith<IllegalArgumentException> {
failsWith(javaClass<IllegalArgumentException>()) {
// should throw an exception as we have a null
hasNulls.requireNoNulls()
}