fix: change from JSONAssert to checking the similarity of JSONObjects

This commit is contained in:
simonh5 2023-10-12 21:09:27 -05:00
parent 228598ca84
commit e4aa7f1308

View File

@ -8,7 +8,6 @@ import static org.junit.Assert.*;
import org.json.*; import org.json.*;
import org.junit.Test; import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
/** /**
* Tests for org.json.JSONML.java * Tests for org.json.JSONML.java
@ -763,8 +762,7 @@ public class JSONMLTest {
final String xml = JSONML.toString(originalObject); final String xml = JSONML.toString(originalObject);
final JSONObject revertedObject = JSONML.toJSONObject(xml, false); final JSONObject revertedObject = JSONML.toJSONObject(xml, false);
final String newJson = revertedObject.toString(); final String newJson = revertedObject.toString();
assertTrue("JSON Objects are not similar",originalObject.similar(revertedObject)); assertTrue("original JSON does not equal the new JSON", originalObject.similar(revertedObject));
JSONAssert.assertEquals("original JSON does not equal the new JSON", originalJson, newJson, false);
} }
// these tests do not pass for the following reasons: // these tests do not pass for the following reasons: