测试constrcutDefaultComparator方法
()
| 111 | * 测试constrcutDefaultComparator方法 |
| 112 | */ |
| 113 | @Test |
| 114 | public void diff7() { |
| 115 | String str1 = "{\"a\":null}"; |
| 116 | String str2 = "{\"a\":[1,2,3]}"; |
| 117 | JsonElement a = new JsonParser().parse(str1); |
| 118 | JsonElement b = new JsonParser().parse(str2); |
| 119 | List<String> specialPath = new ArrayList<>(); |
| 120 | List<Result> diff1 = new Diff().withNoisePahList(null).withSpecialPath(specialPath) |
| 121 | .withObjectComparator(new SimpleObjectComparator()).diffElement(a, b); |
| 122 | List<Result> diff2 = new Diff().withNoisePahList(null).withSpecialPath(specialPath) |
| 123 | .withArrayComparator(new SimilarArrayComparator()).diffElement(a, b); |
| 124 | assertEquals(ResultConvertUtil.TYPE_MODIFY, diff1.get(0).getDiffType()); |
| 125 | assertEquals(ResultConvertUtil.TYPE_MODIFY, diff2.get(0).getDiffType()); |
| 126 | } |
| 127 | } |
nothing calls this directly
no test coverage detected