// Should reflect java.util.Comparator specification public void test_should_returns_a_positive_integer_as_the_first_argument_is_greater_than_the_second() { Date d1 = Dates.newDate(2010, 1, 1, 10, 0, 1); Date d2 = Dates.newDate(2010, 1, 1, 10, 0, 0); assertTrue(Dates.differenceSeconds(d1, d2) > 0); }
// Should reflect java.util.Comparator specification public void test_should_returns_a_negative_integer_if_the_first_argument_is_less_than_the_second() { Date d1 = Dates.newDate(2010, 1, 1, 10, 0, 0); Date d2 = Dates.newDate(2010, 1, 1, 10, 0, 1); assertTrue(Dates.differenceSeconds(d1, d2) < 0); }