|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.skyscreamer.jsonassert.JSONCompareResult
public class JSONCompareResult
Bean for holding results from JSONCompare.
| Constructor Summary | |
|---|---|
JSONCompareResult()
Default constructor. |
|
| Method Summary | |
|---|---|
protected void |
fail(String message)
|
protected void |
fail(String field,
Object expected,
Object actual)
Identify that the comparison failed |
boolean |
failed()
Did the comparison fail? |
Object |
getActual()
Actual field value |
Object |
getExpected()
Expected field value |
String |
getField()
Dot-separated path the the field that failed comparison |
String |
getMessage()
Result message |
boolean |
isFailureOnField()
Check if comparison failed on a particular field |
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 |
|---|
public JSONCompareResult()
| Method Detail |
|---|
public boolean passed()
public boolean failed()
public String getMessage()
public Object getActual()
JSONObject, JSONArray or other Object
instance, or null if the comparison did not fail on a
particular fieldpublic Object getExpected()
JSONObject, JSONArray or other Object
instance, or null if the comparison did not fail on a
particular fieldpublic boolean isFailureOnField()
public String getField()
String instance, or null if the comparison did
not fail on a particular fieldprotected void fail(String message)
protected void fail(String field,
Object expected,
Object actual)
field - Which field failedexpected - Expected resultactual - Actual result
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||