public class ShouldBeCloseTo extends BasicErrorMessageFactory
Date
is close to another one from some delta
failed.arguments, format, formatter
Modifier | Constructor and Description |
---|---|
private |
ShouldBeCloseTo(java.util.Date actual,
java.util.Date other,
long deltaInMilliseconds,
long difference) |
private |
ShouldBeCloseTo(java.time.temporal.Temporal actual,
java.time.temporal.Temporal other,
java.lang.String differenceDescription) |
Modifier and Type | Method and Description |
---|---|
static ErrorMessageFactory |
shouldBeCloseTo(java.util.Date actual,
java.util.Date other,
long deltaInMilliseconds,
long difference)
Creates a new
. |
static ErrorMessageFactory |
shouldBeCloseTo(java.time.temporal.Temporal actual,
java.time.temporal.Temporal other,
java.lang.String differenceDescription)
Creates a new
. |
create, create, create, equals, hashCode, toString, unquotedString
private ShouldBeCloseTo(java.util.Date actual, java.util.Date other, long deltaInMilliseconds, long difference)
private ShouldBeCloseTo(java.time.temporal.Temporal actual, java.time.temporal.Temporal other, java.lang.String differenceDescription)
public static ErrorMessageFactory shouldBeCloseTo(java.util.Date actual, java.util.Date other, long deltaInMilliseconds, long difference)
ShouldBeCloseTo
.actual
- the actual value in the failed assertion.other
- the value used in the failed assertion to compare the actual value to.deltaInMilliseconds
- the delta used for date comparison, expressed in milliseconds.difference
- the difference in milliseconds between actual and other dates.ErrorMessageFactory
.public static ErrorMessageFactory shouldBeCloseTo(java.time.temporal.Temporal actual, java.time.temporal.Temporal other, java.lang.String differenceDescription)
ShouldBeCloseTo
.actual
- the actual value in the failed assertion.other
- the value used in the failed assertion to compare the actual value to.differenceDescription
- detailed difference description message.ErrorMessageFactory
.