Kanzi Framework  3.9.0
Java API
Assert Class Reference

A class that can be used to analyze the correctness of the program's behavior. More...

Static Public Member Functions

static void NotNull (Object object, String message)
 Throws AssertionError if the given object is null. More...
 
static void Null (Object object, String message)
 Throws AssertionError if the given object is not null. More...
 
static void Throw (String message)
 Throws AssertionError with the given message. More...
 
static void True (boolean condition, String message)
 Throws AssertionError if the given condition is false. More...
 

Detailed Description

A class that can be used to analyze the correctness of the program's behavior.

Member Function Documentation

◆ NotNull()

static void NotNull ( Object  object,
String  message 
)
static

Throws AssertionError if the given object is null.

Parameters
objectThe object to check.
messageThe message to attach to the error.

◆ Null()

static void Null ( Object  object,
String  message 
)
static

Throws AssertionError if the given object is not null.

Parameters
objectThe object to check.
messageThe message to attach to the error.

◆ Throw()

static void Throw ( String  message)
static

Throws AssertionError with the given message.

Parameters
messageThe message to attach to the error.

◆ True()

static void True ( boolean  condition,
String  message 
)
static

Throws AssertionError if the given condition is false.

Parameters
conditionThe condition to evaluate.
messageThe message to attach to the error.