Skip to content
Kem Tekinay edited this page Feb 23, 2023 · 2 revisions

For A XojoUnit Example, you used a method of the Assert class called AreEqual. These are the other methods available to help you write your tests:

AreDifferent

Checks if the two objects point to different references or instances.

AreEqual

This is the method you will use most often. It is overloaded for these data types: Color, Currency, Date, Double (and array), Int64, Integer (and array), String (and array).

AreSame

Checks if the two objects point to the same reference or instance, or if two strings are the same (case-sensitive).

DoesNotMatch

Ensures that a given string does not match the RegEx pattern.

Fail

Used to manually fail a test and display a message.

IsFalse

Tests if the supplied boolean expression is False.

IsNil

Tests if the supplied object is Nil.

IsNotNil

Tests if the supplied object is not Nil.

IsTrue

Tests if the supplied boolean expression is True.

Matches

Ensures that a given string matches a RegEx pattern.

Message

Displays a message in the message area for the test.

Pass

Manually passes a test and displays a message.