Skip to content

Commit 1ba729f

Browse files
Merge pull request #19 from SlicingDice/feature/fix-slicingdice-java-tests
Fix comparison of test results
2 parents b2f10a6 + 77bc2b0 commit 1ba729f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/java/com/slicingdice/jslicer/SlicingDiceTester.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,8 @@ private void compareResult(final JSONObject expectedObject, final String queryTy
291291

292292
testFailed = true;
293293
} else {
294-
if(!this.compareJson(expected.getJSONObject(keyStr),
295-
result.getJSONObject(keyStr))) {
294+
if(!this.compareJsonValue(expected.get(keyStr),
295+
result.get(keyStr))) {
296296
// try second time
297297
if (testSecondTime(expectedObject, queryType, expected, keyStr)) {
298298
continue;
@@ -337,7 +337,7 @@ private boolean testSecondTime(final JSONObject expectedObject, final String que
337337
}
338338
final JSONObject secondResult = this.executeQuery(queryType, expectedObject);
339339

340-
if (this.compareJson(expected.getJSONObject(key),secondResult.getJSONObject(key))) {
340+
if (this.compareJsonValue(expected.get(key),secondResult.get(key))) {
341341
System.out.println("\tPassed at second try!");
342342
this.numberOfSuccesses += 1;
343343
System.out.println("\tStatus: Passed\n");

0 commit comments

Comments
 (0)