public class SqlHelper extends Object
| Constructor and Description |
|---|
SqlHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
configMapSqlKeyValues(ResultSet resSet,
String keyValue)
map key value to config eg.features.features.id:1:<$id>
|
static boolean |
isValidJson(String expected)
is valid json based on key:value string splits the string by ":" Then
validates if "value" is valid json
|
static void |
saveOutboundJsonParameters(io.restassured.response.Response response,
String outputParam)
replaces output parameter with response values eg.
|
static void |
saveOutboundSQLParameters(ResultSet resSet,
String outputParam)
replaces output parameter with response values eg.
|
static String |
setRandomRowValue(ResultSet resSet,
String outputParam)
replaces RAND_DatabaseMaxRows variable with random number
|
static void |
validateByJsonBody(String expectedJson,
ResultSet resSet)
validates expected json string against json body from response
|
static List<String> |
validateSqlKeywords(List<KeyValue> keywords,
ResultSet resSet)
* validates the maps agains the keyword requirements matcher.
|
public static void saveOutboundJsonParameters(io.restassured.response.Response response,
String outputParam)
response - outputParam - public static void saveOutboundSQLParameters(ResultSet resSet, String outputParam) throws Exception
response - outputParam - Exceptionpublic static void configMapSqlKeyValues(ResultSet resSet, String keyValue) throws Exception
response - keyValue - SQLExceptionNumberFormatExceptionExceptionpublic static String setRandomRowValue(ResultSet resSet, String outputParam) throws SQLException
resSet - outputParam - SQLExceptionpublic static List<String> validateSqlKeywords(List<KeyValue> keywords, ResultSet resSet) throws SQLException
keywords - response - SQLExceptionpublic static void validateByJsonBody(String expectedJson, ResultSet resSet) throws SQLException
expectedJson - actualJson - SQLExceptionpublic static boolean isValidJson(String expected)
expected - Copyright © 2022. All rights reserved.