MCPcopy Index your code
hub / github.com/LianjiaTech/json-diff / diff4

Method diff4

src/test/java/com/ke/diff/diff/DiffTest.java:65–74  ·  view source on GitHub ↗

测试withSpecialPath withAlgorithmEnum withA withB方法

()

Source from the content-addressed store, hash-verified

63 * 测试withSpecialPath withAlgorithmEnum withA withB方法
64 */
65 @Test
66 public void diff4() {
67 String str1 = "{\"a\":null}";
68 String str2 = "{\"a\":\"\"}";
69 JsonElement a = new JsonParser().parse(str1);
70 JsonElement b = new JsonParser().parse(str2);
71 List<String> specialPath = new ArrayList<>();
72 List<Result> diff = new Diff().withNoisePahList(null).withSpecialPath(specialPath).withAlgorithmEnum(AlgorithmEnum.SIMLAR_ARRAY_AND_LEFTJOIN_OBJECT).diffElement(a, b);
73 assertEquals(ResultConvertUtil.TYPE_MODIFY, diff.get(0).getDiffType());
74 }
75
76 /**
77 * 测试withObjectAlgorithm withArrayAlgorithm withPrimitiveAlgorithm withNullAlgorithm withOtherAlgorithm方法

Callers

nothing calls this directly

Calls 5

withAlgorithmEnumMethod · 0.80
withSpecialPathMethod · 0.80
withNoisePahListMethod · 0.80
getDiffTypeMethod · 0.80
diffElementMethod · 0.65

Tested by

no test coverage detected