public class HelperUtil extends Object
| Constructor and Description |
|---|
HelperUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertJSONObject(String resource,
String jsonRequestExpected,
String jsonRequestActual)
Assert json object.
|
static void |
assertJsonpathEqual(List<String> jsonPath,
String expectedjson,
String actualjson)
Assert jsonpath equal.
|
static void |
assertXMLEquals(String expectedXML,
String actualXML)
Assert xml equals.
|
static void |
assertXpathsEqual(List<String> xpaths,
String expectedXML,
String actualXML)
Assert xpaths equal.
|
static Object |
getJSON(String jsonString,
String path)
Get json object.
|
static String |
readFileAsString(String fileBody)
Read file as string string.
|
public static String readFileAsString(String fileBody)
fileBody - the file bodypublic static void assertXpathsEqual(List<String> xpaths, String expectedXML, String actualXML) throws Exception
xpaths - the xpathsexpectedXML - the expected xmlactualXML - the actual xmlException - the exceptionpublic static Object getJSON(String jsonString, String path)
jsonString - the json stringpath - the pathpublic static void assertJSONObject(String resource, String jsonRequestExpected, String jsonRequestActual)
resource - the resourcejsonRequestExpected - the json request expectedjsonRequestActual - the json request actualpublic static void assertJsonpathEqual(List<String> jsonPath, String expectedjson, String actualjson)
jsonPath - the json pathexpectedjson - the expectedjsonactualjson - the actualjsonCopyright © 2021. All rights reserved.