public class HelperApiUtil extends Object
| Constructor and Description |
|---|
HelperApiUtil() |
| 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.
|
static void |
verifyCSVSON(io.restassured.response.ValidatableResponse validatableResponse,
String path,
List<String> csvson,
org.skyscreamer.jsonassert.JSONCompareMode mode,
io.cucumber.java.Scenario scenario)
Verify csvson.
|
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 actualjsonpublic static void assertXMLEquals(String expectedXML, String actualXML) throws Exception
expectedXML - the expected xmlactualXML - the actual xmlException - the exceptionpublic static void verifyCSVSON(io.restassured.response.ValidatableResponse validatableResponse,
String path,
List<String> csvson,
org.skyscreamer.jsonassert.JSONCompareMode mode,
io.cucumber.java.Scenario scenario)
throws Exception
validatableResponse - the validatable responsepath - the pathcsvson - the csvsonmode - the modescenario - the scenarioException - the exceptionCopyright © 2021. All rights reserved.