-
Notifications
You must be signed in to change notification settings - Fork 1
Validator Base creation #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
zero88
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Introduce
DataTypeValidationwithabstract classTypemethod, then all kinds such asStringValidation,DoubleValidationextends on this class. Testno needlogger, usesystem.out. If you need logger, pls adapt to useTestHelperforsetupClass. RemoveTestBase, it doesn't existed anymore- Each
Testmethod must validate one case
core/validator/src/main/java/com/nubeiot/core/validator/Validation.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/Validation.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/Validation.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/Validation.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/Validation.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/validations/Range.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/validations/Range.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/validations/Str.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/validations/Dbl.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/Validation.java
Outdated
Show resolved
Hide resolved
zero88
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request changes
|
@Zero-88 please proceed for reviewing... |
d252fe2 to
3022540
Compare
core/validator/src/main/java/com/nubeiot/core/validator/validations/Range.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/DataTypeValidation.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/DataTypeValidation.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/Validation.java
Outdated
Show resolved
Hide resolved
|
@RaiBnod
I suggest an another solution in package Thanks |
4626961 to
40c7cd5
Compare
6a42ecb to
821aaff
Compare
821aaff to
5455b97
Compare
|
Refactoring the ValidationBases are done. @Zero-88, could you please review the changes. |
f2047b4 to
68d3fa8
Compare
Ticket: #43
Basic idea of the validation base is extracted from joi.
Our validation base should able to do validation of Java primitives, objects as well as the JSON. And also it should able to assign some default values.