Class BasicErrorMessageFactory

    • Constructor Detail

      • BasicErrorMessageFactory

        public BasicErrorMessageFactory​(String format,
                                        Object... arguments)
        Parameters:
        format - the format string.
        arguments - arguments referenced by the format specifiers in the format string.
    • Method Detail

      • create

        public String create​(Description d,
                             Representation representation)
        Creates a new error message as a result of a failed assertion.
        Specified by:
        create in interface ErrorMessageFactory
        Parameters:
        d - the description of the failed assertion.
        representation - the representation used
        Returns:
        the created error message.
      • create

        public String create()
        Creates a new error message as a result of a failed assertion without description.
        Specified by:
        create in interface ErrorMessageFactory
        Returns:
        the created error message.
      • unquotedString

        protected static CharSequence unquotedString​(String string)
        Return a string who will be unquoted in message format (without '')
        Parameters:
        string - the string who will be unquoted.
        Returns:
        an unquoted string in message format.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object