feat(ft546): persist shadow comparison evidence
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user