Class ShouldHaveSizeBetween

  • All Implemented Interfaces:
    ErrorMessageFactory

    public class ShouldHaveSizeBetween
    extends BasicErrorMessageFactory
    Creates an error message indicating that an assertion - that verifies that size of a value is between two given values - failed.
    Author:
    Martin Tarjányi
    • Constructor Detail

      • ShouldHaveSizeBetween

        private ShouldHaveSizeBetween​(Object actual,
                                      int actualSize,
                                      int lowerBoundary,
                                      int higherBoundary)
    • Method Detail

      • shouldHaveSizeBetween

        public static ErrorMessageFactory shouldHaveSizeBetween​(Object actual,
                                                                int actualSize,
                                                                int lowerBoundary,
                                                                int higherBoundary)
        Creates a new ShouldHaveSizeBetween.
        Parameters:
        actual - the actual value in the failed assertion.
        actualSize - the size of actual.
        lowerBoundary - the lower boundary compared to which actual size should be greater than or equal to.
        higherBoundary - the higher boundary compared to which actual size should be less than or equal to.
        Returns:
        the created ErrorMessageFactory.