Package org.assertj.core.error
Class ShouldBeEqualWithTimePrecision
java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
org.assertj.core.error.ShouldBeEqualWithTimePrecision
- All Implemented Interfaces:
ErrorMessageFactory
Creates an
AssertionError
indicating that an assertion that verifies that two dates are equals
up to a given precision failed.-
Field Summary
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format, formatter
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ShouldBeEqualWithTimePrecision
(Date actual, Date expected, TimeUnit precision) -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
buildErrorMessageTemplate
(TimeUnit precision) static ErrorMessageFactory
shouldBeEqual
(Date actual, Date expected, TimeUnit precision) Creates a new
.ShouldBeEqualWithTimePrecision
Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
Constructor Details
-
ShouldBeEqualWithTimePrecision
-
-
Method Details
-
shouldBeEqual
Creates a new
.ShouldBeEqualWithTimePrecision
- Parameters:
actual
- the actual value in the failed assertion.expected
- the expected value in the failed assertion.precision
- theTimeUnit
used to compare actual with expected.- Returns:
- the created
AssertionErrorFactory
.
-
buildErrorMessageTemplate
-