assertTrue()
Purpose
Checks that a condition is true.
Syntax
assertTrue( [<string>,]<Boolean> )
where:
<string> is an optional message
<Boolean> is a Boolean condition
Description
The corresponding test result is Passed if the assertTrue() condition is True and Failed if the condition is False.
An optional <string> message can be logged and displayed in the test report.
If an exception is thrown in the assertTrue() method, the test is stopped.
Examples
assertTrue("Should be true",true);
assertTrue("Should be failed",false);
assertTrue(true);
assertTrue(false);
Related Topics