Class ShouldBeBetween

  • All Implemented Interfaces:
    ErrorMessageFactory

    public class ShouldBeBetween
    extends BasicErrorMessageFactory
    Creates an error message indicating that an assertion that verifies that a Date is between start - end dates (inclusive or not) failed.
    Author:
    Joel Costigliola
    • Method Detail

      • shouldBeBetween

        public static ErrorMessageFactory shouldBeBetween​(java.util.Date actual,
                                                          java.util.Date start,
                                                          java.util.Date end,
                                                          boolean inclusiveStart,
                                                          boolean inclusiveEnd,
                                                          ComparisonStrategy comparisonStrategy)
        Creates a new ShouldBeBetween.
        Parameters:
        actual - the actual value in the failed assertion.
        start - the lower boundary of date period.
        end - the lower boundary of date period.
        inclusiveStart - wether to include start date in period.
        inclusiveEnd - wether to include end date in period.
        comparisonStrategy - the ComparisonStrategy used to evaluate assertion.
        Returns:
        the created ErrorMessageFactory.
      • shouldBeBetween

        public static ErrorMessageFactory shouldBeBetween​(java.util.Date actual,
                                                          java.util.Date start,
                                                          java.util.Date end,
                                                          boolean inclusiveStart,
                                                          boolean inclusiveEnd)
        Creates a new ShouldBeBetween.
        Parameters:
        actual - the actual value in the failed assertion.
        start - the lower boundary of date period.
        end - the lower boundary of date period.
        inclusiveStart - wether to include start date in period.
        inclusiveEnd - wether to include end date in period.
        Returns:
        the created ErrorMessageFactory.