Class BasicErrorMessageFactory

    • Field Detail

      • format

        protected final java.lang.String format
      • arguments

        protected final java.lang.Object[] arguments
    • Constructor Detail

      • BasicErrorMessageFactory

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

      • create

        public java.lang.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.
        Returns:
        the created error message.
      • create

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

        public java.lang.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 java.lang.CharSequence unquotedString​(java.lang.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.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object