org.skyscreamer.jsonassert
Class JSONCompareResult

java.lang.Object
  extended by org.skyscreamer.jsonassert.JSONCompareResult

public class JSONCompareResult
extends java.lang.Object

Bean for holding results from JSONCompare.


Constructor Summary
JSONCompareResult()
          Default constructor.
 
Method Summary
protected  void fail(java.lang.String message)
          Identify that the comparison failed
protected  void fail(java.lang.String field, java.lang.Object expected, java.lang.Object actual)
          Identify that the comparison failed
 boolean failed()
          Did the comparison fail?
 java.lang.String getMessage()
          Result message
 boolean passed()
          Did the comparison pass?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONCompareResult

public JSONCompareResult()
Default constructor.

Method Detail

passed

public boolean passed()
Did the comparison pass?

Returns:
True if it passed

failed

public boolean failed()
Did the comparison fail?

Returns:
True if it failed

getMessage

public java.lang.String getMessage()
Result message

Returns:
String explaining why if the comparison failed

fail

protected void fail(java.lang.String message)
Identify that the comparison failed

Parameters:
message - String explaining why if the comparison failed

fail

protected void fail(java.lang.String field,
                    java.lang.Object expected,
                    java.lang.Object actual)
Identify that the comparison failed

Parameters:
field - Which field failed
expected - Expected result
actual - Actual result