From 5caddfef33469003843ceff47be7558b3564530d Mon Sep 17 00:00:00 2001 From: panagiotiskakos Date: Mon, 21 Nov 2022 16:39:21 +0200 Subject: [PATCH] [JAVA-16218] Split javaxval module --- javaxval-2/.gitignore | 6 ++ javaxval-2/README.md | 10 +++ javaxval-2/pom.xml | 71 +++++++++++++++++++ .../hibernate/validator/ap/Message.java | 5 +- .../javaxval/messageinterpolator/Person.java | 0 .../MethodValidationConfig.java | 5 +- .../ConsistentDateParameterValidator.java | 0 .../constraints/ConsistentDateParameters.java | 0 .../constraints/ValidReservation.java | 0 .../ValidReservationValidator.java | 0 .../methodvalidation/model/Customer.java | 0 .../methodvalidation/model/Reservation.java | 5 +- .../model/ReservationManagement.java | 3 +- .../notnull/NotNullMethodParameter.java | 0 .../javaxval/notnull/ValidatingComponent.java | 4 +- ...terMessageInterpolaterIntegrationTest.java | 0 .../ContainerValidationIntegrationTest.java | 7 +- .../ValidationIntegrationTest.java | 5 +- .../NotNullMethodParameterUnitTest.java | 4 +- .../ValidatingComponentIntegrationTest.java | 19 ++--- javaxval/README.md | 7 +- .../CustomerTypeSubSetValidatorUnitTest.java | 7 +- .../EnumNamePatternValidatorUnitTest.java | 7 +- .../enums/ValueOfEnumValidatorUnitTest.java | 5 +- .../javaxval/enums/demo/CustomerUnitTest.java | 3 +- .../{test => }/UserNotBlankUnitTest.java | 2 +- .../{test => }/UserNotEmptyUnitTest.java | 2 +- .../{test => }/UserNotNullUnitTest.java | 2 +- .../RegistrationFormUnitTest.java | 3 +- pom.xml | 2 + 30 files changed, 141 insertions(+), 43 deletions(-) create mode 100644 javaxval-2/.gitignore create mode 100644 javaxval-2/README.md create mode 100644 javaxval-2/pom.xml rename {javaxval => javaxval-2}/src/main/java/com/baeldung/javaxval/hibernate/validator/ap/Message.java (99%) rename {javaxval => javaxval-2}/src/main/java/com/baeldung/javaxval/messageinterpolator/Person.java (100%) rename {javaxval => javaxval-2}/src/main/java/com/baeldung/javaxval/methodvalidation/MethodValidationConfig.java (99%) rename {javaxval => javaxval-2}/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ConsistentDateParameterValidator.java (100%) rename {javaxval => javaxval-2}/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ConsistentDateParameters.java (100%) rename {javaxval => javaxval-2}/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ValidReservation.java (100%) rename {javaxval => javaxval-2}/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ValidReservationValidator.java (100%) rename {javaxval => javaxval-2}/src/main/java/com/baeldung/javaxval/methodvalidation/model/Customer.java (100%) rename {javaxval => javaxval-2}/src/main/java/com/baeldung/javaxval/methodvalidation/model/Reservation.java (99%) rename {javaxval => javaxval-2}/src/main/java/com/baeldung/javaxval/methodvalidation/model/ReservationManagement.java (99%) rename {javaxval => javaxval-2}/src/main/java/com/baeldung/javaxval/notnull/NotNullMethodParameter.java (100%) rename {javaxval => javaxval-2}/src/main/java/com/baeldung/javaxval/notnull/ValidatingComponent.java (100%) rename {javaxval => javaxval-2}/src/test/java/com/baeldung/javaxval/messageinterpolator/ParameterMessageInterpolaterIntegrationTest.java (100%) rename {javaxval => javaxval-2}/src/test/java/com/baeldung/javaxval/methodvalidation/ContainerValidationIntegrationTest.java (99%) rename {javaxval => javaxval-2}/src/test/java/com/baeldung/javaxval/methodvalidation/ValidationIntegrationTest.java (99%) rename {javaxval => javaxval-2}/src/test/java/com/baeldung/javaxval/notnull/NotNullMethodParameterUnitTest.java (100%) rename {javaxval => javaxval-2}/src/test/java/com/baeldung/javaxval/notnull/ValidatingComponentIntegrationTest.java (99%) rename javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/{test => }/UserNotBlankUnitTest.java (97%) rename javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/{test => }/UserNotEmptyUnitTest.java (96%) rename javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/{test => }/UserNotNullUnitTest.java (96%) diff --git a/javaxval-2/.gitignore b/javaxval-2/.gitignore new file mode 100644 index 0000000000..8027134ae9 --- /dev/null +++ b/javaxval-2/.gitignore @@ -0,0 +1,6 @@ +.classpath +.project +.settings/ +target/ +bin/ + diff --git a/javaxval-2/README.md b/javaxval-2/README.md new file mode 100644 index 0000000000..52c9b42ac4 --- /dev/null +++ b/javaxval-2/README.md @@ -0,0 +1,10 @@ +## Java Bean Validation Examples + +This module contains articles about Bean Validation. + +### Relevant Articles: +- [Method Constraints with Bean Validation 2.0](https://www.baeldung.com/javax-validation-method-constraints) +- [Difference Between @NotNull, @NotEmpty, and @NotBlank Constraints in Bean Validation](https://www.baeldung.com/java-bean-validation-not-null-empty-blank) +- [Guide to ParameterMessageInterpolator](https://www.baeldung.com/hibernate-parametermessageinterpolator) +- [Hibernate Validator Annotation Processor in Depth](https://www.baeldung.com/hibernate-validator-annotation-processor) +- More articles: [[<-- prev]](../javaxval) \ No newline at end of file diff --git a/javaxval-2/pom.xml b/javaxval-2/pom.xml new file mode 100644 index 0000000000..fd4aa70023 --- /dev/null +++ b/javaxval-2/pom.xml @@ -0,0 +1,71 @@ + + + 4.0.0 + javaxval-2 + 0.1-SNAPSHOT + javaxval-2 + + + com.baeldung + parent-modules + 1.0.0-SNAPSHOT + + + + + org.hibernate.validator + hibernate-validator + ${hibernate-validator.version} + + + org.glassfish + javax.el + ${javax.el.version} + + + org.springframework + spring-context + ${org.springframework.version} + + + org.springframework + spring-test + ${org.springframework.version} + + + org.springframework.boot + spring-boot-starter-validation + ${spring.boot.version} + + + org.springframework.boot + spring-boot-starter-test + ${spring.boot.version} + test + + + + + + + + + + + + + + + 6.2.3.Final + 6.2.0.Final + 3.6.1 + 1.8 + 1.8 + 3.0.0 + 5.3.21 + 2.7.1 + + + \ No newline at end of file diff --git a/javaxval/src/main/java/com/baeldung/javaxval/hibernate/validator/ap/Message.java b/javaxval-2/src/main/java/com/baeldung/javaxval/hibernate/validator/ap/Message.java similarity index 99% rename from javaxval/src/main/java/com/baeldung/javaxval/hibernate/validator/ap/Message.java rename to javaxval-2/src/main/java/com/baeldung/javaxval/hibernate/validator/ap/Message.java index 55d6dafad7..2d9b1141ec 100644 --- a/javaxval/src/main/java/com/baeldung/javaxval/hibernate/validator/ap/Message.java +++ b/javaxval-2/src/main/java/com/baeldung/javaxval/hibernate/validator/ap/Message.java @@ -1,10 +1,11 @@ package com.baeldung.javaxval.hibernate.validator.ap; +import java.util.List; +import java.util.Optional; + import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import javax.validation.constraints.Past; -import java.util.List; -import java.util.Optional; public class Message { diff --git a/javaxval/src/main/java/com/baeldung/javaxval/messageinterpolator/Person.java b/javaxval-2/src/main/java/com/baeldung/javaxval/messageinterpolator/Person.java similarity index 100% rename from javaxval/src/main/java/com/baeldung/javaxval/messageinterpolator/Person.java rename to javaxval-2/src/main/java/com/baeldung/javaxval/messageinterpolator/Person.java diff --git a/javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/MethodValidationConfig.java b/javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/MethodValidationConfig.java similarity index 99% rename from javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/MethodValidationConfig.java rename to javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/MethodValidationConfig.java index d4046bf5f9..83eb2d1852 100644 --- a/javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/MethodValidationConfig.java +++ b/javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/MethodValidationConfig.java @@ -2,8 +2,6 @@ package com.baeldung.javaxval.methodvalidation; import java.time.LocalDate; -import com.baeldung.javaxval.methodvalidation.model.Customer; -import com.baeldung.javaxval.methodvalidation.model.Reservation; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; @@ -11,6 +9,9 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Scope; import org.springframework.validation.beanvalidation.MethodValidationPostProcessor; +import com.baeldung.javaxval.methodvalidation.model.Customer; +import com.baeldung.javaxval.methodvalidation.model.Reservation; + @Configuration @ComponentScan({ "com.baeldung.javaxval.methodvalidation.model" }) public class MethodValidationConfig { diff --git a/javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ConsistentDateParameterValidator.java b/javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ConsistentDateParameterValidator.java similarity index 100% rename from javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ConsistentDateParameterValidator.java rename to javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ConsistentDateParameterValidator.java diff --git a/javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ConsistentDateParameters.java b/javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ConsistentDateParameters.java similarity index 100% rename from javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ConsistentDateParameters.java rename to javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ConsistentDateParameters.java diff --git a/javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ValidReservation.java b/javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ValidReservation.java similarity index 100% rename from javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ValidReservation.java rename to javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ValidReservation.java diff --git a/javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ValidReservationValidator.java b/javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ValidReservationValidator.java similarity index 100% rename from javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ValidReservationValidator.java rename to javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/constraints/ValidReservationValidator.java diff --git a/javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/model/Customer.java b/javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/model/Customer.java similarity index 100% rename from javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/model/Customer.java rename to javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/model/Customer.java diff --git a/javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/model/Reservation.java b/javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/model/Reservation.java similarity index 99% rename from javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/model/Reservation.java rename to javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/model/Reservation.java index 49cf1306a9..a6d5ab42b1 100644 --- a/javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/model/Reservation.java +++ b/javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/model/Reservation.java @@ -5,10 +5,11 @@ import java.time.LocalDate; import javax.validation.Valid; import javax.validation.constraints.Positive; -import com.baeldung.javaxval.methodvalidation.constraints.ValidReservation; -import com.baeldung.javaxval.methodvalidation.constraints.ConsistentDateParameters; import org.springframework.validation.annotation.Validated; +import com.baeldung.javaxval.methodvalidation.constraints.ConsistentDateParameters; +import com.baeldung.javaxval.methodvalidation.constraints.ValidReservation; + @Validated public class Reservation { diff --git a/javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/model/ReservationManagement.java b/javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/model/ReservationManagement.java similarity index 99% rename from javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/model/ReservationManagement.java rename to javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/model/ReservationManagement.java index 41fc4c3840..ec71502119 100644 --- a/javaxval/src/main/java/com/baeldung/javaxval/methodvalidation/model/ReservationManagement.java +++ b/javaxval-2/src/main/java/com/baeldung/javaxval/methodvalidation/model/ReservationManagement.java @@ -9,12 +9,13 @@ import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; -import com.baeldung.javaxval.methodvalidation.constraints.ConsistentDateParameters; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Controller; import org.springframework.validation.annotation.Validated; +import com.baeldung.javaxval.methodvalidation.constraints.ConsistentDateParameters; + @Controller @Validated public class ReservationManagement { diff --git a/javaxval/src/main/java/com/baeldung/javaxval/notnull/NotNullMethodParameter.java b/javaxval-2/src/main/java/com/baeldung/javaxval/notnull/NotNullMethodParameter.java similarity index 100% rename from javaxval/src/main/java/com/baeldung/javaxval/notnull/NotNullMethodParameter.java rename to javaxval-2/src/main/java/com/baeldung/javaxval/notnull/NotNullMethodParameter.java diff --git a/javaxval/src/main/java/com/baeldung/javaxval/notnull/ValidatingComponent.java b/javaxval-2/src/main/java/com/baeldung/javaxval/notnull/ValidatingComponent.java similarity index 100% rename from javaxval/src/main/java/com/baeldung/javaxval/notnull/ValidatingComponent.java rename to javaxval-2/src/main/java/com/baeldung/javaxval/notnull/ValidatingComponent.java index 919001bd55..dc6db0b7b7 100644 --- a/javaxval/src/main/java/com/baeldung/javaxval/notnull/ValidatingComponent.java +++ b/javaxval-2/src/main/java/com/baeldung/javaxval/notnull/ValidatingComponent.java @@ -1,10 +1,10 @@ package com.baeldung.javaxval.notnull; +import javax.validation.constraints.NotNull; + import org.springframework.stereotype.Component; import org.springframework.validation.annotation.Validated; -import javax.validation.constraints.NotNull; - @Component @Validated public class ValidatingComponent { diff --git a/javaxval/src/test/java/com/baeldung/javaxval/messageinterpolator/ParameterMessageInterpolaterIntegrationTest.java b/javaxval-2/src/test/java/com/baeldung/javaxval/messageinterpolator/ParameterMessageInterpolaterIntegrationTest.java similarity index 100% rename from javaxval/src/test/java/com/baeldung/javaxval/messageinterpolator/ParameterMessageInterpolaterIntegrationTest.java rename to javaxval-2/src/test/java/com/baeldung/javaxval/messageinterpolator/ParameterMessageInterpolaterIntegrationTest.java diff --git a/javaxval/src/test/java/com/baeldung/javaxval/methodvalidation/ContainerValidationIntegrationTest.java b/javaxval-2/src/test/java/com/baeldung/javaxval/methodvalidation/ContainerValidationIntegrationTest.java similarity index 99% rename from javaxval/src/test/java/com/baeldung/javaxval/methodvalidation/ContainerValidationIntegrationTest.java rename to javaxval-2/src/test/java/com/baeldung/javaxval/methodvalidation/ContainerValidationIntegrationTest.java index d9daf6c4ff..1a66bf3c59 100644 --- a/javaxval/src/test/java/com/baeldung/javaxval/methodvalidation/ContainerValidationIntegrationTest.java +++ b/javaxval-2/src/test/java/com/baeldung/javaxval/methodvalidation/ContainerValidationIntegrationTest.java @@ -5,9 +5,6 @@ import java.util.List; import javax.validation.ConstraintViolationException; -import com.baeldung.javaxval.methodvalidation.model.Customer; -import com.baeldung.javaxval.methodvalidation.model.Reservation; -import com.baeldung.javaxval.methodvalidation.model.ReservationManagement; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; @@ -17,6 +14,10 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; +import com.baeldung.javaxval.methodvalidation.model.Customer; +import com.baeldung.javaxval.methodvalidation.model.Reservation; +import com.baeldung.javaxval.methodvalidation.model.ReservationManagement; + @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = { MethodValidationConfig.class }, loader = AnnotationConfigContextLoader.class) public class ContainerValidationIntegrationTest { diff --git a/javaxval/src/test/java/com/baeldung/javaxval/methodvalidation/ValidationIntegrationTest.java b/javaxval-2/src/test/java/com/baeldung/javaxval/methodvalidation/ValidationIntegrationTest.java similarity index 99% rename from javaxval/src/test/java/com/baeldung/javaxval/methodvalidation/ValidationIntegrationTest.java rename to javaxval-2/src/test/java/com/baeldung/javaxval/methodvalidation/ValidationIntegrationTest.java index 6f297a7c9c..5713e0b10b 100644 --- a/javaxval/src/test/java/com/baeldung/javaxval/methodvalidation/ValidationIntegrationTest.java +++ b/javaxval-2/src/test/java/com/baeldung/javaxval/methodvalidation/ValidationIntegrationTest.java @@ -13,11 +13,12 @@ import javax.validation.Validation; import javax.validation.ValidatorFactory; import javax.validation.executable.ExecutableValidator; +import org.junit.Before; +import org.junit.Test; + import com.baeldung.javaxval.methodvalidation.model.Customer; import com.baeldung.javaxval.methodvalidation.model.Reservation; import com.baeldung.javaxval.methodvalidation.model.ReservationManagement; -import org.junit.Before; -import org.junit.Test; public class ValidationIntegrationTest { diff --git a/javaxval/src/test/java/com/baeldung/javaxval/notnull/NotNullMethodParameterUnitTest.java b/javaxval-2/src/test/java/com/baeldung/javaxval/notnull/NotNullMethodParameterUnitTest.java similarity index 100% rename from javaxval/src/test/java/com/baeldung/javaxval/notnull/NotNullMethodParameterUnitTest.java rename to javaxval-2/src/test/java/com/baeldung/javaxval/notnull/NotNullMethodParameterUnitTest.java index bfc34331e5..3ada742d7c 100644 --- a/javaxval/src/test/java/com/baeldung/javaxval/notnull/NotNullMethodParameterUnitTest.java +++ b/javaxval-2/src/test/java/com/baeldung/javaxval/notnull/NotNullMethodParameterUnitTest.java @@ -1,9 +1,9 @@ package com.baeldung.javaxval.notnull; -import org.junit.jupiter.api.Test; - import static org.junit.jupiter.api.Assertions.assertThrows; +import org.junit.jupiter.api.Test; + class NotNullMethodParameterUnitTest { private NotNullMethodParameter demo = new NotNullMethodParameter(); diff --git a/javaxval/src/test/java/com/baeldung/javaxval/notnull/ValidatingComponentIntegrationTest.java b/javaxval-2/src/test/java/com/baeldung/javaxval/notnull/ValidatingComponentIntegrationTest.java similarity index 99% rename from javaxval/src/test/java/com/baeldung/javaxval/notnull/ValidatingComponentIntegrationTest.java rename to javaxval-2/src/test/java/com/baeldung/javaxval/notnull/ValidatingComponentIntegrationTest.java index dbeba3e812..e18ab38a61 100644 --- a/javaxval/src/test/java/com/baeldung/javaxval/notnull/ValidatingComponentIntegrationTest.java +++ b/javaxval-2/src/test/java/com/baeldung/javaxval/notnull/ValidatingComponentIntegrationTest.java @@ -1,19 +1,20 @@ package com.baeldung.javaxval.notnull; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.util.Set; + +import javax.validation.ConstraintViolation; +import javax.validation.ConstraintViolationException; +import javax.validation.constraints.NotNull; + import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.test.context.SpringBootTest; -import javax.validation.ConstraintViolation; -import javax.validation.ConstraintViolationException; -import javax.validation.constraints.NotNull; -import java.util.Set; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.is; -import static org.junit.jupiter.api.Assertions.assertThrows; - @SpringBootTest class ValidatingComponentIntegrationTest { diff --git a/javaxval/README.md b/javaxval/README.md index 346c4268c1..95d9410fff 100644 --- a/javaxval/README.md +++ b/javaxval/README.md @@ -5,12 +5,9 @@ This module contains articles about Bean Validation. ### Relevant Articles: - [Java Bean Validation Basics](https://www.baeldung.com/javax-validation) - [Validating Container Elements with Bean Validation 2.0](https://www.baeldung.com/bean-validation-container-elements) -- [Method Constraints with Bean Validation 2.0](https://www.baeldung.com/javax-validation-method-constraints) -- [Difference Between @NotNull, @NotEmpty, and @NotBlank Constraints in Bean Validation](https://www.baeldung.com/java-bean-validation-not-null-empty-blank) +- [Validations for Enum Types](https://www.baeldung.com/javax-validations-enums) - [Javax BigDecimal Validation](https://www.baeldung.com/javax-bigdecimal-validation) - [Grouping Javax Validation Constraints](https://www.baeldung.com/javax-validation-groups) -- [Validations for Enum Types](https://www.baeldung.com/javax-validations-enums) -- [Guide to ParameterMessageInterpolator](https://www.baeldung.com/hibernate-parametermessageinterpolator) -- [Hibernate Validator Annotation Processor in Depth](https://www.baeldung.com/hibernate-validator-annotation-processor) - [Constraint Composition with Bean Validation](https://www.baeldung.com/java-bean-validation-constraint-composition) - [Using @NotNull on a Method Parameter](https://www.baeldung.com/java-notnull-method-parameter) +- More articles: [[next -->]](../javaxval-2) \ No newline at end of file diff --git a/javaxval/src/test/java/com/baeldung/javaxval/enums/CustomerTypeSubSetValidatorUnitTest.java b/javaxval/src/test/java/com/baeldung/javaxval/enums/CustomerTypeSubSetValidatorUnitTest.java index 08a51de81e..524f8eec36 100644 --- a/javaxval/src/test/java/com/baeldung/javaxval/enums/CustomerTypeSubSetValidatorUnitTest.java +++ b/javaxval/src/test/java/com/baeldung/javaxval/enums/CustomerTypeSubSetValidatorUnitTest.java @@ -8,12 +8,13 @@ import javax.validation.ConstraintViolation; import javax.validation.Validation; import javax.validation.Validator; -import com.baeldung.javaxval.enums.demo.CustomerUnitTest; -import com.baeldung.javaxval.enums.demo.Customer; -import com.baeldung.javaxval.enums.demo.CustomerType; import org.junit.BeforeClass; import org.junit.Test; +import com.baeldung.javaxval.enums.demo.Customer; +import com.baeldung.javaxval.enums.demo.CustomerType; +import com.baeldung.javaxval.enums.demo.CustomerUnitTest; + public class CustomerTypeSubSetValidatorUnitTest { private static Validator validator; diff --git a/javaxval/src/test/java/com/baeldung/javaxval/enums/EnumNamePatternValidatorUnitTest.java b/javaxval/src/test/java/com/baeldung/javaxval/enums/EnumNamePatternValidatorUnitTest.java index 03bb1f73ba..805d40ee5e 100644 --- a/javaxval/src/test/java/com/baeldung/javaxval/enums/EnumNamePatternValidatorUnitTest.java +++ b/javaxval/src/test/java/com/baeldung/javaxval/enums/EnumNamePatternValidatorUnitTest.java @@ -1,8 +1,8 @@ package com.baeldung.javaxval.enums; -import static org.assertj.core.api.Assertions.assertThat; import static com.baeldung.javaxval.enums.demo.CustomerType.DEFAULT; import static com.baeldung.javaxval.enums.demo.CustomerType.OLD; +import static org.assertj.core.api.Assertions.assertThat; import java.util.Set; @@ -10,11 +10,12 @@ import javax.validation.ConstraintViolation; import javax.validation.Validation; import javax.validation.Validator; -import com.baeldung.javaxval.enums.demo.CustomerUnitTest; -import com.baeldung.javaxval.enums.demo.Customer; import org.junit.BeforeClass; import org.junit.Test; +import com.baeldung.javaxval.enums.demo.Customer; +import com.baeldung.javaxval.enums.demo.CustomerUnitTest; + public class EnumNamePatternValidatorUnitTest { private static Validator validator; diff --git a/javaxval/src/test/java/com/baeldung/javaxval/enums/ValueOfEnumValidatorUnitTest.java b/javaxval/src/test/java/com/baeldung/javaxval/enums/ValueOfEnumValidatorUnitTest.java index 723ac3cc32..150da5d83b 100644 --- a/javaxval/src/test/java/com/baeldung/javaxval/enums/ValueOfEnumValidatorUnitTest.java +++ b/javaxval/src/test/java/com/baeldung/javaxval/enums/ValueOfEnumValidatorUnitTest.java @@ -8,11 +8,12 @@ import javax.validation.ConstraintViolation; import javax.validation.Validation; import javax.validation.Validator; -import com.baeldung.javaxval.enums.demo.CustomerUnitTest; -import com.baeldung.javaxval.enums.demo.Customer; import org.junit.BeforeClass; import org.junit.Test; +import com.baeldung.javaxval.enums.demo.Customer; +import com.baeldung.javaxval.enums.demo.CustomerUnitTest; + public class ValueOfEnumValidatorUnitTest { private static Validator validator; diff --git a/javaxval/src/test/java/com/baeldung/javaxval/enums/demo/CustomerUnitTest.java b/javaxval/src/test/java/com/baeldung/javaxval/enums/demo/CustomerUnitTest.java index 2c810bc2fe..02a49f50fa 100644 --- a/javaxval/src/test/java/com/baeldung/javaxval/enums/demo/CustomerUnitTest.java +++ b/javaxval/src/test/java/com/baeldung/javaxval/enums/demo/CustomerUnitTest.java @@ -9,10 +9,11 @@ import javax.validation.ConstraintViolation; import javax.validation.Validation; import javax.validation.Validator; -import com.baeldung.javaxval.LocaleAwareUnitTest; import org.junit.BeforeClass; import org.junit.Test; +import com.baeldung.javaxval.LocaleAwareUnitTest; + public class CustomerUnitTest extends LocaleAwareUnitTest { private static Validator validator; diff --git a/javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/test/UserNotBlankUnitTest.java b/javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/UserNotBlankUnitTest.java similarity index 97% rename from javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/test/UserNotBlankUnitTest.java rename to javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/UserNotBlankUnitTest.java index 5219004c6d..4cb87e8e27 100644 --- a/javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/test/UserNotBlankUnitTest.java +++ b/javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/UserNotBlankUnitTest.java @@ -1,4 +1,4 @@ -package com.baeldung.javaxval.javabeanconstraints.test; +package com.baeldung.javaxval.javabeanconstraints; import static org.assertj.core.api.Assertions.assertThat; diff --git a/javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/test/UserNotEmptyUnitTest.java b/javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/UserNotEmptyUnitTest.java similarity index 96% rename from javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/test/UserNotEmptyUnitTest.java rename to javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/UserNotEmptyUnitTest.java index 7017848756..eb76ac260c 100644 --- a/javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/test/UserNotEmptyUnitTest.java +++ b/javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/UserNotEmptyUnitTest.java @@ -1,4 +1,4 @@ -package com.baeldung.javaxval.javabeanconstraints.test; +package com.baeldung.javaxval.javabeanconstraints; import static org.assertj.core.api.Assertions.assertThat; diff --git a/javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/test/UserNotNullUnitTest.java b/javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/UserNotNullUnitTest.java similarity index 96% rename from javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/test/UserNotNullUnitTest.java rename to javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/UserNotNullUnitTest.java index b0df88d72b..f0280000de 100644 --- a/javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/test/UserNotNullUnitTest.java +++ b/javaxval/src/test/java/com/baeldung/javaxval/javabeanconstraints/UserNotNullUnitTest.java @@ -1,4 +1,4 @@ -package com.baeldung.javaxval.javabeanconstraints.test; +package com.baeldung.javaxval.javabeanconstraints; import static org.assertj.core.api.Assertions.assertThat; diff --git a/javaxval/src/test/java/com/baeldung/javaxval/validationgroup/RegistrationFormUnitTest.java b/javaxval/src/test/java/com/baeldung/javaxval/validationgroup/RegistrationFormUnitTest.java index 6b7600d201..3333703328 100644 --- a/javaxval/src/test/java/com/baeldung/javaxval/validationgroup/RegistrationFormUnitTest.java +++ b/javaxval/src/test/java/com/baeldung/javaxval/validationgroup/RegistrationFormUnitTest.java @@ -8,10 +8,11 @@ import javax.validation.ConstraintViolation; import javax.validation.Validation; import javax.validation.Validator; -import com.baeldung.javaxval.LocaleAwareUnitTest; import org.junit.BeforeClass; import org.junit.Test; +import com.baeldung.javaxval.LocaleAwareUnitTest; + public class RegistrationFormUnitTest extends LocaleAwareUnitTest { private static Validator validator; diff --git a/pom.xml b/pom.xml index af6336de8d..be097f308d 100644 --- a/pom.xml +++ b/pom.xml @@ -414,6 +414,7 @@ java-websocket javax-sound javaxval + javaxval-2 jaxb jersey jgit @@ -818,6 +819,7 @@ java-websocket javax-sound javaxval + javaxval-2 jaxb jersey jgit