mirror of https://github.com/OpenVidu/openvidu.git
openvidu-test-browsers: fix CustomHttpClient response check
parent
63a6261d88
commit
b479cb2bac
|
@ -138,14 +138,14 @@ public class CustomHttpClient {
|
||||||
JsonObject jsonObjActual = json.get(entry.getKey()).getAsJsonObject();
|
JsonObject jsonObjActual = json.get(entry.getKey()).getAsJsonObject();
|
||||||
// COMPARE
|
// COMPARE
|
||||||
|
|
||||||
} catch (JsonSyntaxException e1) {
|
} catch (Exception e1) {
|
||||||
try {
|
try {
|
||||||
JsonArray jsonArrayExpected = JsonParser.parseString((String) value).getAsJsonArray();
|
JsonArray jsonArrayExpected = JsonParser.parseString((String) value).getAsJsonArray();
|
||||||
JsonArray jsonArrayActual = json.get(entry.getKey()).getAsJsonArray();
|
JsonArray jsonArrayActual = json.get(entry.getKey()).getAsJsonArray();
|
||||||
// COMPARE
|
// COMPARE
|
||||||
|
|
||||||
} catch (JsonSyntaxException e2) {
|
} catch (Exception e2) {
|
||||||
if (((String) value) != json.get(entry.getKey()).getAsString()) {
|
if (!((String) value).equals(json.get(entry.getKey()).getAsString())) {
|
||||||
throw new Exception("JSON field " + entry.getKey() + " has not expected value. Expected: "
|
throw new Exception("JSON field " + entry.getKey() + " has not expected value. Expected: "
|
||||||
+ value + ". Actual: " + json.get(entry.getKey()).getAsString());
|
+ value + ". Actual: " + json.get(entry.getKey()).getAsString());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue