# Assert

The **Assert** function allows adding run-time checks to assert the validity of predicates that should hold true in a function's processing.

Whenever the condition specified in an Assert fails, an error will occur to indicate the fact and the function's processing will halt.

***

## Properties

### Assertion

The type of assertion to evaluate.

_See the list of_ [_Assertions_](#assertions) _below describing specific additional properties relevant to each type of assertion._

### Message

The message to include in the error when the assertion fails.

## Assertions

### Are equal

Verifies that the two values specified are equal.

* **Expected**: The expected value.
* **Actual**: The actual value.
* **Tolerance**: Optional. In case the values are numeric, this specifies the maximum acceptable difference between the expected and actual values.

### Are not equal

Verifies that the two items specified hold different values.

* **Expected**: The expected value.
* **Actual**: The actual value.

### Contains

Asserts that the specified item is contained in the given list.

* **Item**: The item to look for in the list.
* **List**: The list to search in for the specified item.

### Greater

Verifies that the first value is greater than the second value.

* **X**: The first value, expected to be greater.
* **Y**: The second value, expected to be less than the first.

### Greater or equal

Verifies that the first value is greater than or equal to the second value.

* **X**: The first value, expected to be greater or equal.
* **Y**: The second value, expected to be less than or equal to the first.

### Less

Verifies that the first value is less than the second value.

* **X**: The first value, expected to be less.
* **Y**: The second value, expected to be greater than the first.

### Less or equal

Verifies that the first value is less than or equal to the second value.

* **X**: The first value, expected to be less than or equal.
* **Y**: The second value, expected to be greater than or equal to the first.

### Is true

Asserts that a condition is true.

* **Condition**: The condition to evaluate.

### Is false

Asserts that a condition is false.

* **Condition**: The condition to evaluate.

### Is null

Verifies that the item provided holds a null value.

* **Item**: The item to test for null.

### Is not null

Verifies that the item provided does hold a value and is not null.

* **Item**: The item to test for null.

### Is empty

Asserts that a list or string is empty.

* **Item**: The list or string to test for.

### Is not empty

Asserts that a list or string is not empty.

* **Item**: The list or string to test for.

### Fail

Fails unconditionally.

Use to verify that a specific part of a function's processing never executes.

***

## Links

[Wikipedia: Assertion](http://en.wikipedia.org/wiki/Assertion_\(software_development\))
