コード例 #1
0
  public static void assertJsonEquals(String expectedJson, String actualJson) {
    try {
      JSONCompareResult result =
          JSONCompare.compareJSON(expectedJson, actualJson, JSONCompareMode.NON_EXTENSIBLE);

      if (result.failed()) {
        throw new AssertionError(result.getMessage() + "; Actual: " + actualJson);
      }
    } catch (JSONException e) {
      Exceptions.<RuntimeException>sneakyThrow(e);
    }
  }