FEST-Assert 1.4: Fluent Interface for Assertions
We are proud to announce that FEST-Assert 1.4 is out!
int removed = employees.removeFired();
List newEmployees = employees.hired(TODAY);
String newHires = employees.newHiresNames();
assertThat(newHires).containsOnly("Gandalf", "Arwen", "Gimli");
One of the biggest changes in this release is the implementation of Ansgar’s "Self Types." By using this brilliant technique we ended up with a smaller, cleaner code base that is easier to maintain.
Here are some numbers, comparing this release with the previous one:
|Release||Lines of code||Tests||Code coverage|
Please note that 1.4 has more features than 1.3 and yet the code base is 35% smaller!
- [FEST-378] - Newly added assertThat(Iterable<?> actual) eagerly calls iterator() and can throw an NPE
- [FEST-402] - onProperty is unable to access properties from Object class
- [FEST-414] - Impossible to use Fest Assert 1.3 with Ivy
- [FEST-415] - IteratorAssert should delay Iterator comsumption as much as possible
- [FEST-416] - NPE in MapAssert due to FEST-329
- [FEST-105] - Add isEither, or isOneOf
- [FEST-413] - Implement Ansgar's Self Types
- [FEST-423] - User-friendly date and calendar formatting
- [FEST-111] - Add support for regular expression matching to StringAssert
- [FEST-381] - collection onProperty() assert might give nicer exceptions
- [FEST-400] - Add generic assertions isIn / isNotIn
Here are some useful links:
Feedback is always appreciated :)
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)