FEST Assertions Module has moved to Github !
Check this page :https://github.com/alexruiz/fest-assert-2.x/wiki
The documentation below is for Fest 1.x which is no more maintained, we are focusing our effort to the 2.x version !
Assertions classes provided by FEST-Assert can be extended by using custom conditions (instances of
For example, the following condition verifies that the characters in a String are in uppercase:
This example shows how to use such condition:
which will fail with the message:
New in 1.2: "is" and "isNot"
FEST-Assert also provides the methods
isNot, which are aliases for
doesNotSatisfy respectively. These aliases work exactly the same as the original methods, with the difference that they can improve readability in certain cases.
In our previous example, we can change the name of the static factory method
isUppercase to simply
and use the alias
which is shorter and easy to read than the original version!