diff --git a/src/main/java/xyz/zhouxy/plusone/validator/BoolValidator.java b/src/main/java/xyz/zhouxy/plusone/validator/BoolValidator.java index 9156a49..37bc4ca 100644 --- a/src/main/java/xyz/zhouxy/plusone/validator/BoolValidator.java +++ b/src/main/java/xyz/zhouxy/plusone/validator/BoolValidator.java @@ -3,7 +3,7 @@ package xyz.zhouxy.plusone.validator; import java.util.function.Function; import java.util.function.Supplier; -class BoolValidator extends PropertyValidator> { +public class BoolValidator extends PropertyValidator> { BoolValidator(Function getter) { super(getter); diff --git a/src/main/java/xyz/zhouxy/plusone/validator/CollectionValidator.java b/src/main/java/xyz/zhouxy/plusone/validator/CollectionValidator.java index bf2136b..f033c92 100644 --- a/src/main/java/xyz/zhouxy/plusone/validator/CollectionValidator.java +++ b/src/main/java/xyz/zhouxy/plusone/validator/CollectionValidator.java @@ -4,15 +4,11 @@ import java.util.Collection; import java.util.function.Function; import java.util.function.Supplier; -class CollectionValidator extends PropertyValidator, CollectionValidator> { +public class CollectionValidator extends PropertyValidator, CollectionValidator> { CollectionValidator(Function> getter) { super(getter); } - - // ================================ - // ====== Collection, String ====== - // ================================ // ====== notEmpty ===== diff --git a/src/main/java/xyz/zhouxy/plusone/validator/DoubleValidator.java b/src/main/java/xyz/zhouxy/plusone/validator/DoubleValidator.java index ac78fac..3ad5173 100644 --- a/src/main/java/xyz/zhouxy/plusone/validator/DoubleValidator.java +++ b/src/main/java/xyz/zhouxy/plusone/validator/DoubleValidator.java @@ -3,7 +3,7 @@ package xyz.zhouxy.plusone.validator; import java.util.function.Function; import java.util.function.Supplier; -class DoubleValidator extends PropertyValidator> { +public class DoubleValidator extends PropertyValidator> { DoubleValidator(Function getter) { super(getter); diff --git a/src/main/java/xyz/zhouxy/plusone/validator/IntValidator.java b/src/main/java/xyz/zhouxy/plusone/validator/IntValidator.java index 59f6e1f..980726f 100644 --- a/src/main/java/xyz/zhouxy/plusone/validator/IntValidator.java +++ b/src/main/java/xyz/zhouxy/plusone/validator/IntValidator.java @@ -3,7 +3,7 @@ package xyz.zhouxy.plusone.validator; import java.util.function.Function; import java.util.function.Supplier; -class IntValidator extends PropertyValidator> { +public class IntValidator extends PropertyValidator> { IntValidator(Function getter) { super(getter); diff --git a/src/main/java/xyz/zhouxy/plusone/validator/ObjectValidator.java b/src/main/java/xyz/zhouxy/plusone/validator/ObjectValidator.java index bf4c36d..8e9cbc4 100644 --- a/src/main/java/xyz/zhouxy/plusone/validator/ObjectValidator.java +++ b/src/main/java/xyz/zhouxy/plusone/validator/ObjectValidator.java @@ -2,7 +2,7 @@ package xyz.zhouxy.plusone.validator; import java.util.function.Function; -class ObjectValidator extends PropertyValidator> { +public class ObjectValidator extends PropertyValidator> { ObjectValidator(Function getter) { super(getter); diff --git a/src/main/java/xyz/zhouxy/plusone/validator/StringValidator.java b/src/main/java/xyz/zhouxy/plusone/validator/StringValidator.java index dec88dc..ef9ecae 100644 --- a/src/main/java/xyz/zhouxy/plusone/validator/StringValidator.java +++ b/src/main/java/xyz/zhouxy/plusone/validator/StringValidator.java @@ -8,7 +8,7 @@ import cn.hutool.core.util.StrUtil; import xyz.zhouxy.plusone.constant.RegexConsts; import xyz.zhouxy.plusone.util.RegexUtil; -class StringValidator extends PropertyValidator> { +public class StringValidator extends PropertyValidator> { StringValidator(Function getter) { super(getter); diff --git a/src/test/java/xyz/zhouxy/plusone/validator/BaseValidatorTest.java b/src/test/java/xyz/zhouxy/plusone/validator/test/BaseValidatorTest.java similarity index 93% rename from src/test/java/xyz/zhouxy/plusone/validator/BaseValidatorTest.java rename to src/test/java/xyz/zhouxy/plusone/validator/test/BaseValidatorTest.java index d3c95d1..8bb0f07 100644 --- a/src/test/java/xyz/zhouxy/plusone/validator/BaseValidatorTest.java +++ b/src/test/java/xyz/zhouxy/plusone/validator/test/BaseValidatorTest.java @@ -1,4 +1,4 @@ -package xyz.zhouxy.plusone.validator; +package xyz.zhouxy.plusone.validator.test; import java.util.Arrays; import java.util.List; @@ -7,11 +7,13 @@ import java.util.Objects; import org.junit.Test; import xyz.zhouxy.plusone.constant.RegexConsts; +import xyz.zhouxy.plusone.validator.BaseValidator; +import xyz.zhouxy.plusone.validator.IValidateRequired; public class BaseValidatorTest { @Test public void testRuleFor() { - RegisterCommand registerCommand = new RegisterCommand("me", "luquanlion@outlook.com", "22336", "A1b2C3d4", + RegisterCommand registerCommand = new RegisterCommand("zhouxy108", "luquanlion@outlook.com", "22336", "A1b2C3d4", "A1b2C3d4", Arrays.asList(new String[] { "admin", "editor" })); registerCommand.validate();