Slide 154
Slide 154 text
Asserts
Statement Description
fail( message ) Cause the test to immediately fail, reporting the
provided String as message
assertTrue( message, condition ) Checks that the condition is true, and reports the
message if instead it is false.
assertFalse ( message, condition ) Checks that the condition is false, and reports the
message if instead it is true.
assertEquals( message, expected,
actual )
Checks that the expected value matches the actual, or
reports the message otherwise
Be sure to provide a useful message for when checks fail.
This will be the first source of information for diagnostics
Jonathan Clarkin | @_jrwc | #KWSQA