Class ShouldNotBeEmpty

  • All Implemented Interfaces:
    ErrorMessageFactory

    public class ShouldNotBeEmpty
    extends BasicErrorMessageFactory
    Creates an error message indicating that an assertion that verifies a group of elements is not empty failed. A group of elements can be a collection, an array, a String, a File or a Path.
    Author:
    Alex Ruiz
    • Constructor Detail

      • ShouldNotBeEmpty

        private ShouldNotBeEmpty​(String format,
                                 Object... arguments)
    • Method Detail

      • shouldNotBeEmpty

        public static ErrorMessageFactory shouldNotBeEmpty()
        Returns the singleton instance of this class.
        Returns:
        the singleton instance of this class.
      • shouldNotBeEmpty

        public static ErrorMessageFactory shouldNotBeEmpty​(File actual)
        Creates a new ShouldNotBeEmpty.
        Parameters:
        actual - the actual file in the failed assertion.
        Returns:
        the created ErrorMessageFactory.
      • shouldNotBeEmpty

        public static ErrorMessageFactory shouldNotBeEmpty​(Path actual)
        Creates a new ShouldNotBeEmpty.
        Parameters:
        actual - the actual path in the failed assertion.
        Returns:
        the created ErrorMessageFactory.