public class GraniteAssert extends Object
Constructor and Description |
---|
GraniteAssert() |
Modifier and Type | Method and Description |
---|---|
static void |
assertIsAgentEnabled(CQClient client,
String agentPath)
Checks if an replication agent is enabled.
|
static void |
assertJsonEquals(String jsonString1,
String jsonString2)
Compares two json strings for equality in terms of structure and data.
|
static void |
assertJsonEquals(String jsonString1,
String jsonString2,
List<String> ignoreProperties)
Compares two json strings for equality in terms of structure and data.
|
static void |
assertJsonEquals(String jsonStringExpected,
String jsonStringActual,
List<String> ignoreProperties,
List<String> ignoreNodes)
Compares two json strings for equality in terms of structure and data.
|
static void |
assertJsonEquals(String jsonStringExpected,
String jsonStringActual,
List<String> ignoreProperties,
List<String> ignoreNodes,
boolean ignoreOrderOfProperties)
Compares two json strings for equality in terms of structure and data.
|
static void |
assertRegExFind(String toValidate,
Pattern pattern) |
static void |
assertRegExFind(String toValidate,
String pattern) |
static void |
assertRegExFind(String message,
String toValidate,
Pattern pattern) |
static void |
assertRegExFind(String message,
String toValidate,
String pattern) |
static void |
assertRegExMatch(String toValidate,
Pattern pattern) |
static void |
assertRegExMatch(String toValidate,
String pattern) |
static void |
assertRegExMatch(String message,
String toValidate,
Pattern pattern) |
static void |
assertRegExMatch(String message,
String toValidate,
String pattern) |
static void |
assertRegExNoFind(String message,
String toValidate,
Pattern pattern) |
static void |
assertRegExNoMatch(String message,
String toValidate,
Pattern pattern) |
static void |
assertStatusCode(org.apache.http.HttpResponse httpResponse,
int statusCode) |
static void |
assertStatusCode(org.apache.http.HttpResponse httpResponse,
int[] statusCodes) |
static void |
assertStatusCode(String message,
org.apache.http.HttpResponse httpResponse,
int statusCode) |
static void |
assertStatusCode(String message,
org.apache.http.HttpResponse httpResponse,
int[] statusCodes) |
public static void assertRegExMatch(String message, String toValidate, String pattern)
public static void assertRegExMatch(String message, String toValidate, Pattern pattern)
public static void assertRegExNoMatch(String message, String toValidate, Pattern pattern)
public static void assertRegExFind(String message, String toValidate, String pattern)
public static void assertRegExFind(String message, String toValidate, Pattern pattern)
public static void assertRegExNoFind(String message, String toValidate, Pattern pattern)
public static void assertStatusCode(org.apache.http.HttpResponse httpResponse, int statusCode)
public static void assertStatusCode(String message, org.apache.http.HttpResponse httpResponse, int statusCode)
public static void assertStatusCode(org.apache.http.HttpResponse httpResponse, int[] statusCodes)
public static void assertStatusCode(String message, org.apache.http.HttpResponse httpResponse, int[] statusCodes)
public static void assertJsonEquals(String jsonString1, String jsonString2, List<String> ignoreProperties)
There are some properties, like the lastModified property, that make it hard to compare against a reference. In this case you can feed in a list of of such properties, and they are ignored during comparison.
jsonString1
- expectedjsonString2
- actualignoreProperties
- properties to be ignoredpublic static void assertJsonEquals(String jsonStringExpected, String jsonStringActual, List<String> ignoreProperties, List<String> ignoreNodes)
There are some properties, like the lastModified property, that make it hard to compare against a reference. In this case you can feed in a list of of such properties, and they are ignored during comparison.
jsonStringExpected
- expectedjsonStringActual
- actualignoreProperties
- properties to be ignoredignoreNodes
- nodes to be ignoredpublic static void assertJsonEquals(String jsonStringExpected, String jsonStringActual, List<String> ignoreProperties, List<String> ignoreNodes, boolean ignoreOrderOfProperties)
There are some properties, like the lastModified property, that make it hard to compare against a reference. In this case you can feed in a list of of such properties, and they are ignored during comparison.
jsonStringExpected
- expectedjsonStringActual
- actualignoreProperties
- properties to be ignoredignoreNodes
- nodes to be ignoredignoreOrderOfProperties
- ignore the order of propertiespublic static void assertJsonEquals(String jsonString1, String jsonString2)
jsonString1
- first stringjsonString2
- second stringCopyright © 2018. All rights reserved.