New releases : Fest assertion generator Eclipse plugin / Fest assertions for Joda Time 1.1.0

56 views
Skip to first unread message

Joel Costigliola

unread,
Feb 13, 2013, 9:28:06 AM2/13/13
to easyt...@googlegroups.com
Hi all,

Fest Eclipse plugin has been released few days ago, it allows you to generate easily assertions specific to your classes.
See the documentation here : http://joel-costigliola.github.com/fest-eclipse-plugin/
For maven users, we provide a maven plugin to generate assertions.

Second announce is the release of version 1.1.0 of Fest assertions for Joda Time, it is now available in maven central repository.
project and doc : https://github.com/joel-costigliola/fest-joda-time-assert.

One can now compare DateTime and LocalDateTime ignoring millisecond to hour fields in comparison, see the examples below :

  // comparing DateTime ignoring milliseconds.
  DateTime dateTime1 = new DateTime(2000, 1, 1, 0, 0, 1, 0, UTC);
  DateTime dateTime2 = new DateTime(2000, 1, 1, 0, 0, 1, 456, UTC);
  assertThat(dateTime1).isEqualToIgnoringMillis(dateTime2); // OK

  // comparing DateTime ignoring hours, minutes, seconds and milliseconds.
  DateTime dateTime1 = new DateTime(2000, 1, 1, 23, 59, 59, 999);
  DateTime dateTime2 = new DateTime(2000, 1, 1, 00, 00, 00, 000);
  assertThat(dateTime1).isEqualToIgnoringHours(dateTime2); // OK

maven coordinates :

<dependency>
   <groupId>org.easytesting</groupId>
   <artifactId>fest-joda-time-assert</artifactId>
   <version>1.1.0</version>
</dependency>


Have good assertions !

Joel
Reply all
Reply to author
Forward
0 new messages