Class ShouldBeAfterYear

  • All Implemented Interfaces:
    ErrorMessageFactory

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

      • ShouldBeAfterYear

        private ShouldBeAfterYear​(Date actual,
                                  int year,
                                  ComparisonStrategy comparisonStrategy)
    • Method Detail

      • shouldBeAfterYear

        public static ErrorMessageFactory shouldBeAfterYear​(Date actual,
                                                            int year,
                                                            ComparisonStrategy comparisonStrategy)
        Creates a new ShouldBeAfterYear.
        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.
      • shouldBeAfterYear

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