Search in sources :

Example 11 with BootstrapConfiguration

use of jakarta.validation.BootstrapConfiguration in project hibernate-validator by hibernate.

the class XmlMappingTest method testTemporalValidationToleranceConfiguration.

@Test
@TestForIssue(jiraKey = "HV-1493")
public void testTemporalValidationToleranceConfiguration() {
    validationXmlTestHelper.runWithCustomValidationXml("temporal-validation-tolerance-duration-validation.xml", () -> {
        // given
        BootstrapConfiguration bootstrapConfiguration = ValidatorUtil.getConfiguration().getBootstrapConfiguration();
        // then
        assertEquals(bootstrapConfiguration.getProperties().get(HibernateValidatorConfiguration.TEMPORAL_VALIDATION_TOLERANCE), "123456");
    });
}
Also used : BootstrapConfiguration(jakarta.validation.BootstrapConfiguration) Test(org.testng.annotations.Test) TestForIssue(org.hibernate.validator.testutil.TestForIssue)

Aggregations

BootstrapConfiguration (jakarta.validation.BootstrapConfiguration)11 LoadClass (org.hibernate.validator.internal.util.privilegedactions.LoadClass)6 TestForIssue (org.hibernate.validator.testutil.TestForIssue)3 Test (org.testng.annotations.Test)3 ClockProvider (jakarta.validation.ClockProvider)2 ConstraintValidatorFactory (jakarta.validation.ConstraintValidatorFactory)2 MessageInterpolator (jakarta.validation.MessageInterpolator)2 ParameterNameProvider (jakarta.validation.ParameterNameProvider)2 TraversableResolver (jakarta.validation.TraversableResolver)2 ApplicationScoped (jakarta.enterprise.context.ApplicationScoped)1 CreationalContext (jakarta.enterprise.context.spi.CreationalContext)1 Instance (jakarta.enterprise.inject.Instance)1 NamedLiteral (jakarta.enterprise.inject.literal.NamedLiteral)1 Bean (jakarta.enterprise.inject.spi.Bean)1 BeanManager (jakarta.enterprise.inject.spi.BeanManager)1 InjectionPoint (jakarta.enterprise.inject.spi.InjectionPoint)1 PassivationCapable (jakarta.enterprise.inject.spi.PassivationCapable)1 Configuration (jakarta.validation.Configuration)1 Validation (jakarta.validation.Validation)1 ValidationException (jakarta.validation.ValidationException)1