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

public Class ShouldHaveDateField

extends BasicErrorMessageFactory
Class Inheritance
Imports
java.time.Month, java.time.temporal.Temporal, java.util.Date

Creates an error message indicating that an assertion that verifies that a Date has a year, month, day, ... failed.
Author
Joel Costigliola

Field Summary

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

Constructor Summary

AccessConstructor and Description
private
ShouldHaveDateField(Date actual, String fieldDescription, int fieldValue)

private
ShouldHaveDateField(Temporal actual, String fieldDescription, Object fieldValue)

Method Summary

Modifier and TypeMethod and Description
public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldHaveDateField
(Date
the actual value in the failed assertion.
actual
,
String
the fieldDescription of value : year, month, day, ...
fieldDescription
,
int
the field value used in the failed assertion to compare the actual date field value to.
fieldValue
)

Creates a new ShouldHaveDateField.

public static ErrorMessageFactory
shouldHaveDateField(Temporal actual, String fieldDescription, int fieldValue)

public static ErrorMessageFactory
Inherited from org.assertj.core.error.BasicErrorMessageFactory:
createcreatecreateequalshashCodetoStringunquotedString

Constructor Detail

ShouldHaveDateFieldback to summary
private ShouldHaveDateField(Date actual, String fieldDescription, int fieldValue)
ShouldHaveDateFieldback to summary
private ShouldHaveDateField(Temporal actual, String fieldDescription, Object fieldValue)

Method Detail

shouldHaveDateFieldback to summary
public static ErrorMessageFactory shouldHaveDateField(Date actual, String fieldDescription, int fieldValue)

Creates a new ShouldHaveDateField.

Parameters
actual:Date

the actual value in the failed assertion.

fieldDescription:String

the fieldDescription of value : year, month, day, ...

fieldValue:int

the field value used in the failed assertion to compare the actual date field value to.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldHaveDateFieldback to summary
public static ErrorMessageFactory shouldHaveDateField(Temporal actual, String fieldDescription, int fieldValue)
shouldHaveMonthback to summary
public static ErrorMessageFactory shouldHaveMonth(Temporal actual, Month month)