Message-ID: <1048204060.7147.1394590373521.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_7146_1185030734.1394590373520" ------=_Part_7146_1185030734.1394590373520 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Hamcrest is a powerful library for writing custom match= ers. Although FEST-Assert and Hamcrest have similar goals, their implementa= tion and APIs are quite different. Here is an example using Hamcrest (borro= wed from Martin Gilday's example posted at the TestNG mailing list):
This is the same example, using FEST's assertions:
We like FEST-Assert's approach because:
We can chain related assertion methods:
Which one to use? Hamcrest or FEST-Assert? It is up to you...it depends = on the needs of your project and your coding style!