com.vividsolutions.jts.util
Class Assert
java.lang.Object
com.vividsolutions.jts.util.Assert
public class Assert
extends java.lang.Object
A utility for making programming assertions.
static void | equals(Object expectedValue, Object actualValue) - Throws an
AssertionFailedException if the given objects are
not equal, according to the equals method.
|
static void | equals(Object expectedValue, Object actualValue, String message) - Throws an
AssertionFailedException with the given message if
the given objects are not equal, according to the equals
method.
|
static void | isTrue(boolean assertion) - Throws an
AssertionFailedException if the given assertion is
not true.
|
static void | isTrue(boolean assertion, String message) - Throws an
AssertionFailedException with the given message if
the given assertion is not true.
|
static void | shouldNeverReachHere() - Always throws an
AssertionFailedException .
|
static void | shouldNeverReachHere(String message) - Always throws an
AssertionFailedException with the given
message.
|
equals
public static void equals(Object expectedValue,
Object actualValue)
Throws an AssertionFailedException
if the given objects are
not equal, according to the equals
method.
expectedValue
- the correct valueactualValue
- the value being checked
equals
public static void equals(Object expectedValue,
Object actualValue,
String message)
Throws an AssertionFailedException
with the given message if
the given objects are not equal, according to the equals
method.
expectedValue
- the correct valueactualValue
- the value being checkedmessage
- a description of the assertion
isTrue
public static void isTrue(boolean assertion)
Throws an AssertionFailedException
if the given assertion is
not true.
assertion
- a condition that is supposed to be true
isTrue
public static void isTrue(boolean assertion,
String message)
Throws an AssertionFailedException
with the given message if
the given assertion is not true.
assertion
- a condition that is supposed to be truemessage
- a description of the assertion
shouldNeverReachHere
public static void shouldNeverReachHere()
Always throws an AssertionFailedException
.
shouldNeverReachHere
public static void shouldNeverReachHere(String message)
Always throws an AssertionFailedException
with the given
message.
message
- a description of the assertion