org.skyscreamer.jsonassert
Class ValueMatcherException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.skyscreamer.jsonassert.ValueMatcherException
All Implemented Interfaces:
Serializable

public class ValueMatcherException
extends RuntimeException

Exception that may be thrown by ValueMatcher subclasses to provide more detail on why matches method failed.

Author:
Duncan Mackinder
See Also:
Serialized Form

Constructor Summary
ValueMatcherException(String message, String expected, String actual)
          Create new ValueMatcherException
ValueMatcherException(String message, Throwable cause, String expected, String actual)
          Create new ValueMatcherException
 
Method Summary
 String getActual()
           
 String getExpected()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, 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

ValueMatcherException

public ValueMatcherException(String message,
                             String expected,
                             String actual)
Create new ValueMatcherException

Parameters:
message - description of exception
expected - value expected by ValueMatcher
actual - value being tested by ValueMatcher

ValueMatcherException

public ValueMatcherException(String message,
                             Throwable cause,
                             String expected,
                             String actual)
Create new ValueMatcherException

Parameters:
message - description of exception
cause - cause of ValueMatcherException
expected - value expected by ValueMatcher
actual - value being tested by ValueMatcher
Method Detail

getExpected

public String getExpected()
Returns:
the expected value

getActual

public String getActual()
Returns:
the actual value


Copyright © 2014. All Rights Reserved.