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

public Class ShouldBeBeforeYear

extends BasicErrorMessageFactory
Class Inheritance
Imports
java.util.Date, org.assertj.core.internal.ComparisonStrategy, .StandardComparisonStrategy

Creates an error message indicating that an assertion that verifies that a Date is before given year failed.
Author
Joel Costigliola

Field Summary

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

Constructor Summary

AccessConstructor and Description
private
ShouldBeBeforeYear(Date actual, int year, ComparisonStrategy comparisonStrategy)

Method Summary

Modifier and TypeMethod and Description
public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldBeBeforeYear
(Date
the actual value in the failed assertion.
actual
,
int
the year to compare the actual date's year to.
year
,
ComparisonStrategy comparisonStrategy)

Creates a new ShouldBeBeforeYear.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldBeBeforeYear
(Date
the actual value in the failed assertion.
actual
,
int
the year to compare the actual date's year to.
year
)

Creates a new ShouldBeBeforeYear.

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

Constructor Detail

ShouldBeBeforeYearback to summary
private ShouldBeBeforeYear(Date actual, int year, ComparisonStrategy comparisonStrategy)

Method Detail

shouldBeBeforeYearback to summary
public static ErrorMessageFactory shouldBeBeforeYear(Date actual, int year, ComparisonStrategy comparisonStrategy)

Creates a new ShouldBeBeforeYear.

Parameters
actual:Date

the actual value in the failed assertion.

year:int

the year to compare the actual date's year to.

comparisonStrategy:ComparisonStrategy

the ComparisonStrategy used.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldBeBeforeYearback to summary
public static ErrorMessageFactory shouldBeBeforeYear(Date actual, int year)

Creates a new ShouldBeBeforeYear.

Parameters
actual:Date

the actual value in the failed assertion.

year:int

the year to compare the actual date's year to.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.