Alex is a Software Engineer working on Android development tools, especially Android Studio, at Google. His interests include Java, API design, OOP, IDEs and testing. Alex spends some of his spare time working on Open Source, blogging, writing technical articles, and speaking at international conferences. The opinions expressed here represent his own and not those of his employer. Alex is a DZone MVB and is not an employee of DZone and has posted 49 posts at DZone. You can read more from them at their website. View Full User Profile

FEST-Assert 0.9 Released

01.30.2008
| 3788 views |
  • submit to reddit

FEST-Assert is an "assertThat" library that provides a fluent interface for writing assertions. Its main goal is to improve test code readability and make maintenance of tests easier.

We are proud to announce that FEST-Assert 0.9 is out! This release includes many new features and improvements. Release notes and more information can be found here.

Example:

int removed = employees.removeFired();
assertThat(removed).isZero();

List newEmployees = employees.hired(TODAY);
assertThat(newEmployees).hasSize(6)
.contains(frodo, sam);

String[] newHires = employees.newHiresNames();
assertThat(newHires).containsOnly("Gandalf", "Arwen", "Gimli");

assertThat(yoda).isInstanceOf(Jedi.class)
.isEqualTo(foundJedi)
.isNotEqualTo(foundSith);

You can download the latest release here (file fest-assert-0.9.zip.) FEST-Assert requires Java SE 5.0 or later.

Here are some useful links:

Feedback is always appreciated :)

 
References
Published at DZone with permission of Alex Ruiz, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)