From 511370e9b3cba0b6bab2250f37ff352ad64e48e1 Mon Sep 17 00:00:00 2001 From: tanghc Date: Tue, 5 Nov 2019 16:37:16 +0800 Subject: [PATCH] 2.5.2 --- .../java/com/gitee/sop/servercommon/ValidatorTest.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sop-common/sop-service-common/src/test/java/com/gitee/sop/servercommon/ValidatorTest.java b/sop-common/sop-service-common/src/test/java/com/gitee/sop/servercommon/ValidatorTest.java index e3e27afb..5e4a395f 100644 --- a/sop-common/sop-service-common/src/test/java/com/gitee/sop/servercommon/ValidatorTest.java +++ b/sop-common/sop-service-common/src/test/java/com/gitee/sop/servercommon/ValidatorTest.java @@ -31,7 +31,7 @@ public class ValidatorTest extends TestCase { public void testField() { - Manager manager = new Manager("Jim", 22, Type.TWO); + Manager manager = new Manager("Jim", 22, Type.TWO, Status.OK); Store store = new Store("仓库A", manager, Type.ONE); Goods goods = new Goods("Apple", new BigDecimal(50000), store); serviceParamValidator.validateBizParam(goods); @@ -90,10 +90,17 @@ public class ValidatorTest extends TestCase { @NotNull(message = "Manager.type不能为空") private Type type; + + @NotNull(message = "Manager.status不能为空") + private Status status; } enum Type { ONE,TWO } + enum Status { + OK, ERROR + } + }