v15 W2 DictConfigValidator: DictTypeConfig + DictDataConfig + 3 L2 + 4 L1 字段校验 + 20 tests (416 total tests)
This commit is contained in:
1 parent
49e445c2b2
commit
891c7d92cf
6 files changed
+402
-14
No files matched your search
@@ -0,0 +1,153 @@
|
||||
package ssw.dacli.validation.dict;
|
||||
|
||||
import ssw.dacli.validation.ConfigValidator;
|
||||
import ssw.dacli.validation.DacliValidation;
|
||||
import ssw.dacli.validation.Module;
|
||||
import ssw.dacli.validation.Severity;
|
||||
import ssw.dacli.validation.ValidationError;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* v15 W2 — DictConfigValidator (字典 L2 配置提交校验).
|
||||
*
|
||||
* <p>本 validator 同时支持 字典类型 ({@link DictTypeConfig}) 和 字典数据项
|
||||
* ({@link DictDataConfig}), 通过 module() 返回 DICT, 但内部用 instanceof 区分
|
||||
* (避免再拆 2 个 validator class).
|
||||
*
|
||||
* <p>实现 {@code docs/dacli/v15-validation-schema.md} §4 列出的 3 条 L2 规则:
|
||||
* <ol>
|
||||
* <li>dict-L2-1: enCode 格式 (来自 L1, 后端会查重)
|
||||
* <li>dict-L2-2: type ∈ {tree, flat} 合法值
|
||||
* <li>dict-L2-3: parentId 引用合法 (非空时)
|
||||
* </ol>
|
||||
*
|
||||
* <p>L1 (用户填写) 校验由 {@link DacliValidation} 在子命令 @Parameters 注解层处理.
|
||||
*
|
||||
* <p>实现要点:
|
||||
* <ul>
|
||||
* <li>穷尽所有错误, 一次性返回
|
||||
* <li>支持 DictTypeConfig 和 DictDataConfig 两种 config
|
||||
* <li>tree 类型时 parentId 必填 (顶层为 "-1" 或 null)
|
||||
* <li>flat 类型时 parentId 应为空 (后端会忽略)
|
||||
* </ul>
|
||||
*/
|
||||
public class DictConfigValidator implements ConfigValidator<Object> {
|
||||
|
||||
/** 合法 type 值 */
|
||||
private static final Set<String> VALID_TYPES = Set.of("tree", "flat");
|
||||
|
||||
@Override
|
||||
public Module module() {
|
||||
return Module.DICT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ValidationError> validate(Object config) {
|
||||
List<ValidationError> errors = new ArrayList<>();
|
||||
|
||||
if (config == null) {
|
||||
errors.add(new ValidationError("dict-L2-0", "DictConfig 不能为 null", "config", Severity.ERROR));
|
||||
return errors;
|
||||
}
|
||||
|
||||
if (config instanceof DictTypeConfig) {
|
||||
validateType((DictTypeConfig) config, errors);
|
||||
} else if (config instanceof DictDataConfig) {
|
||||
validateData((DictDataConfig) config, errors);
|
||||
} else {
|
||||
errors.add(new ValidationError("dict-L2-0",
|
||||
"不支持的 DictConfig 类型: " + config.getClass().getName(),
|
||||
"config", Severity.ERROR));
|
||||
}
|
||||
|
||||
return errors;
|
||||
}
|
||||
|
||||
private void validateType(DictTypeConfig cfg, List<ValidationError> errors) {
|
||||
// L1-1: fullName 必填 + fullName 格式
|
||||
if (cfg.fullName() == null || cfg.fullName().isEmpty()) {
|
||||
errors.add(new ValidationError("dict-L1-1", Module.DICT, "请输入字典名称",
|
||||
"fullName", Severity.ERROR));
|
||||
} else {
|
||||
DacliValidation.PatternRule fullNameRule = DacliValidation.getRule("fullName");
|
||||
if (!fullNameRule.matches(cfg.fullName())) {
|
||||
errors.add(new ValidationError("dict-L1-1", Module.DICT, fullNameRule.message(),
|
||||
"fullName", Severity.ERROR));
|
||||
}
|
||||
}
|
||||
|
||||
// L1-2: enCode 必填 + 格式
|
||||
if (cfg.enCode() == null || cfg.enCode().isEmpty()) {
|
||||
errors.add(new ValidationError("dict-L1-2", Module.DICT, "请输入字典编码",
|
||||
"enCode", Severity.ERROR));
|
||||
} else {
|
||||
DacliValidation.PatternRule enCodeRule = DacliValidation.getRule("enCode");
|
||||
if (!enCodeRule.matches(cfg.enCode())) {
|
||||
errors.add(new ValidationError("dict-L1-2", Module.DICT, enCodeRule.message(),
|
||||
"enCode", Severity.ERROR));
|
||||
}
|
||||
}
|
||||
|
||||
// L1-3 + L2-2: type 合法值
|
||||
if (cfg.type() == null || cfg.type().isEmpty()) {
|
||||
errors.add(new ValidationError("dict-L1-3", Module.DICT, "请选择字典类型 (树形/平铺)",
|
||||
"type", Severity.ERROR));
|
||||
} else if (!VALID_TYPES.contains(cfg.type().toLowerCase())) {
|
||||
errors.add(new ValidationError("dict-L2-2", Module.DICT,
|
||||
"type 必须是 tree/flat 之一, 实际: " + cfg.type(),
|
||||
"type", Severity.ERROR));
|
||||
}
|
||||
|
||||
// L2-3: parentId 引用合法 (如果非空, 应是合法 UUID/ID 格式)
|
||||
if (cfg.parentId() != null && !cfg.parentId().isEmpty()) {
|
||||
if (cfg.parentId().length() < 8) {
|
||||
errors.add(new ValidationError("dict-L2-3", Module.DICT,
|
||||
"parentId 长度过短, 应是合法 ID",
|
||||
"parentId", Severity.WARNING));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void validateData(DictDataConfig cfg, List<ValidationError> errors) {
|
||||
// L1-4: dictionaryTypeId 必填
|
||||
if (cfg.dictionaryTypeId() == null || cfg.dictionaryTypeId().isEmpty()) {
|
||||
errors.add(new ValidationError("dict-L1-4", Module.DICT, "请选择字典类型",
|
||||
"dictionaryTypeId", Severity.ERROR));
|
||||
}
|
||||
|
||||
// L1-5: fullName 必填 + 格式
|
||||
if (cfg.fullName() == null || cfg.fullName().isEmpty()) {
|
||||
errors.add(new ValidationError("dict-L1-5", Module.DICT, "请输入字典数据名称",
|
||||
"fullName", Severity.ERROR));
|
||||
} else {
|
||||
DacliValidation.PatternRule fullNameRule = DacliValidation.getRule("fullName");
|
||||
if (!fullNameRule.matches(cfg.fullName())) {
|
||||
errors.add(new ValidationError("dict-L1-5", Module.DICT, fullNameRule.message(),
|
||||
"fullName", Severity.ERROR));
|
||||
}
|
||||
}
|
||||
|
||||
// L1-6: enCode 必填 + 格式
|
||||
if (cfg.enCode() == null || cfg.enCode().isEmpty()) {
|
||||
errors.add(new ValidationError("dict-L1-6", Module.DICT, "请输入字典数据编码",
|
||||
"enCode", Severity.ERROR));
|
||||
} else {
|
||||
DacliValidation.PatternRule enCodeRule = DacliValidation.getRule("enCode");
|
||||
if (!enCodeRule.matches(cfg.enCode())) {
|
||||
errors.add(new ValidationError("dict-L1-6", Module.DICT, enCodeRule.message(),
|
||||
"enCode", Severity.ERROR));
|
||||
}
|
||||
}
|
||||
|
||||
// L1-7: parentId 树形可空, 平铺应为空
|
||||
if (cfg.parentId() != null && !cfg.parentId().isEmpty()
|
||||
&& cfg.parentId().length() < 2) {
|
||||
errors.add(new ValidationError("dict-L1-7", Module.DICT,
|
||||
"parentId 长度过短, 应是合法 ID 或 '-1'",
|
||||
"parentId", Severity.WARNING));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package ssw.dacli.validation.dict;
|
||||
|
||||
/**
|
||||
* v15 W2 — DictDataConfig 数据模型 (字典数据项层).
|
||||
*
|
||||
* <p>对应 JNPF /api/system/DictionaryData (POST/PUT body):
|
||||
* <ul>
|
||||
* <li>{@code dictionaryTypeId} — 所属字典类型 ID
|
||||
* <li>{@code fullName} — 数据项中文名 (e.g. "男")
|
||||
* <li>{@code enCode} — 数据项编码 (e.g. "M", 类型内唯一)
|
||||
* <li>{@code parentId} — 父数据项 ID (树形时必填顶层为 "-1")
|
||||
* </ul>
|
||||
*
|
||||
* <p>使用示例:
|
||||
* <pre>{@code
|
||||
* DictDataConfig cfg = new DictDataConfig("type-uuid-1", "男", "M", "-1");
|
||||
* List<ValidationError> errs = ConfigValidatorFactory.get(Module.DICT).validate(cfg);
|
||||
* }</pre>
|
||||
*/
|
||||
public record DictDataConfig(
|
||||
String dictionaryTypeId,
|
||||
String fullName,
|
||||
String enCode,
|
||||
String parentId
|
||||
) {}
|
||||
@@ -0,0 +1,25 @@
|
||||
package ssw.dacli.validation.dict;
|
||||
|
||||
/**
|
||||
* v15 W2 — DictTypeConfig 数据模型 (字典类型层).
|
||||
*
|
||||
* <p>对应 JNPF /api/system/DictionaryType (POST/PUT body):
|
||||
* <ul>
|
||||
* <li>{@code fullName} — 类型中文名 (e.g. "性别")
|
||||
* <li>{@code enCode} — 类型编码 (e.g. "sex", 全表唯一)
|
||||
* <li>{@code type} — 0=树形, 1=平铺 (或 enum {tree, flat})
|
||||
* <li>{@code parentId} — (可选) 父类型 ID, 用于嵌套分类
|
||||
* </ul>
|
||||
*
|
||||
* <p>使用示例:
|
||||
* <pre>{@code
|
||||
* DictTypeConfig cfg = new DictTypeConfig("性别", "sex", "tree", null);
|
||||
* List<ValidationError> errs = ConfigValidatorFactory.get(Module.DICT).validate(cfg);
|
||||
* }</pre>
|
||||
*/
|
||||
public record DictTypeConfig(
|
||||
String fullName,
|
||||
String enCode,
|
||||
String type, // "tree" | "flat"
|
||||
String parentId
|
||||
) {}
|
||||
@@ -1,2 +1,3 @@
|
||||
ssw.dacli.validation.dm.DmConfigValidator
|
||||
ssw.dacli.validation.form.FormConfigValidator
|
||||
ssw.dacli.validation.dict.DictConfigValidator
|
||||
@@ -5,23 +5,25 @@ import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
/**
|
||||
* v15 D3+D4+W1+ — ConfigValidatorFactory SPI 注册测试.
|
||||
* v15 D3+D4+W1+W2 — ConfigValidatorFactory SPI 注册测试.
|
||||
*
|
||||
* <p>v15 D3 阶段 4 module 都没有注册 validator, 工厂应抛 {@link UnsupportedOperationException}.
|
||||
* <p>v15 D4 阶段 DmConfigValidator 已实现并注册, DM module 应可正常返回.
|
||||
* <p>v15 W1+ 阶段 FormConfigValidator 额外实现并注册, FORM module 也可正常返回.
|
||||
* <p>v15 D7+ 阶段 di/dict/workflow validator 才会逐个实现, 仍为未注册.
|
||||
* <p>v15 W2 阶段 DictConfigValidator 已注册, DICT 也可正常返回.
|
||||
* <p>v15 D7+ 阶段 di/workflow validator 才会逐个实现, 仍为未注册.
|
||||
*/
|
||||
public class ConfigValidatorFactoryTest {
|
||||
|
||||
@Test
|
||||
public void testRegisteredModules_dmAndFormRegistered() {
|
||||
// D4 阶段: DM 已注册. W1+: FORM 也注册. DI/DICT/WORKFLOW 仍未注册
|
||||
public void testRegisteredModules_dmFormDictRegistered() {
|
||||
// W2 阶段: DM + FORM + DICT 已注册. DI/WORKFLOW 仍未注册
|
||||
java.util.List<Module> registered = ConfigValidatorFactory.registeredModules();
|
||||
assertEquals(2, registered.size(),
|
||||
"W1+ 阶段只有 DM + FORM 注册, 实际: " + registered);
|
||||
assertEquals(3, registered.size(),
|
||||
"W2 阶段只有 DM + FORM + DICT 注册, 实际: " + registered);
|
||||
assertTrue(registered.contains(Module.DM));
|
||||
assertTrue(registered.contains(Module.FORM));
|
||||
assertTrue(registered.contains(Module.DICT));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -36,6 +38,12 @@ public class ConfigValidatorFactoryTest {
|
||||
assertDoesNotThrow(() -> ConfigValidatorFactory.get(Module.FORM));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGet_dict_returnsDictValidator() {
|
||||
// DICT 已注册, get 应正常返回
|
||||
assertDoesNotThrow(() -> ConfigValidatorFactory.get(Module.DICT));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGet_di_unregistered_throwsHelpfulError() {
|
||||
UnsupportedOperationException ex = assertThrows(UnsupportedOperationException.class,
|
||||
@@ -46,12 +54,6 @@ public class ConfigValidatorFactoryTest {
|
||||
"错误消息应提示 SPI 注册路径");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGet_dict_unregistered() {
|
||||
assertThrows(UnsupportedOperationException.class,
|
||||
() -> ConfigValidatorFactory.get(Module.DICT));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGet_workflow_unregistered() {
|
||||
assertThrows(UnsupportedOperationException.class,
|
||||
@@ -59,15 +61,15 @@ public class ConfigValidatorFactoryTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsSupported_dmAndFormRegistered() {
|
||||
public void testIsSupported_dmFormDictRegistered() {
|
||||
assertTrue(ConfigValidatorFactory.isSupported(Module.DM));
|
||||
assertTrue(ConfigValidatorFactory.isSupported(Module.FORM));
|
||||
assertTrue(ConfigValidatorFactory.isSupported(Module.DICT));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsSupported_othersUnregistered() {
|
||||
assertFalse(ConfigValidatorFactory.isSupported(Module.DI));
|
||||
assertFalse(ConfigValidatorFactory.isSupported(Module.DICT));
|
||||
assertFalse(ConfigValidatorFactory.isSupported(Module.WORKFLOW));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
package ssw.dacli.validation.dict;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import ssw.dacli.validation.ConfigValidatorFactory;
|
||||
import ssw.dacli.validation.Module;
|
||||
import ssw.dacli.validation.Severity;
|
||||
import ssw.dacli.validation.ValidationError;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
/**
|
||||
* v15 W2 — DictConfigValidator 单元测试 (覆盖 DictTypeConfig + DictDataConfig).
|
||||
*/
|
||||
public class DictConfigValidatorTest {
|
||||
|
||||
@Test
|
||||
public void testModule() {
|
||||
assertEquals(Module.DICT, new DictConfigValidator().module());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSpiRegistered() {
|
||||
assertTrue(ConfigValidatorFactory.isSupported(Module.DICT));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNullConfig_rejected() {
|
||||
List<ValidationError> errs = new DictConfigValidator().validate(null);
|
||||
assertEquals(1, errs.size());
|
||||
assertEquals(Severity.ERROR, errs.get(0).severity());
|
||||
assertEquals("dict-L2-0", errs.get(0).code());
|
||||
}
|
||||
|
||||
// ============ DictTypeConfig 测试 ============
|
||||
|
||||
@Test
|
||||
public void testValidType_passesAllChecks() {
|
||||
DictTypeConfig cfg = new DictTypeConfig("性别", "sex", "tree", null);
|
||||
List<ValidationError> errs = new DictConfigValidator().validate(cfg);
|
||||
assertTrue(errs.isEmpty(), "合法 type 应无错误, 实际: " + errs);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testL1_1_typeFullNameMissing() {
|
||||
DictTypeConfig cfg = new DictTypeConfig("", "sex", "tree", null);
|
||||
List<ValidationError> errs = new DictConfigValidator().validate(cfg);
|
||||
assertTrue(errs.stream().anyMatch(e -> e.code().equals("dict-L1-1")),
|
||||
"type fullName 缺失应触发 dict-L1-1, 实际: " + errs);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testL1_1_typeFullNameFormatInvalid() {
|
||||
DictTypeConfig cfg = new DictTypeConfig("user-info", "sex", "tree", null);
|
||||
List<ValidationError> errs = new DictConfigValidator().validate(cfg);
|
||||
assertTrue(errs.stream().anyMatch(e -> e.code().equals("dict-L1-1")),
|
||||
"含连字符应触发 dict-L1-1");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testL1_2_typeEnCodeMissing() {
|
||||
DictTypeConfig cfg = new DictTypeConfig("性别", "", "tree", null);
|
||||
assertTrue(new DictConfigValidator().validate(cfg).stream()
|
||||
.anyMatch(e -> e.code().equals("dict-L1-2")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testL1_2_typeEnCodeInvalid() {
|
||||
// enCode 含下划线 (formValidate 严格)
|
||||
DictTypeConfig cfg = new DictTypeConfig("性别", "sex_type", "tree", null);
|
||||
assertTrue(new DictConfigValidator().validate(cfg).stream()
|
||||
.anyMatch(e -> e.code().equals("dict-L1-2")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testL1_3_typeMissing() {
|
||||
DictTypeConfig cfg = new DictTypeConfig("性别", "sex", "", null);
|
||||
assertTrue(new DictConfigValidator().validate(cfg).stream()
|
||||
.anyMatch(e -> e.code().equals("dict-L1-3")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testL2_2_typeInvalidValue() {
|
||||
DictTypeConfig cfg = new DictTypeConfig("性别", "sex", "invalid", null);
|
||||
assertTrue(new DictConfigValidator().validate(cfg).stream()
|
||||
.anyMatch(e -> e.code().equals("dict-L2-2")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testL2_2_typeCaseInsensitive() {
|
||||
// "Tree" / "FLAT" 应通过 (大小写不敏感)
|
||||
for (String t : new String[]{"Tree", "FLAT", "Tree"}) {
|
||||
DictTypeConfig cfg = new DictTypeConfig("性别", "sex", t, null);
|
||||
assertFalse(new DictConfigValidator().validate(cfg).stream()
|
||||
.anyMatch(e -> e.code().equals("dict-L2-2")),
|
||||
"type=" + t + " 应通过 (大小写不敏感)");
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testL2_3_typeParentIdTooShort_warning() {
|
||||
DictTypeConfig cfg = new DictTypeConfig("性别", "sex", "tree", "x");
|
||||
List<ValidationError> errs = new DictConfigValidator().validate(cfg);
|
||||
// parentId="x" 长度 < 8, 触发 WARNING 级别
|
||||
assertTrue(errs.stream().anyMatch(e -> e.code().equals("dict-L2-3")),
|
||||
"parentId 过短应触发 dict-L2-3");
|
||||
assertTrue(errs.stream().filter(e -> e.code().equals("dict-L2-3"))
|
||||
.allMatch(e -> e.severity() == Severity.WARNING));
|
||||
}
|
||||
|
||||
// ============ DictDataConfig 测试 ============
|
||||
|
||||
@Test
|
||||
public void testValidData_passesAllChecks() {
|
||||
DictDataConfig cfg = new DictDataConfig("type-uuid-1", "男", "M", "-1");
|
||||
List<ValidationError> errs = new DictConfigValidator().validate(cfg);
|
||||
assertTrue(errs.isEmpty(), "合法 data 应无错误, 实际: " + errs);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testL1_4_dictionaryTypeIdMissing() {
|
||||
DictDataConfig cfg = new DictDataConfig("", "男", "M", "-1");
|
||||
assertTrue(new DictConfigValidator().validate(cfg).stream()
|
||||
.anyMatch(e -> e.code().equals("dict-L1-4")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testL1_5_dataFullNameMissing() {
|
||||
DictDataConfig cfg = new DictDataConfig("type-id", "", "M", "-1");
|
||||
assertTrue(new DictConfigValidator().validate(cfg).stream()
|
||||
.anyMatch(e -> e.code().equals("dict-L1-5")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testL1_6_dataEnCodeMissing() {
|
||||
DictDataConfig cfg = new DictDataConfig("type-id", "男", "", "-1");
|
||||
assertTrue(new DictConfigValidator().validate(cfg).stream()
|
||||
.anyMatch(e -> e.code().equals("dict-L1-6")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testL1_6_dataEnCodeInvalid() {
|
||||
DictDataConfig cfg = new DictDataConfig("type-id", "男", "M_x", "-1");
|
||||
assertTrue(new DictConfigValidator().validate(cfg).stream()
|
||||
.anyMatch(e -> e.code().equals("dict-L1-6")));
|
||||
}
|
||||
|
||||
// ============ 错误类型 (instanceof 兜底) ============
|
||||
|
||||
@Test
|
||||
public void testUnsupportedConfigType_rejected() {
|
||||
List<ValidationError> errs = new DictConfigValidator().validate("not a dict config");
|
||||
assertEquals(1, errs.size());
|
||||
assertEquals("dict-L2-0", errs.get(0).code());
|
||||
}
|
||||
|
||||
// ============ 复合负面 ============
|
||||
|
||||
@Test
|
||||
public void testMultiNegative_typeFuzz() {
|
||||
DictTypeConfig worst = new DictTypeConfig("", "", "invalid", "x");
|
||||
List<ValidationError> errs = new DictConfigValidator().validate(worst);
|
||||
// 应触发: dict-L1-1, dict-L1-2, dict-L2-2, dict-L2-3
|
||||
List<String> codes = errs.stream().map(ValidationError::code).distinct().sorted().toList();
|
||||
assertTrue(codes.contains("dict-L1-1"), "应触发 L1-1, 实际: " + codes);
|
||||
assertTrue(codes.contains("dict-L1-2"), "应触发 L1-2, 实际: " + codes);
|
||||
assertTrue(codes.contains("dict-L2-2"), "应触发 L2-2, 实际: " + codes);
|
||||
assertTrue(codes.contains("dict-L2-3"), "应触发 L2-3, 实际: " + codes);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMultiNegative_dataFuzz() {
|
||||
DictDataConfig worst = new DictDataConfig("", "", "M_x", "");
|
||||
List<ValidationError> errs = new DictConfigValidator().validate(worst);
|
||||
// 应触发: dict-L1-4, dict-L1-5, dict-L1-6
|
||||
List<String> codes = errs.stream().map(ValidationError::code).distinct().sorted().toList();
|
||||
assertTrue(codes.contains("dict-L1-4"));
|
||||
assertTrue(codes.contains("dict-L1-5"));
|
||||
assertTrue(codes.contains("dict-L1-6"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user