assert

Provides generic assertion methods.

contain

Asserts that the string value contains a substring.

Parameters:

Name

Type

Description

actual

String

Actual value.

contains

String

Verbatim string to be contained.

message

String

optional Message to throw if assertion fails.

equal

Asserts that two values are equal.

Parameters:

Name

Type

Description

actual

String

Actual value.

expected

String

Expected value. Either a verbatim string or a regex string prefixed with regex:.

message

String

optional Message to throw if assertion fails.

notEqual

Asserts that two values are not equal.

Parameters:

Name

Type

Description

actual

String

Actual value.

expected

String

Expected value. Either a verbatim string or a regex string prefixed with regex:.

message

String

optional Message to throw if assertion fails.

fail

Fails test with the given message.

Parameters:

Name

Type

Description

message

String

optional Error message to return.