org.assertj.core.error
Class ShouldBeEqualWithTimePrecision

java.lang.Object
  extended by org.assertj.core.error.BasicErrorMessageFactory
      extended by org.assertj.core.error.ShouldBeEqualWithTimePrecision
All Implemented Interfaces:
ErrorMessageFactory

public class ShouldBeEqualWithTimePrecision
extends BasicErrorMessageFactory

Creates an AssertionError indicating that an assertion that verifies that two dates are equals up to a given precision failed.

Author:
William Delanoue, Joel Costigliola

Field Summary
 
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format
 
Method Summary
static ErrorMessageFactory shouldBeEqual(Date actual, Date expected, TimeUnit precision)
          Creates a new ShouldBeEqualWithTimePrecision.
 
Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, equals, hashCode, toString, unquotedString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

shouldBeEqual

public static ErrorMessageFactory shouldBeEqual(Date actual,
                                                Date expected,
                                                TimeUnit precision)
Creates a new ShouldBeEqualWithTimePrecision.

Parameters:
actual - the actual value in the failed assertion.
expected - the expected value in the failed assertion.
precision - the TimeUnit used to compare actual with expected.
Returns:
the created AssertionErrorFactory.


Copyright © 2013–2015 AssertJ. All rights reserved.