Class Failures

  • All Implemented Interfaces:
    java.io.Serializable

    public final class Failures
    extends java.lang.AssertionError
    For the ObjectTester and other tester classes we need a chance to collect the thrown Assertions and throw it at the end of a combined or complex check.
    Since:
    1.0.3 (13.09.2010)
    Author:
    oliver
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Failures()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.Class<?> clazz, java.lang.AssertionError error)
      Adds the given class and error to the internal error colllection.
      java.util.Map<java.lang.Class<?>,​java.lang.AssertionError> getErrors()
      Gets the errors.
      java.lang.String getMessage()
      Gets the message.
      boolean hasErrors()
      Checks for errors.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Failures

        public Failures()
    • Method Detail

      • add

        public void add​(java.lang.Class<?> clazz,
                        java.lang.AssertionError error)
        Adds the given class and error to the internal error colllection.
        Parameters:
        clazz - the clazz
        error - the error
      • getErrors

        public java.util.Map<java.lang.Class<?>,​java.lang.AssertionError> getErrors()
        Gets the errors.
        Returns:
        the errors
      • hasErrors

        public boolean hasErrors()
        Checks for errors.
        Returns:
        true, if successful
      • getMessage

        public java.lang.String getMessage()
        Gets the message.
        Overrides:
        getMessage in class java.lang.Throwable
        Returns:
        the message
        See Also:
        Throwable.getMessage()