@Override public SELF isNotEqualTo(Object other) { return super.isNotEqualTo(other); }
@Override public SELF isNotEqualTo(Object other) { return super.isNotEqualTo(other); }
/** * Verifies that the actual value is not equal to the given one <b>in actual's {@link DateTimeZone}</b>. * <p> * Example : * <pre><code class='java'> assertThat(new DateTime("2000-01-01")).isNotEqualTo(new DateTime("2000-01-15"));</code></pre> * * @param expected the given value to compare the actual value to. * @return {@code this} assertion object. * @throws AssertionError if the actual {@code DateTime} is equal to the {@link DateTime} in the actual DateTime's * DateTimeZone. */ public DateTimeAssert isNotEqualTo(DateTime expected) { // if actual is null, we don't really care about DateTimeZone DateTime other = actual == null ? expected : new DateTime(expected, actual.getZone()); return super.isNotEqualTo(other); }
/** * Verifies that the actual value is not equal to the given one <b>in the actual ZonedDateTime's java.time.ZoneId</b>. * <p> * Example : * * <pre><code class='java'> * assertThat(ZonedDateTime.parse("2000-01-01T00:00:00Z")).isNotEqualTo(ZonedDateTime.parse("2000-01-15T00:00:00Z")); * </code></pre> * * @param expected the given value to compare the actual value to. * @return {@code this} assertion object. * @throws AssertionError if the actual {@code ZonedDateTime} is equal to the {@link ZonedDateTime} in the actual * ZonedDateTime's java.time.ZoneId. */ public S isNotEqualTo(ZonedDateTime expected) { return super.isNotEqualTo(expected.withZoneSameInstant(actual.getZone())); }
/** * Same assertion as {@link #isNotEqualTo(ZonedDateTime)} but the {@link ZonedDateTime} is built from given String, * which must follow <a * href="http://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ISO_DATE_TIME" * >ISO date-time format</a> to allow calling {@link ZonedDateTime#parse(CharSequence, DateTimeFormatter)} method. * <p> * Note that the {@link ZonedDateTime} created from the given String is built in the {@link java.time.ZoneId} of the * {@link ZonedDateTime} to check.. {@link ZonedDateTime}. * <p> * Example : * * <pre><code class='java'> * // use directly String in comparison to avoid writing the code to perform the conversion * assertThat(ZonedDateTime.parse("2000-01-01T00:00:00Z")).isNotEqualTo("2000-01-15T00:00:00Z"); * </code></pre> * * @param dateTimeAsString String representing a {@link ZonedDateTime}. * @return this assertion object. * @throws AssertionError if the actual {@code ZonedDateTime} is {@code null}. * @throws IllegalArgumentException if given String is null or can't be converted to a {@link ZonedDateTime}. * @throws AssertionError if the actual {@code ZonedDateTime} is equal to the {@link ZonedDateTime} built from given * String. */ public S isNotEqualTo(String dateTimeAsString) { assertDateTimeAsStringParameterIsNotNull(dateTimeAsString); return super.isNotEqualTo(parseStringAsIsoDateTimeAndMoveToZoneSameActual(dateTimeAsString)); }