Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1878] Update
SystemTestUtil::assertJson
to compare Json objects i…
…nstead of line-by-line analysis (#2087) `SystemTestUtil::assertJson` currently checks if two JSON files are equal by comparing the file contents line by line rather than by converting the files directly into JSON objects, which can then be directly compared using the built-in `equals` methods for `JsonElement`. This process also does not automatically check if the file is indeed a JSON file, and implicitly assumes that the input paths are paths to JSON files. This may cause expected behaviours if a user accidentally or intentionally includes a path to a non-JSON file within the method calls. Let's move to refactor the code, and utilise the built-in methods for `JsonElement` objects to check for the equality of JSON objects.
- Loading branch information