Top Description Fields Constructors Methods
org.assertj.core.error

public Class ShouldBeEqualWithTimePrecision

extends BasicErrorMessageFactory
Class Inheritance
Imports
java.util.Date, java.util.concurrent.TimeUnit

Creates an AssertionError indicating that an assertion that verifies that two dates are equals up to a given precision failed.
Authors
William Delanoue, Joel Costigliola

Field Summary

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
argumentsformatformatter

Constructor Summary

AccessConstructor and Description
private
ShouldBeEqualWithTimePrecision(Date actual, Date expected, TimeUnit precision)

Method Summary

Modifier and TypeMethod and Description
private static String
public static ErrorMessageFactory

Returns:

the created AssertionErrorFactory.
shouldBeEqual
(Date
the actual value in the failed assertion.
actual
,
Date
the expected value in the failed assertion.
expected
,
TimeUnit
the TimeUnit used to compare actual with expected.
precision
)

Creates a new org.assertj.core.error.ShouldBeEqualWithTimePrecision.

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
createcreatecreateequalshashCodetoStringunquotedString

Constructor Detail

ShouldBeEqualWithTimePrecisionback to summary
private ShouldBeEqualWithTimePrecision(Date actual, Date expected, TimeUnit precision)

Method Detail

buildErrorMessageTemplateback to summary
private static String buildErrorMessageTemplate(final TimeUnit precision)
shouldBeEqualback to summary
public static ErrorMessageFactory shouldBeEqual(Date actual, Date expected, TimeUnit precision)

Creates a new org.assertj.core.error.ShouldBeEqualWithTimePrecision.

Parameters
actual:Date

the actual value in the failed assertion.

expected:Date

the expected value in the failed assertion.

precision:TimeUnit

the TimeUnit used to compare actual with expected.

Returns:ErrorMessageFactory

the created AssertionErrorFactory.