simplified the test cases for the preconditions and add them to the API docs; also added requireNotNull() and checkNotNull() helper methods for converting nullables to non-nullables easily in code with optional exception messages

This commit is contained in:
James Strachan
2012-04-17 08:22:28 +01:00
parent a44a75a6a4
commit 34dae731a6
4 changed files with 120 additions and 117 deletions
+2 -3
View File
@@ -40,8 +40,7 @@ class ExceptionTest {
t.printStackTrace(stream)
}
assertNotNull(byteBuffer.toByteArray()) { bytes ->
assertTrue(bytes.size > 10)
}
val bytes = assertNotNull(byteBuffer.toByteArray())
assertTrue(bytes.size > 10)
}
}