package com.xiaomai.utils;


import org.json.JSONException;
import org.skyscreamer.jsonassert.JSONAssert;


public class AssertforJson {
    public static void assertResult(String result, String CaseName, boolean strict) {
        JsonAndFile.WriteStringToFile(result,CaseName);
        String expected = JsonAndFile.readFileToString(CaseName);
        try {
            JSONAssert.assertEquals(expected, result, strict);
        } catch (JSONException e) {
            e.printStackTrace();
        }
    }
}
