Class ShouldBeBeforeYear

  • All Implemented Interfaces:
    ErrorMessageFactory

    public class ShouldBeBeforeYear
    extends BasicErrorMessageFactory
    Creates an error message indicating that an assertion that verifies that a Date is before given year failed.
    Author:
    Joel Costigliola
    • Constructor Detail

      • ShouldBeBeforeYear

        private ShouldBeBeforeYear​(Date actual,
                                   int year,
                                   org.assertj.core.internal.ComparisonStrategy comparisonStrategy)
    • Method Detail

      • shouldBeBeforeYear

        public static ErrorMessageFactory shouldBeBeforeYear​(Date actual,
                                                             int year,
                                                             org.assertj.core.internal.ComparisonStrategy comparisonStrategy)
        Creates a new ShouldBeBeforeYear.
        Parameters:
        actual - the actual value in the failed assertion.
        year - the year to compare the actual date's year to.
        comparisonStrategy - the ComparisonStrategy used.
        Returns:
        the created ErrorMessageFactory.
      • shouldBeBeforeYear

        public static ErrorMessageFactory shouldBeBeforeYear​(Date actual,
                                                             int year)
        Creates a new ShouldBeBeforeYear.
        Parameters:
        actual - the actual value in the failed assertion.
        year - the year to compare the actual date's year to.
        Returns:
        the created ErrorMessageFactory.