Class: Assert

jsts.util.Assert

new Assert()

A utility for making programming assertions.
Source:

Methods

(static) equals(expectedValue, actualValue, messageopt)

Throws an AssertionFailedException with the given message if the given objects are not equal, according to the equals method.
Parameters:
Name Type Attributes Description
expectedValue the correct value.
actualValue the value being checked.
message string <optional>
a description of the assertion.
Source:
Throws:
AssertionFailedException if the two objects are not equal

(static) isTrue(assertion, messageopt)

Throws an AssertionFailedException with the given message if the given assertion is not true.
Parameters:
Name Type Attributes Description
assertion boolean a condition that is supposed to be true.
message String <optional>
a description of the assertion.
Source:
Throws:
AssertionFailedException if the condition is false

(static) shouldNeverReachHere(messageopt)

Always throws an AssertionFailedException with the given message.
Parameters:
Name Type Attributes Description
message string <optional>
a description of the assertion.
Source:
Throws:
AssertionFailedException thrown always