Class SpockComparisonFailure

  • All Implemented Interfaces:
    java.io.Serializable

    public class SpockComparisonFailure
    extends org.junit.ComparisonFailure
    Thrown when a condition of the form 'expr1 == expr2' fails. Inherits from JUnit's ComparisonFailure (rather than ConditionNotSatisfiedError) to enable IDE support for diff'ing actual and expected values.
    Author:
    Peter Niederwieser
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SpockComparisonFailure​(Condition condition, java.lang.String expected, java.lang.String actual)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Condition getCondition()  
      java.lang.String getMessage()  
      java.lang.String toString()  
      • Methods inherited from class org.junit.ComparisonFailure

        getActual, getExpected
      • Methods inherited from class java.lang.Throwable

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

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

      • SpockComparisonFailure

        public SpockComparisonFailure​(Condition condition,
                                      java.lang.String expected,
                                      java.lang.String actual)
    • Method Detail

      • getCondition

        public Condition getCondition()
      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class org.junit.ComparisonFailure
      • toString

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