public class JSONTestUtil extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static double | DEFAULT_DELTADefault delta used in numeric equality comparisons for floats and doubles. | 
| static boolean | failRepeatedKeys | 
| Constructor and Description | 
|---|
| JSONTestUtil() | 
| Modifier and Type | Method and Description | 
|---|---|
| static String | match(String input,
     String pathAndExpected)comparison using default delta | 
| static String | match(String input,
     String pathAndExpected,
     double delta) | 
| static String | match(String path,
     String input,
     String expected)comparison using default delta | 
| static String | match(String path,
     String input,
     String expected,
     double delta) | 
| static String | matchObj(String path,
        Object input,
        Object expected)comparison using default delta | 
| static String | matchObj(String path,
        Object input,
        Object expected,
        double delta) | 
public static final double DEFAULT_DELTA
public static boolean failRepeatedKeys
public static String match(String input, String pathAndExpected) throws Exception
ExceptionDEFAULT_DELTA, 
match(String,String,double)public static String match(String path, String input, String expected) throws Exception
ExceptionDEFAULT_DELTA, 
match(String,String,String,double)public static String matchObj(String path, Object input, Object expected) throws Exception
ExceptionDEFAULT_DELTA, 
matchObj(String,Object,Object,double)public static String match(String input, String pathAndExpected, double delta) throws Exception
input - JSON Structure to parse and test againstpathAndExpected - JSON path expression + '==' + expected valuedelta - tollerance allowed in comparing float/double valuesExceptionpublic static String match(String path, String input, String expected, double delta) throws Exception
path - JSON path expressioninput - JSON Structure to parse and test againstexpected - expected value of pathdelta - tollerance allowed in comparing float/double valuesExceptionCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.