feat(ft546): persist shadow comparison evidence

This commit is contained in:
zgw
2026-08-14 17:25:52 +08:00
parent 6864010832
commit 240f5b0808
33 changed files with 3228 additions and 26 deletions

View File

@@ -0,0 +1,32 @@
package com.ruoyi.shadow.evidence;
import java.util.Objects;
public final class ShadowDifference {
private final ShadowDifferenceCategory category;
private final String reasonCode;
private final String expectedJson;
private final String actualJson;
public ShadowDifference(ShadowDifferenceCategory category,
String reasonCode,
String expectedJson,
String actualJson) {
this.category = Objects.requireNonNull(category, "category");
this.reasonCode = required(reasonCode, "reasonCode");
this.expectedJson = expectedJson;
this.actualJson = actualJson;
}
public ShadowDifferenceCategory getCategory() { return category; }
public String getReasonCode() { return reasonCode; }
public String getExpectedJson() { return expectedJson; }
public String getActualJson() { return actualJson; }
private static String required(String value, String name) {
if (value == null || value.trim().isEmpty()) {
throw new IllegalArgumentException(name + " must not be blank");
}
return value.trim();
}
}