JSR-380: Bean Validation 2.0 TCK Coverage

2.0.0

Contents

Chapter Summary
Section Summary
Coverage Detail
Unmatched Tests
Unversioned Tests
Test Group Summary

Coverage Distribution

 
 
 
 
 
 
 
 
 
 

Chapter Summary

Chapter Assertions Testable Total Tested Total Tests Tested
(problematic)
Tested
(working)
Coverage %
1 Introduction000000
2 What's new000000
3 Constraint definition766666134066100.00%
4 Value extractor definition29272733027100.00%
5 Constraint declaration and validation process165148142556014295.95%
6 Validation APIs1851671677410167100.00%
7 Constraint metadata request APIs555555250055100.00%
8 Built-in Constraint definitions24242440024100.00%
9 XML deployment descriptor1091071072550107100.00%
10 Exception model8662006100.00%
11 Integration342727104027100.00%
Total6856276212133062199.04%

Section Summary

SectionAssertionsTestableTotal TestedTested
(problematic)
Tested
(working)
Coverage %
1 Introduction [introduction]00000
1.1 Expert group [introduction-expertgroup]00000
1.2 Specification goals [introduction-goals]00000
1.3 Required Java version [introduction-requirements]00000
1.4 How this document is organized [introduction-documentorganization]00000
1.5 How to comment [introduction-commentingprocess]00000
2 What's new [whatsnew]00000
2.1 What's new in 2.0 [whatsnew-20]00000
2.2 What's new in 1.1 [whatsnew-11]00000
2.2.1 Openness [whatsnew-11-openness]00000
2.2.2 Dependency injection [whatsnew-11-cdi]00000
2.2.3 Method validation [whatsnew-11-methodvalidation]00000
2.2.4 Integration with Context and Dependency Injection [whatsnew-11-contextcdi]00000
2.2.5 Group conversion [whatsnew-11-groupconversion]00000
2.2.6 Message interpolation via the unified expression language [whatsnew-11-expressionlanguage]00000
2.2.7 Others [whatsnew-11-others]00000
3 Constraint definition [constraintsdefinitionimplementation]00000
3.1 Constraint annotation [constraintsdefinitionimplementation-constraintdefinition]73303100.00%
3.1.1 Constraint definition properties [constraintsdefinitionimplementation-constraintdefinition-properties]22202100.00%
3.1.1.1 message [constraintsdefinitionimplementation-constraintdefinition-properties-message]11101100.00%
3.1.1.2 groups [constraintsdefinitionimplementation-constraintdefinition-properties-groups]44404100.00%
3.1.1.3 payload [constraintsdefinitionimplementation-constraintdefinition-properties-payload]33303100.00%
3.1.1.4 validationAppliesTo [constraintsdefinitionimplementation-constraintdefinition-properties-validationappliesto]77707100.00%
3.1.1.5 Constraint specific parameter [constraintsdefinitionimplementation-constraintdefinition-properties-specific]00000
3.1.2 Examples [constraintsdefinitionimplementation-constraintdefinition-examples]00000
3.2 Applying multiple constraints of the same type [constraintsdefinitionimplementation-multipleconstraints]22202100.00%
3.3 Constraint composition [constraintsdefinitionimplementation-constraintcomposition]232323023100.00%
3.4 Constraint validation implementation [constraintsdefinitionimplementation-validationimplementation]211616016100.00%
3.4.1 Implementation of temporal constraint validators [constraintsdefinitionimplementation-validationimplementation-temporalvalidators]22202100.00%
3.4.2 Examples [constraintsdefinitionimplementation-validationimplementation-example]00000
3.5 The ConstraintValidatorFactory [constraintsdefinitionimplementation-constraintfactory]43303100.00%
4 Value extractor definition [valueextractordefinition]111111011100.00%
4.1 @ExtractedValue [valueextractordefinition-extractedvalue]65505100.00%
4.2 @UnwrapByDefault [valueextractordefinition-unwrapbydefault]11101100.00%
4.3 Built-in value extractors [valueextractordefinition-builtinvalueextractors]99909100.00%
4.4 Examples [valueextractordefinition-examples]21101100.00%
5 Constraint declaration and validation process [constraintdeclarationvalidationprocess]00000
5.1 Requirements on classes to be validated [constraintdeclarationvalidationprocess-requirements]54404100.00%
5.1.1 Object validation [constraintdeclarationvalidationprocess-requirements-objectvalidation]22202100.00%
5.1.2 Field and property validation [constraintdeclarationvalidationprocess-requirements-propertyvalidation]55505100.00%
5.1.3 Graph validation [constraintdeclarationvalidationprocess-requirements-graphvalidation]161414014100.00%
5.1.3.1 Examples [constraintdeclarationvalidationprocess-requirements-graphvalidation-examples]00000
5.2 Constraint declaration [constraintdeclarationvalidationprocess-constraintdeclaration]11101100.00%
5.3 Inheritance (interface and superclass) [constraintdeclarationvalidationprocess-inheritance]33303100.00%
5.4 Group and group sequence [constraintdeclarationvalidationprocess-groupsequence]44404100.00%
5.4.1 Group inheritance [constraintdeclarationvalidationprocess-groupsequence-groupinheritance]22202100.00%
5.4.2 Group sequence [constraintdeclarationvalidationprocess-groupsequence-groupsequence]107707100.00%
5.4.3 Redefining the Default group for a class [constraintdeclarationvalidationprocess-groupsequence-redefiningdefaultgroup]43303100.00%
5.4.4 Implicit grouping [constraintdeclarationvalidationprocess-groupsequence-implicitgrouping]11101100.00%
5.4.5 Group conversion [constraintdeclarationvalidationprocess-groupsequence-groupconversion]111111011100.00%
5.4.5.1 Group conversion examples [constraintdeclarationvalidationprocess-groupsequence-groupconversion-examples]11101100.00%
5.4.6 Formal group definitions [constraintdeclarationvalidationprocess-groupsequence-formaldefinition]10930333.33%
5.5 Container element constraints [constraintdeclarationvalidationprocess-containerelementconstraints]86606100.00%
5.5.1 Implicit unwrapping of containers [constraintdeclarationvalidationprocess-containerelementconstraints-implicitunwrapping]22202100.00%
5.6 Method and constructor constraints [constraintdeclarationvalidationprocess-methodlevelconstraints]00000
5.6.1 Requirements on methods to be validated [constraintdeclarationvalidationprocess-methodlevelconstraints-requirements]10000
5.6.2 Declaring parameter constraints [constraintdeclarationvalidationprocess-methodlevelconstraints-parameterconstraints]11101100.00%
5.6.2.1 Cross-parameter constraints [constraintdeclarationvalidationprocess-methodlevelconstraints-parameterconstraints-crossparameterconstraints]33303100.00%
5.6.2.2 Naming parameters [constraintdeclarationvalidationprocess-methodlevelconstraints-parameterconstraints-namingparameters]22202100.00%
5.6.3 Declaring return value constraints [constraintdeclarationvalidationprocess-methodlevelconstraints-returnvalueconstraints]22202100.00%
5.6.4 Marking parameters and return values for cascaded validation [constraintdeclarationvalidationprocess-methodlevelconstraints-cascadedvalidation]43303100.00%
5.6.5 Method constraints in inheritance hierarchies [constraintdeclarationvalidationprocess-methodlevelconstraints-inheritance]66606100.00%
5.6.5.1 Examples [constraintdeclarationvalidationprocess-methodlevelconstraints-inheritance-examples]00000
5.7 Validation routine [constraintdeclarationvalidationprocess-validationroutine]32202100.00%
5.7.1 Object graph validation [constraintdeclarationvalidationprocess-validationroutine-graphvalidation]55505100.00%
5.7.2 Method and constructor validation [constraintdeclarationvalidationprocess-validationroutine-methodconstructorvalidation]32202100.00%
5.7.3 Traversable property [constraintdeclarationvalidationprocess-validationroutine-traversable]151212012100.00%
5.7.3.1 Examples [constraintdeclarationvalidationprocess-validationroutine-traversable-examples]00000
5.7.4 ConstraintValidator resolution algorithm [constraintdeclarationvalidationprocess-validationroutine-typevalidatorresolution]141414014100.00%
5.7.5 ValueExtractor resolution [constraintdeclarationvalidationprocess-validationroutine-valueextractorresolution]00000
5.7.5.1 Registering ValueExtractor implementations [constraintdeclarationvalidationprocess-validationroutine-valueextractorresolution-registering]55505100.00%
5.7.5.2 ValueExtractor resolution algorithm for container element constraints [constraintdeclarationvalidationprocess-validationroutine-valueextractorresolution-algorithm-constraints]55505100.00%
5.7.5.3 ValueExtractor resolution algorithm for cascaded validation [constraintdeclarationvalidationprocess-validationroutine-valueextractorresolution-algorithm-cascaded]66606100.00%
5.7.5.4 ValueExtractor resolution algorithm for applying container-level constraints to container elements [constraintdeclarationvalidationprocess-validationroutine-valueextractorresolution-implicitunwrapping]55505100.00%
5.7.5.5 Examples [constraintdeclarationvalidationprocess-validationroutine-algorithm-examples]00000
5.8 Examples [constraintdeclarationvalidationprocess-examples]00000
6 Validation APIs [validationapi]00000
6.1 Validator API [validationapi-validatorapi]10000
6.1.1 Validation methods [validationapi-validatorapi-validationmethods]111111011100.00%
6.1.1.1 Examples [validationapi-validatorapi-validationmethods-examples]00000
6.1.2 Methods for validating method and constructor constraints [validationapi-validatorapi-methodlevelvalidationmethods]131313013100.00%
6.1.2.1 Examples [validationapi-validatorapi-methodlevelvalidationmethods-examples]00000
6.1.3 groups [validationapi-validatorapi-groups]32202100.00%
6.1.3.1 Examples [validationapi-validatorapi-groups-examples]00000
6.2 ConstraintViolation [validationapi-constraintviolation]585757057100.00%
6.2.1 Examples [validationapi-constraintviolation-examples]00000
6.2.2 Examples for method and constructor constraint violations [validationapi-constraintviolation-examplesexecutables]00000
6.3 Message interpolation [validationapi-message]00000
6.3.1 Default message interpolation [validationapi-message-defaultmessageinterpolation]99909100.00%
6.3.1.1 Default message interpolation algorithm [validationapi-message-defaultmessageinterpolation-resolutionalgorithm]75505100.00%
6.3.1.2 Locale for default message interpolation [validationapi-message-defaultmessageinterpolation-locale]22202100.00%
6.3.1.3 Message expressions using Expression Language (EL) [validationapi-message-defaultmessageinterpolation-expressionlanguage]66606100.00%
6.3.2 Custom message interpolation [validationapi-message-customresolution]76606100.00%
6.3.3 Examples [validationapi-message-examples]00000
6.4 Triggering method validation [validationapi-triggeringmethodvalidation]22202100.00%
6.5 Bootstrapping [validationapi-bootstrapping]11101100.00%
6.5.1 Examples [validationapi-bootstrapping-examples]10000
6.5.2 ValidatorFactory [validationapi-bootstrapping-validatorfactory]87707100.00%
6.5.3 Configuration [validationapi-bootstrapping-configuration]151313013100.00%
6.5.4 ValidationProvider and ValidationProviderResolver [validationapi-bootstrapping-validationprovider]00000
6.5.4.1 ValidationProviderResolver [validationapi-bootstrapping-validationprovider-resolver]31101100.00%
6.5.4.2 ValidationProvider [validationapi-bootstrapping-validationprovider-provider]55505100.00%
6.5.5 Validation [validationapi-bootstrapping-validation]66606100.00%
6.5.6 XML configuration: META-INF/validation.xml [validationapi-bootstrapping-xmlconfiguration]252121021100.00%
6.5.7 Bootstrapping considerations [validationapi-bootstrapping-usageandcontainerexpectation]20000
7 Constraint metadata request APIs [constraintmetadata]00000
7.1 Validator [constraintmetadata-validator]33303100.00%
7.2 ElementDescriptor [constraintmetadata-elementdescriptor]77707100.00%
7.3 BeanDescriptor [constraintmetadata-beandescriptor]88808100.00%
7.4 CascadableDescriptor [constraintmetadata-cascadabledescriptor]22202100.00%
7.5 GroupConversionDescriptor [constraintmetadata-groupconversiondescriptor]22202100.00%
7.6 PropertyDescriptor [constraintmetadata-propertydescriptor]11101100.00%
7.7 ExecutableDescriptor, MethodDescriptor and ConstructorDescriptor [constraintmetadata-executabledescriptor]88808100.00%
7.8 ParameterDescriptor [constraintmetadata-parameterdescriptor]22202100.00%
7.9 CrossParameterDescriptor [constraintmetadata-crossparameterdescriptor]11101100.00%
7.10 ReturnValueDescriptor [constraintmetadata-returnvaluedescriptor]00000
7.11 ContainerDescriptor and ContainerElementTypeDescriptor [constraintmetadata-containerdescriptor]55505100.00%
7.12 ConstraintDescriptor [constraintmetadata-constraintdescriptor]161616016100.00%
7.13 Example [constraintmetadata-example]00000
8 Built-in Constraint definitions [builtinconstraints]22202100.00%
8.1 @Null constraint [builtinconstraints-null]11101100.00%
8.2 @NotNull constraint [builtinconstraints-notnull]11101100.00%
8.3 @AssertTrue constraint [builtinconstraints-asserttrue]11101100.00%
8.4 @AssertFalse constraint [builtinconstraints-assertfalse]11101100.00%
8.5 @Min constraint [builtinconstraints-min]11101100.00%
8.6 @Max constraint [builtinconstraints-max]11101100.00%
8.7 @DecimalMin constraint [builtinconstraints-decimalmin]11101100.00%
8.8 @DecimalMax constraint [builtinconstraints-decimalmax]11101100.00%
8.9 @Negative constraint [builtinconstraints-negative]11101100.00%
8.10 @NegativeOrZero constraint [builtinconstraints-negativeorzero]11101100.00%
8.11 @Positive constraint [builtinconstraints-positive]11101100.00%
8.12 @PositiveOrZero constraint [builtinconstraints-positiveorzero]11101100.00%
8.13 @Size constraint [builtinconstraints-size]11101100.00%
8.14 @Digits constraint [builtinconstraints-digits]11101100.00%
8.15 @Past constraint [builtinconstraints-past]11101100.00%
8.16 @PastOrPresent constraint [builtinconstraints-pastorpresent]11101100.00%
8.17 @Future constraint [builtinconstraints-future]11101100.00%
8.18 @FutureOrPresent constraint [builtinconstraints-futureorpresent]11101100.00%
8.19 @Pattern constraint [builtinconstraints-pattern]11101100.00%
8.20 @NotEmpty constraint [builtinconstraints-notempty]11101100.00%
8.21 @NotBlank constraint [builtinconstraints-notblank]11101100.00%
8.22 @Email constraint [builtinconstraints-email]11101100.00%
9 XML deployment descriptor [xml]11101100.00%
9.1 Constraint definition and declaration [xml-mapping]55505100.00%
9.1.1 Constraint declaration in XML [xml-mapping-constraintdeclarationinxml]66606100.00%
9.1.1.1 Class-level overriding [xml-mapping-constraintdeclarationinxml-classleveloverriding]55505100.00%
9.1.1.2 Field-level overriding [xml-mapping-constraintdeclarationinxml-fieldleveloverriding]77707100.00%
9.1.1.3 Property-level overriding [xml-mapping-constraintdeclarationinxml-propertyleveloverriding]77707100.00%
9.1.1.4 Constructor-level overriding [xml-mapping-constraintdeclarationinxml-constructorleveloverriding]151515015100.00%
9.1.1.5 Method-level overriding [xml-mapping-constraintdeclarationinxml-methodleveloverriding]161616016100.00%
9.1.1.6 Container-element overriding [xml-mapping-constraintdeclarationinxml-containerelementconstraints]131313013100.00%
9.1.1.7 Constraint declaration [xml-mapping-constraintdeclarationinxml-constraintdeclaration]99909100.00%
9.1.1.8 Declaration of group conversions [xml-mapping-constraintdeclarationinxml-groupconversions]22202100.00%
9.1.2 Overriding constraint definitions in XML [xml-mapping-constraintdefinition]55505100.00%
9.1.3 Converting the string representation of a value [xml-mapping-typeconversion]121212012100.00%
9.1.4 XML Schema [xml-mapping-xsd]32202100.00%
9.2 Configuration schema [xml-config-xsd]32202100.00%
10 Exception model [exception]11101100.00%
10.1 Error report: ConstraintViolationException [exception-errorreport]00000
10.2 Constraint definition: ConstraintDefinitionException [exception-constraintdefinition]11101100.00%
10.3 Constraint declaration: ConstraintDeclarationException and UnexpectedTypeException [exception-constraintdeclaration]21101100.00%
10.4 Group definition: GroupDefinitionException [exception-groupdefinition]11101100.00%
10.5 Value extractor definition: ValueExtractorDefinitionException [exception-valueextractordefinition]11101100.00%
10.6 Value extractor declaration: ValueExtractorDeclarationException [exception-valueextractordeclaration]11101100.00%
10.7 No Bean Validation Provider detected: NoProviderFoundException [exception-noprovider]10000
11 Integration [integration]00000
11.1 General requirements [integration-general]00000
11.1.1 Objects lifecycle [integration-general-objectslifecycle]64404100.00%
11.1.2 Method and constructor validation [integration-general-executable]171414014100.00%
11.1.2.1 Examples [integration-general-executable-examples]00000
11.2 Java EE [integration-javaee]33303100.00%
11.3 Context and Dependency Injection (CDI) integration [integration-cdi]11101100.00%
11.3.1 ValidatorFactory and Validator [integration-cdi-validatorfactory]11101100.00%
11.3.2 ConstraintValidatorFactory, MessageInterpolator, ParameterNameProvider, ClockProvider, TraversableResolver and ValueExtractor [integration-cdi-customconfiguration]43303100.00%
11.3.3 Method and constructor validation [integration-cdi-methodconstructorvalidation]21101100.00%
11.4 Java Persistence 2.0 integration [integration-jpa]00000
11.5 Java Server Faces 2.0 integration [integration-jsf]00000
11.6 JAX-RS 2 integration [integration-jaxrs]00000

Coverage Detail

Colour Key
Assertion is covered
Assertion is not covered
Assertion test is unimplemented
Assertion is untestable

Section 3.1 - Constraint annotation [constraintsdefinitionimplementation-constraintdefinition]

a)

An annotation is considered a constraint definition if its retention policy contains RUNTIME and if the annotation itself is annotated with javax.validation.Constraint

b)

Generic constraint annotations can target any of the following ElementTypes: FIELD for constrained attributes METHOD for constrained getters and constrained method return values CONSTRUCTOR for constrained constructor return values PARAMETER for constrained method and constructor parameters TYPE for constrained beans ANNOTATIONTYPE for constraints composing other constraints TYPEUSE for container element constraints

c)

Cross-parameter constraint annotations can target any of the following ElementTypes: METHOD CONSTRUCTOR ANNOTATION_TYPE for cross-parameter constraints composing other cross-parameter constraints

d)

A constraint annotation that is both can target the union of the generic and cross-parameter constraint annotations targets.

e)

Applying a constraint annotation to an incompatible type will raise an UnexpectedTypeException.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testUnexpectedTypeInValidatorResolution()github
f)

At most one ConstraintValidator supporting cross-parameter validation must be present for a given constraint. A ConstraintDefinitionException is raised otherwise.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testCrossParameterConstraintWithSeveralValidatorsCausesException()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testCrossParameterConstraintWithValidatorForObjectAndObjectArrayCausesException()github
g)

If a constraint definition is not valid, a ConstraintDefinitionException is raised either at validation time or when the metadata is requested.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithParameterStartingWithValid()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithoutMessageParameter()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithoutGroupParameter()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithoutPayloadParameter()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongDefaultGroupValue()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongDefaultPayloadValue()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongPayloadClass()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongMessageType()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongGroupType()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testGenericAndCrossParameterConstraintWithoutValidationAppliesToCausesException()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testGenericConstraintWithValidationAppliesToCausesException()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testCrossParameterConstraintWithValidationAppliesToCausesException()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongValidationAppliesToType()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongDefaultValidationAppliesTo()github

Section 3.1.1 - Constraint definition properties [constraintsdefinitionimplementation-constraintdefinition-properties]

a)

A constraint definition may have attributes that are specified at the time the constraint is applied to a JavaBean.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintdefinition
Test archive name: 2445b09dd745c47291eae1d64c1e83e74f4e5084
ConstraintDefinitionsTest.testConstraintWithCustomAttributes()github
b)

Annotation elements starting with valid are not allowed

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithParameterStartingWithValid()github

Section 3.1.1.1 - message [constraintsdefinitionimplementation-constraintdefinition-properties-message]

a)

Every constraint annotation must define a message element of type String.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithoutMessageParameter()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongMessageType()github

Section 3.1.1.2 - groups [constraintsdefinitionimplementation-constraintdefinition-properties-groups]

a)

Every constraint annotation must define a groups element that specifies the processing groups with which the constraint declaration is associated.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithoutGroupParameter()github
b)

The type of the groups parameter is Class<?>[].

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongGroupType()github
c)

The default value must be an empty array.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongDefaultGroupValue()github
d)

If no group is specified when declaring the constraint on an element, the Default group is considered declared.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintdefinition
Test archive name: 2445b09dd745c47291eae1d64c1e83e74f4e5084
ConstraintDefinitionsTest.testDefaultGroupAssumedWhenNoGroupsSpecified()github

Section 3.1.1.3 - payload [constraintsdefinitionimplementation-constraintdefinition-properties-payload]

a)

Constraint annotations must define a payload element that specifies the payload with which the constraint declaration is associated. The type of the payload parameter is Payload[].

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithoutPayloadParameter()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongPayloadClass()github
b)

The default value must be an empty array.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongDefaultPayloadValue()github
c)

Each attachable payload extends Payload.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongPayloadClass()github

Section 3.1.1.4 - validationAppliesTo [constraintsdefinitionimplementation-constraintdefinition-properties-validationappliesto]

a)

The element validationAppliesTo must only be present for constraints that are both generic and cross-parameter, it is mandatory in this situation. A ConstraintDefinitionException is raised if these rules are violated.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testGenericAndCrossParameterConstraintWithoutValidationAppliesToCausesException()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testGenericConstraintWithValidationAppliesToCausesException()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testCrossParameterConstraintWithValidationAppliesToCausesException()github
b)

The type of the validationAppliesTo parameter is ConstraintTarget. The default value must be ConstraintTarget.IMPLICIT.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongValidationAppliesToType()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongDefaultValidationAppliesTo()github
c)

If a ConstraintTarget is used in an illegal situation, a ConstraintDeclarationException is raised either at validation time or when the metadata is requested.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.crossparameter
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetImplicitOnMethodWithParametersAndReturnValueCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetImplicitOnConstructorWithParametersCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetParametersOnMethodWithoutParametersCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetParametersOnConstructorWithoutParametersCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetReturnValueOnVoidMethodCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetParametersOnClassCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetReturnValueOnClassCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetParametersOnInterfaceCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetReturnValueOnInterfaceCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetParametersOnFieldCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetReturnValueOnFieldCausesException()github
d)

Using IMPLICIT in a situation that cannot be inferred (see the JavaDoc for the detailed rules),

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.crossparameter
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetImplicitOnMethodWithParametersAndReturnValueCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetImplicitOnConstructorWithParametersCausesException()github
e)

Using PARAMETERS on a constructor or method that has no parameter,

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.crossparameter
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetParametersOnMethodWithoutParametersCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetParametersOnConstructorWithoutParametersCausesException()github
f)

Using RETURN_VALUE on a method with no return value,

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.crossparameter
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetReturnValueOnVoidMethodCausesException()github
g)

Using PARAMETERS or RETURN_VALUE on a type - class or interface - or on a field.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.crossparameter
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetParametersOnClassCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetReturnValueOnClassCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetParametersOnInterfaceCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetReturnValueOnInterfaceCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetParametersOnFieldCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetReturnValueOnFieldCausesException()github

Section 3.2 - Applying multiple constraints of the same type [constraintsdefinitionimplementation-multipleconstraints]

a)

The Bean Validation provider treats regular annotations (annotations not annotated by @Constraint) whose value element has a return type of an array of constraint annotations in a special way. Each element in the value array are processed by the Bean Validation implementation as regular constraint annotations.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintdefinition
Test archive name: 2445b09dd745c47291eae1d64c1e83e74f4e5084
ConstraintDefinitionsTest.testConstraintWithCustomAttributes()github
Test archive name: 2445b09dd745c47291eae1d64c1e83e74f4e5084
ConstraintDefinitionsTest.testRepeatableConstraint()github
b)

This marks the constraint annotation type as repeatable and lets users specify the constraint several times without explicitly using the List annotation.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintdefinition
Test archive name: 2445b09dd745c47291eae1d64c1e83e74f4e5084
ConstraintDefinitionsTest.testRepeatableConstraint()github

Section 3.3 - Constraint composition [constraintsdefinitionimplementation-constraintcomposition]

a)

More formally, each constraint annotation hosted on a constraint annotation is applied to the target element and this is done recursively.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testComposedConstraints()github
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testComposedConstraintsAreRecursive()github
b)

Note that the main annotation and its constraint validation implementation is also applied.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testValidationOfMainAnnotationIsAlsoApplied()github
c)

By default, each failing constraint generates an error report.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testEachFailingConstraintCreatesConstraintViolation()github
d)

Groups from the main constraint annotation are inherited by the composing annotations.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testGroupsDefinedOnMainAnnotationAreInherited()github
e)

Any groups definition on a composing annotation is ignored.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testGroupsDefinedOnMainAnnotationAreInherited()github
f)

Payload from the main constraint annotation is inherited by the composing annotations.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testPayloadPropagationInComposedConstraints()github
g)

Any payload definition on a composing annotation is ignored.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testPayloadPropagationInComposedConstraints()github
h)

The constraint target from the main constraint annotation is inherited by the composing annotations.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testConstraintTargetPropagationInComposedConstraints()github
i)

Any validationAppliesTo definition on a composing annotation is ignored.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testConstraintTargetPropagationInComposedConstraints()github
j)

The type upon which composed constraint is placed must be compatible with all constraints (composing and composed).

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testAllComposingConstraintsMustBeApplicableToAnnotatedType()github
k)

All composed and composing constraints must have a constraint type in common.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testMixedConstraintTargetsInComposedAndComposingConstraintsCauseException()github
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testMixedConstraintTargetsInComposingConstraintsCauseException()github
l)

More specifically, if a composed constraint is marked as @ReportAsSingleViolation, the evaluation of the composing constraints stops at the first failing constraint and the error report corresponding to the composed constraint is generated and returned.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition.nestedconstraintcomposition
Test archive name: 752efa28572c5bcde591471997b705f4098a416
NestedConstraintCompositionTest.testCompositeConstraint1WithNestedConstraintSingleViolation()github
Test archive name: 752efa28572c5bcde591471997b705f4098a416
NestedConstraintCompositionTest.testCompositeConstraint2WithNestedConstraintSingleViolation()github
Test archive name: 752efa28572c5bcde591471997b705f4098a416
NestedConstraintCompositionTest.testCompositeConstraint3WithNestedConstraint()github
Test archive name: 752efa28572c5bcde591471997b705f4098a416
NestedConstraintCompositionTest.testCompositeConstraint4WithNestedConstraintSingleViolation()github
org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testOnlySingleConstraintViolation()github
m)

Composing annotations can define the value of message and custom attributes (excluding groups, payload and validationAppliesTo) but these are fixed in the composed constraint definition.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testAttributesDefinedOnComposingConstraints()github
n)

It is possible to override attributes and messages defined on a composing annotation. An attribute from the main annotation is used to override one or more attributes of the composing annotations. Such an attribute is annotated with one or more @OverridesAttribute annotations.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testEachFailingConstraintCreatesConstraintViolation()github
o)

If left undefined, the default value for @OverridesAttribute.name is the name of the composed constraint attribute hosting the @OverridesAttribute annotation.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testOverridesAttributeWithDefaultName()github
p)

The types of the overridden and overriding attributes must be identical.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testOverriddenAttributesMustMatchInType()github
q)

A composing constraint can itself be a composed constraint. In this case, attribute values are overridden recursively according to the described rules.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testComposedConstraints()github
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testComposedConstraintsAreRecursive()github
r)

If a constraint is used more than once as a composing constraint, the multi value constraints model as described in 3.2 is used.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testEachFailingConstraintCreatesConstraintViolation()github
s)

If the composing constraints are directly given on the composed constraint (i.e. via the repeatable annotation feature), constraintIndex refers to the left-to-right order of the constraints of this type in which they are given on the composed constraint.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testEachFailingConstraintCreatesConstraintViolation()github
t)

If the composing constraints are specified using their corresponding List annotation, constraintIndex refers to the index within the value array.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testConstraintIndexWithListContainer()github
u)

A composing constraint must not be given directly on the composed constraint and using the corresponding List annotation at the same time. A ConstraintDeclarationException will be raised in this case.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testConstraintIndexWithMixDirectAnnotationAndListContainer()github
v)

If index is undefined, the single constraint declaration is targeted.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testEachFailingConstraintCreatesConstraintViolation()github
w)

If the composition is invalid, e.g. infinitely recursive composition wrong attribute overriding a single attribute mapped to more than one source attribute a composing and composed constraint marked as different constraint types (i.e., generic and cross-parameter) etc. a ConstraintDefinitionException is raised either at validation time or when the metadata is requested.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.constraintcomposition
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testOverriddenAttributesMustMatchInType()github
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testMixedConstraintTargetsInComposedAndComposingConstraintsCauseException()github
Test archive name: dc10422a7b34ed9ca34207bbda07c10491fc3e4
ConstraintCompositionTest.testMixedConstraintTargetsInComposingConstraintsCauseException()github

Section 3.4 - Constraint validation implementation [constraintsdefinitionimplementation-validationimplementation]

a)

A constraint validation implementation performs the validation of a given constraint annotation for a given type.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.customconstraint
Test archive name: f0202f19b1c7a1ea7bafc2a8552fba99d8ef48c
CustomConstraintValidatorTest.testRightValidatorIsSelectedAndInitializedCalled()github
Test archive name: f0202f19b1c7a1ea7bafc2a8552fba99d8ef48c
CustomConstraintValidatorTest.testIsValidIsCalledForEachValidation()github
b)

The implementation classes are specified by the validatedBy element of the @Constraint annotation that decorates the constraint definition.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.customconstraint
Test archive name: f0202f19b1c7a1ea7bafc2a8552fba99d8ef48c
CustomConstraintValidatorTest.testRightValidatorIsSelectedAndInitializedCalled()github
Test archive name: f0202f19b1c7a1ea7bafc2a8552fba99d8ef48c
CustomConstraintValidatorTest.testIsValidIsCalledForEachValidation()github
org.hibernate.beanvalidation.tck.tests.constraints.crossparameter
Test archive name: 917055e31921558f8d6290f1dfaa427691e645b1
GenericAndCrossParameterConstraintTest.testAnnotatedElementIsTargetedByDefault()github
c)

The constraint validation implementation implements the ConstraintValidator interface.

d)

Some restrictions apply on the generic type T (used in the isValid() method). T must resolve to a non parameterized type (i.e. because the type is not using generics or because the raw type is used instead of the generic version) or generic parameters of T must be unbounded wildcard types (i.e. <?>).

e)

By default, a ConstraintValidator targets the (returned) element annotated by the constraint. You can make a ConstraintValidator target the array of parameters of a method or constructor (aka cross-parameter) by annotating the validator implementation with @SupportedValidationTarget.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.crossparameter
Test archive name: 917055e31921558f8d6290f1dfaa427691e645b1
GenericAndCrossParameterConstraintTest.testAnnotatedElementIsTargetedUsingSupportedValidationTarget()github
Test archive name: 917055e31921558f8d6290f1dfaa427691e645b1
GenericAndCrossParameterConstraintTest.testParametersAreTargetedUsingSupportedValidationTarget()github
Test archive name: 917055e31921558f8d6290f1dfaa427691e645b1
GenericAndCrossParameterConstraintTest.testAnnotatedElementIsTargetedByDefault()github
f)

A ConstraintValidator implementation can target both annotated elements and array of parameters.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.crossparameter
Test archive name: 917055e31921558f8d6290f1dfaa427691e645b1
GenericAndCrossParameterConstraintTest.testOneValidatorSupportsBothValidationTargets()github
g)

If a ConstraintValidator targets array of parameters (cross-parameter), T must resolve to Object[] (or Object) in order to have the array of parameter values passed to the isValid() method. A ConstraintDefinitionException is raised otherwise.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testValidatorForCrossParameterConstraintMustValidateObjectOrObjectArray()github
org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testCrossParameterValidatorValidatingObjectArray()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testCrossParameterValidatorValidatingObject()github
h)

The initialize() method is called by the Bean validation provider prior to any use of the constraint implementation.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.customconstraint
Test archive name: f0202f19b1c7a1ea7bafc2a8552fba99d8ef48c
CustomConstraintValidatorTest.testRightValidatorIsSelectedAndInitializedCalled()github
i)

As of Bean Validation 2.0, initialize() has an empty default implementation, allowing to omit the implementation from validators that don't need to access any constraint attributes.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.customconstraint
Test archive name: f0202f19b1c7a1ea7bafc2a8552fba99d8ef48c
CustomConstraintValidatorTest.testConstraintValidatorHasADefaultInitializeMethod()github
j)

The isValid() method is evaluated by the Bean Validation provider each time a given value is validated.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.customconstraint
Test archive name: f0202f19b1c7a1ea7bafc2a8552fba99d8ef48c
CustomConstraintValidatorTest.testIsValidIsCalledForEachValidation()github
k)

It returns false if the value is not valid, true otherwise.

l)

isValid() implementations must be thread-safe.

m)

If the property is of an unanticipated type, an UnexpectedTypeException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.customconstraint
Test archive name: f0202f19b1c7a1ea7bafc2a8552fba99d8ef48c
CustomConstraintValidatorTest.testUnexpectedTypeExceptionIsRaisedForInvalidType()github
org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testUnexpectedTypeInValidatorResolution()github
n)

If an exception occurs either in the initialize() or isValid() method, the runtime exception is wrapped into a ValidationException by the Bean Validation engine.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.customconstraint
Test archive name: f0202f19b1c7a1ea7bafc2a8552fba99d8ef48c
CustomConstraintValidatorTest.testRuntimeExceptionFromIsValidIsWrapped()github
Test archive name: f0202f19b1c7a1ea7bafc2a8552fba99d8ef48c
CustomConstraintValidatorTest.testRuntimeExceptionFromInitializeIsWrapped()github
org.hibernate.beanvalidation.tck.tests.time
Test archive name: 61774ad4505d8a2bc4f9e44f96f7e9e89511ee7
ClockProviderTest.testClockProviderExceptionsGetWrappedInValidationException()github
o)

The constraint validation implementation is not allowed to change the state of the value passed to isValid().

p)

By default, each invalid constraint leads to the generation of one error object represented by a ConstraintViolation object. This object is built from the default constraint message template as defined by the constraint declaration and the context in which the constraint declaration is placed (bean, property, executable parameter, cross-parameter, executable return value or container element).

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.customconstraint
Test archive name: f0202f19b1c7a1ea7bafc2a8552fba99d8ef48c
CustomConstraintValidatorTest.testOneConstraintViolationPerFailingConstraint()github
org.hibernate.beanvalidation.tck.tests.validation.validatorcontext
Test archive name: e6b764edd4ee975dd9db78644a62a720612a71f9
ConstraintValidatorContextTest.testDefaultError()github
q)

The ConstraintValidatorContext methods let the constraint implementation disable the default ConstraintViolation generation and create one or more custom ones.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.validatorcontext
Test archive name: e6b764edd4ee975dd9db78644a62a720612a71f9
ConstraintValidatorContextTest.testDisableDefaultErrorWithCustomErrorNoSubNode()github
Test archive name: e6b764edd4ee975dd9db78644a62a720612a71f9
ConstraintValidatorContextTest.testDisableDefaultErrorWithCustomErrorWithSubNode()github
Test archive name: e6b764edd4ee975dd9db78644a62a720612a71f9
ConstraintValidatorContextTest.propertyPathInIterable()github
r)

The non-interpolated message passed as a parameter is used to build the ConstraintViolation message (the message interpolation operation is applied to it).

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.customconstraint
Test archive name: f0202f19b1c7a1ea7bafc2a8552fba99d8ef48c
CustomConstraintValidatorTest.testNonInterpolatedMessageParameterIsUsed()github
s)

By default, the Path exposed on the ConstraintViolation represents the path to the bean, property, parameter, cross-parameter, return value or container element hosting the constraint (see 6.2 for more information).

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.customconstraint
Test archive name: f0202f19b1c7a1ea7bafc2a8552fba99d8ef48c
CustomConstraintValidatorTest.testDefaultPropertyPath()github
org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testGraphValidationWithList()github
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testGraphValidationWithArray()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorReturnValueConstraint()github
t)

You can point it to a subpath of this default path by using the constraint violation builder fluent API.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.validatorcontext
Test archive name: e6b764edd4ee975dd9db78644a62a720612a71f9
ConstraintValidatorContextTest.testDisableDefaultErrorWithCustomErrorWithSubNode()github
Test archive name: e6b764edd4ee975dd9db78644a62a720612a71f9
ConstraintValidatorContextTest.propertyPathInIterable()github
u)

If disableDefaultConstraintViolation() is called, no custom error is added (using the error builder) and if the constraint is not valid, a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.validatorcontext
Test archive name: e6b764edd4ee975dd9db78644a62a720612a71f9
ConstraintValidatorContextTest.testDisableDefaultErrorWithoutAddingCustomError()github

Section 3.4.1 - Implementation of temporal constraint validators [constraintsdefinitionimplementation-validationimplementation-temporalvalidators]

a)

Constraint validators for temporal constraints (either the built-in constraints @Past, @PastOrPresent, @Future and @FutureOrPresent or custom temporal constraints) can obtain the current instant from the ClockProvider object exposed by ConstraintValidatorContext#getClockProvider().

Coverage

org.hibernate.beanvalidation.tck.tests.time
Test archive name: 61774ad4505d8a2bc4f9e44f96f7e9e89511ee7
ClockProviderTest.testClockProviderProviderByConstraintValidatorContext()github
b)

The getClock() method returns a java.time.Clock object which represents the current instant, date and time using a time zone. A conforming Bean Validation implementation provides a default clock provider which returns a clock representing the current system time and default time zone.

Coverage

org.hibernate.beanvalidation.tck.tests.time
Test archive name: 61774ad4505d8a2bc4f9e44f96f7e9e89511ee7
ClockProviderTest.testClockProviderProviderByConstraintValidatorContext()github

Section 3.5 - The ConstraintValidatorFactory [constraintsdefinitionimplementation-constraintfactory]

a)

Bean Validation providers must release each instance retrieved. The ConstraintValidatorFactory instance that has created a ConstraintValidator instance must be the one that releases it. In other words, passing an instance of ConstraintValidator to a ConstraintValidatorFactory that has not created it is an error.

b)

The default ConstraintValidatorFactory provided by the Bean Validation provider implementation uses the public no-arg constructor of the ConstraintValidator class.

Coverage

org.hibernate.beanvalidation.tck.tests.validatorfactory
Test archive name: 170c61972151f665dfca5a542df6b11de2f5754
CustomConstraintValidatorTest.testDefaultConstructorInValidatorCalled()github
c)

If an exception occurs in the factory while retrieving the ConstraintValidator instance, the runtime exception is wrapped in a ValidationException.

Coverage

org.hibernate.beanvalidation.tck.tests.validatorfactory
Test archive name: 170c61972151f665dfca5a542df6b11de2f5754
CustomConstraintValidatorTest.testRuntimeExceptionInValidatorCreationIsWrapped()github
d)

If the instance returned by the factory is null, a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.validatorfactory
Test archive name: 170c61972151f665dfca5a542df6b11de2f5754
CustomConstraintValidatorTest.testValidationExceptionIsThrownInCaseFactoryReturnsNull()github

Section 4 - Value extractor definition [valueextractordefinition]

a)

The validation engine passes the container instance and a value receiver object to the extractValues() method.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.definition
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.instanceAndValueReceiverPassedToExtractValues()github
b)

The value extractor is only invoked if the container is not null.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.definition
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.valueExtractorNotInvokedIfContainerIsNull()github
c)

Value(), the given value will be passed to the validation engine

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.definition
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.value()github
d)

iterableValue(), the given value will be passed to the validation engine and the corresponding property path node (see 6.2) will be marked as iterable, i.e. Node#isInIterable() returns true

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.definition
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.iterableValue()github
e)

indexedValue(), the given value will be passed to the validation engine and the corresponding property path node will be marked as iterable and it will have set the given index, i.e. Node#getIndex() returns the given index value

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.definition
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.indexedValue()github
f)

keyedValue(), the given value will be passed to the validation engine and the corresponding property path node will be marked as iterable and it will have set the given key, i.e. Node#getKey() returns the given key value

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.definition
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.keyedValue()github
g)

When passing a non-null node name to any of the receiver methods, this node name will be used when adding a node of kind CONTAINER_ELEMENT to the property path (see 6.2 for the property path construction rules).

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.definition
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.value()github
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.iterableValue()github
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.indexedValue()github
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.keyedValue()github
h)

If null is passed as node name, no node will be appended to the property path. The resulting property path will then be the same as if the constraint had been given on the container instead of a container element. That is desirable for single-element wrapper types such as Optional, OptionalInt etc.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.definition
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.nullNodeName()github
i)

If an exception occurs during invocation of the extractValues() method, this exception is wrapped into a ValidationException by the Bean Validation engine.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.runtime
Test archive name: 744bbb7877157b360c5b96a4a219d64212ced25
ValueExtractorExceptionWrapping.exception_in_value_extractor_is_wrapped()github
j)

When validating the @NotNull constraint, the map as returned by the getter will be passed to the map key extractor in order to obtain the map keys.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.definition
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.valuePassedToExtractorRetrievedFromHost()github
k)

When validating the @RetailOrder constraint and performing cascaded validation, the map as obtained directly from the field will be passed to the map value extractor in order to obtain the map values.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.definition
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.valuePassedToExtractorRetrievedFromHost()github

Section 4.1 - @ExtractedValue [valueextractordefinition-extractedvalue]

a)

The @ExtractedValue annotation is used to denote the element extracted by a given value extractor

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.definition
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.instanceAndValueReceiverPassedToExtractValues()github
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.value()github
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.iterableValue()github
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.indexedValue()github
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.keyedValue()github
b)

The @ExtractedValue annotation must be specified exactly once for a value extractor type.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.definition
Test archive name: 61499743c7a63eb856395f1d4dbd99f469f0ec
InvalidValueExtractorTest.severalExtractedValuesThrowException()github
Test archive name: 61499743c7a63eb856395f1d4dbd99f469f0ec
InvalidValueExtractorTest.noExtractedValueThrowsException()github
c)

For generic container types (e.g. java.util.List), @ExtractedValue is to be specified on a type argument of the container type as used in the extractor definition.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.definition
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.instanceAndValueReceiverPassedToExtractValues()github
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.value()github
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.iterableValue()github
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.indexedValue()github
Test archive name: 76e29187a376e1ff2b69384b1745e8e2c223478
ValueExtractorDefinitionTest.keyedValue()github
d)

Only unbounded wildcard type arguments are supported as target for @ExtractedValue in this case.

e)

For non-generic container types (e.g. java.util.OptionalInt), @ExtractedValue is to be specified on the container type as used in the extractor definition. The type of the wrapped element(s) must be specified using @ExtractedValue#type() in this case.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.unwrapping
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_value_extractor_unwraps_by_default_for_non_generic_container()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapper_if_unwrapping_disabled_per_constraint_for_non_generic_container()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_value_extractor_unwraps_by_default_and_unwrapping_enabled_per_constraint_for_non_generic_container()github
f)

In case an illegal value extractor definition is detected, a ValueExtractorDefinitionException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.definition
Test archive name: 61499743c7a63eb856395f1d4dbd99f469f0ec
InvalidValueExtractorTest.severalExtractedValuesThrowException()github
Test archive name: 61499743c7a63eb856395f1d4dbd99f469f0ec
InvalidValueExtractorTest.noExtractedValueThrowsException()github

Section 4.2 - @UnwrapByDefault [valueextractordefinition-unwrapbydefault]

a)

This causes constraints to be automatically applied to the wrapped value(s) if a constraint is found for an element of a type handled by that extractor

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.unwrapping
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_value_extractor_unwraps_by_default_for_generic_container()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_value_extractor_unwraps_by_default_for_non_generic_container()github

Section 4.3 - Built-in value extractors [valueextractordefinition-builtinvalueextractors]

a)

java.util.Iterable; iterableValue() must be invoked for each contained element, passing the string literal <iterable element> as node name

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.builtin
Test archive name: a4d33dcd2e2beca9d961c3ee979805f8f2341
IterableValueExtractorTest.iterableValueExtractor()github
b)

java.util.List; indexedValue() must be invoked for each contained element, passing the string literal <list element> as node name

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.builtin
Test archive name: 70dd2068703e7c3ec25893356b557d63a80d11c
ListValueExtractorTest.listValueExtractor()github
c)

java.util.Map; both map keys and map values are to be supported; keyedValue() must be invoked by the map key extractor for each contained key, passing the string literal <map key> as node name; keyedValue() must be invoked by the map value extractor for each contained value, passing the string literal <map value> as node name

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.builtin
Test archive name: 684cd6c5d947defdd2f7e121689f7d6cb3ebf3ba
MapValueExtractorTest.mapValueExtractor()github
d)

java.util.Optional; value() must be invoked, passing null as node name and passing the contained object as value or null if none is present

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.builtin
Test archive name: 59eeb5b044dfcdade6932da857d7294a6dd2e3da
OptionalValueExtractorTest.optionalValueExtractor()github
e)

java.util.OptionalInt, java.util.OptionalLong and java.util.OptionalDouble; the extracted value types must be java.lang.Integer, java.lang.Long and java.lang.Double, respectively. value() must be invoked, passing null as node name and passing the contained number as value or null if none is present. The extractors must be marked with @UnwrapByDefault.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.builtin
Test archive name: 59eeb5b044dfcdade6932da857d7294a6dd2e3da
OptionalValueExtractorTest.optionalIntValueExtractor()github
Test archive name: 59eeb5b044dfcdade6932da857d7294a6dd2e3da
OptionalValueExtractorTest.optionalLongValueExtractor()github
Test archive name: 59eeb5b044dfcdade6932da857d7294a6dd2e3da
OptionalValueExtractorTest.optionalDoubleValueExtractor()github
f)

javafx.beans.observable.ObservableValue; value() must be invoked with the observable value, passing null as node name; the extractor must be marked with @UnwrapByDefault

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.builtin
Test archive name: 839e17b42fb2562de25117c3e67e4eb2a4eaa3f6
JavaFXValueExtractorsTest.testJavaFXBasicProperties()github
Test archive name: 839e17b42fb2562de25117c3e67e4eb2a4eaa3f6
JavaFXValueExtractorsTest.testValueExtractionForListOfStringProperty()github
g)

javafx.beans.property.ReadOnlyListProperty and javafx.beans.property.ListProperty; indexedValue() must be invoked for each contained element, passing the string literal <list element> as node name

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.builtin
Test archive name: 839e17b42fb2562de25117c3e67e4eb2a4eaa3f6
JavaFXValueExtractorsTest.testValueExtractionForPropertyList()github
Test archive name: 839e17b42fb2562de25117c3e67e4eb2a4eaa3f6
JavaFXValueExtractorsTest.testValueExtractionForListOfStringProperty()github
h)

javafx.beans.property.ReadOnlySetProperty and javafx.beans.property.SetProperty; iterableValue() must be invoked for each contained element, passing the string literal <iterable element> as node name

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.builtin
Test archive name: 839e17b42fb2562de25117c3e67e4eb2a4eaa3f6
JavaFXValueExtractorsTest.testValueExtractionForPropertySet()github
i)

javafx.beans.property.ReadOnlyMapProperty and javafx.beans.property.MapProperty; both map keys and map values are to be supported; keyedValue() must be invoked by the map key extractor for each contained key, passing the string literal <map key> as node name; keyedValue() must be invoked by the map value extractor for each contained value, passing the string literal <map value> as node name

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.builtin
Test archive name: 839e17b42fb2562de25117c3e67e4eb2a4eaa3f6
JavaFXValueExtractorsTest.testValueExtractionForPropertyMap()github

Section 4.4 - Examples [valueextractordefinition-examples]

a)

The following extractor definition is illegal as it specifies @ExtractedValue more than once

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.definition
Test archive name: 61499743c7a63eb856395f1d4dbd99f469f0ec
InvalidValueExtractorTest.severalExtractedValuesThrowException()github
b)

The following extractor definition is unsupported as it specifies @ExtractedValue on a non-wildcard type argument

Section 5.1 - Requirements on classes to be validated [constraintdeclarationvalidationprocess-requirements]

a)

Properties to be validated must follow the method signature conventions for JavaBeans read properties, as defined by the JavaBeans specification. These properties are commonly referred as getters.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testUnexpectedTypeException()github
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testConstraintViolation()github
b)

Static fields and static methods are excluded from validation.

c)

Constraints can be applied to interfaces and superclasses.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application
Test archive name: 6da7f319b562d40c76fd292dafc4c41e25e54be
ValidationRequirementTest.testClassLevelConstraints()github
d)

The JavaBeans specification specifies that a getter is a method whose name starts with get and has a return type but no parameter name starts with is, has no parameter and is returning boolean

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 6f39b733fcd5c75162ef69ac77855134ceff145f
GetterDefinitionTest.testGetterMethod()github
Test archive name: 6f39b733fcd5c75162ef69ac77855134ceff145f
GetterDefinitionTest.testBooleanGetterMethod()github
e)

The target of an annotation definition can be a type field or property constructor or method return value constructor or method parameter constructor or method cross-parameter container element provided that: the constraint definition supports the specified target (java.lang.annotation.Target) one of the ConstraintValidators declared on the constraint supports the declared type of the target or in the case of cross-parameter, one cross-parameter ConstraintValidator is present (see 5.7.4 to learn about ConstraintValidator resolution) in the case of container element constraints, a corresponding value extractor exists (see 5.7.5 for the details of value extractor resolution)

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application
Test archive name: 6da7f319b562d40c76fd292dafc4c41e25e54be
ValidationRequirementTest.testClassLevelConstraints()github
Test archive name: 6da7f319b562d40c76fd292dafc4c41e25e54be
ValidationRequirementTest.testFieldAccess()github
Test archive name: 6da7f319b562d40c76fd292dafc4c41e25e54be
ValidationRequirementTest.testPropertyAccess()github

Section 5.1.1 - Object validation [constraintdeclarationvalidationprocess-requirements-objectvalidation]

a)

Constraint declarations can be applied to a class or an interface.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application
Test archive name: 6da7f319b562d40c76fd292dafc4c41e25e54be
ValidationRequirementTest.testClassLevelConstraints()github
b)

Applying a constraint to a class or interface expresses a validation over the state of the class or the class implementing the interface.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application
Test archive name: 6da7f319b562d40c76fd292dafc4c41e25e54be
ValidationRequirementTest.testClassLevelConstraints()github

Section 5.1.2 - Field and property validation [constraintdeclarationvalidationprocess-requirements-propertyvalidation]

a)

Constraint declarations can be applied on both fields and properties for the same object type.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application
Test archive name: 6da7f319b562d40c76fd292dafc4c41e25e54be
ValidationRequirementTest.testFieldAccess()github
Test archive name: 6da7f319b562d40c76fd292dafc4c41e25e54be
ValidationRequirementTest.testPropertyAccess()github
Test archive name: 6da7f319b562d40c76fd292dafc4c41e25e54be
ValidationRequirementTest.testConstraintAppliedOnFieldAndProperty()github
b)

The same constraint should however not be duplicated between a field and its associated property (the constraint validation would be applied twice).

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application
Test archive name: 6da7f319b562d40c76fd292dafc4c41e25e54be
ValidationRequirementTest.testConstraintAppliedOnFieldAndProperty()github
c)

When a field is annotated with a constraint declaration, field access strategy is used to access the state validated by such constraint.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application
Test archive name: 6da7f319b562d40c76fd292dafc4c41e25e54be
ValidationRequirementTest.testFieldAccess()github
d)

When a property is annotated with a constraint declaration, property access strategy is used to access the state validated by such constraint.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application
Test archive name: 6da7f319b562d40c76fd292dafc4c41e25e54be
ValidationRequirementTest.testPropertyAccess()github
e)

The fields or methods visibility are not constrained.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application
Test archive name: 6da7f319b562d40c76fd292dafc4c41e25e54be
ValidationRequirementTest.testFieldAndPropertyVisibilityIsNotConstrained()github

Section 5.1.3 - Graph validation [constraintdeclarationvalidationprocess-requirements-graphvalidation]

a)

Consider the situation where bean X contains a field of type Y. By annotating field Y with the @Valid annotation, the Validator will validate Y (and its properties) when X is validated.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testGraphNavigationDeterminism()github
b)

The exact type Z of the value contained in the field declared of type Y (subclass, implementation) is determined at runtime. The constraint definitions of Z are used.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testTypeOfContainedValueIsDeterminedAtRuntime()github
c)

Any object implementing java.lang.Iterable is supported.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testContainedIterable()github
org.hibernate.beanvalidation.tck.tests.validation.graphnavigation.containerelement
Test archive name: b324e819ed2fdce45d7cc2dd3ae78388fa6fc8
LegacyValidOnContainerCascadingTest.testValidOnIterable()github
d)

Arrays of objects

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testGraphValidationWithArray()github
e)

java.util.Collection

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testTypeOfContainedValuesIsDeterminedAtRuntime()github
f)

java.util.Set

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testContainedSet()github
org.hibernate.beanvalidation.tck.tests.validation.graphnavigation.containerelement
Test archive name: b324e819ed2fdce45d7cc2dd3ae78388fa6fc8
LegacyValidOnContainerCascadingTest.testValidOnList()github
Test archive name: b324e819ed2fdce45d7cc2dd3ae78388fa6fc8
LegacyValidOnContainerCascadingTest.testValidOnListAndOnTypeArgument()github
Test archive name: b324e819ed2fdce45d7cc2dd3ae78388fa6fc8
LegacyValidOnContainerCascadingTest.testValidOnListWithoutTypeArgument()github
Test archive name: b324e819ed2fdce45d7cc2dd3ae78388fa6fc8
LegacyValidOnContainerCascadingTest.testValidOnListAndOnTypeArgumentWithGroupConversions()github
Test archive name: b324e819ed2fdce45d7cc2dd3ae78388fa6fc8
LegacyValidOnContainerCascadingTest.testValidOnArray()github
g)

java.util.List

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testNoEndlessLoop()github
h)

java.util.Map

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testContainedMap()github
org.hibernate.beanvalidation.tck.tests.validation.graphnavigation.containerelement
Test archive name: b324e819ed2fdce45d7cc2dd3ae78388fa6fc8
LegacyValidOnContainerCascadingTest.testValidOnMap()github
i)

Each object provided by the iterator is validated.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testGraphValidationWithArray()github
org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testContainedSet()github
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testContainedIterable()github
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testContainedMap()github
org.hibernate.beanvalidation.tck.tests.validation.graphnavigation.containerelement
Test archive name: b324e819ed2fdce45d7cc2dd3ae78388fa6fc8
LegacyValidOnContainerCascadingTest.testValidOnList()github
Test archive name: b324e819ed2fdce45d7cc2dd3ae78388fa6fc8
LegacyValidOnContainerCascadingTest.testValidOnListAndOnTypeArgument()github
Test archive name: b324e819ed2fdce45d7cc2dd3ae78388fa6fc8
LegacyValidOnContainerCascadingTest.testValidOnListWithoutTypeArgument()github
Test archive name: b324e819ed2fdce45d7cc2dd3ae78388fa6fc8
LegacyValidOnContainerCascadingTest.testValidOnListAndOnTypeArgumentWithGroupConversions()github
Test archive name: b324e819ed2fdce45d7cc2dd3ae78388fa6fc8
LegacyValidOnContainerCascadingTest.testValidOnIterable()github
Test archive name: b324e819ed2fdce45d7cc2dd3ae78388fa6fc8
LegacyValidOnContainerCascadingTest.testValidOnMap()github
Test archive name: b324e819ed2fdce45d7cc2dd3ae78388fa6fc8
LegacyValidOnContainerCascadingTest.testValidOnArray()github
j)

For Map, the value (retrieved by getValue) of each Map.Entry is validated (the key is not validated).

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testContainedMap()github
org.hibernate.beanvalidation.tck.tests.validation.graphnavigation.containerelement
Test archive name: b324e819ed2fdce45d7cc2dd3ae78388fa6fc8
LegacyValidOnContainerCascadingTest.testValidOnMap()github
k)

Like regular references, its type is determined at runtime and the constraint definitions for this particular type are used.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testTypeOfContainedValuesIsDeterminedAtRuntime()github
l)

As of Bean Validation 2.0, @Valid can be applied to the elements of any generic container by putting it to the type argument(s) when using such container (e.g. MultiMap<String, @Valid Address> addressesByType), provided a value extractor implementation (see 4) for that container type and the targeted type argument is present.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation.containerelement
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.cascading_on_container_element_of_method_return_value_is_applied()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.cascading_on_container_element_of_method_parameter_is_applied()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.cascading_on_container_element_of_constructor_parameter_is_applied()github
Test archive name: 32ce26cfce3a132ac2060175f772fa916d8affa
NestedCascadingOnContainerElementsTest.testNestedValid()github
Test archive name: 32ce26cfce3a132ac2060175f772fa916d8affa
NestedCascadingOnContainerElementsTest.testNestedValidWithTwoInnerExtractions()github
Test archive name: 32ce26cfce3a132ac2060175f772fa916d8affa
NestedCascadingOnContainerElementsTest.testMultipleNestedValidWithCustomExtractor()github
Test archive name: 32ce26cfce3a132ac2060175f772fa916d8affa
NestedCascadingOnContainerElementsTest.testNestedNullValue()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_list_parameter_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_map_parameter_value_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_map_parameter_key_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_optional_parameter_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_set_parameter_and_cascading_gets_validated()github
m)

@Valid also allows the validation of the elements of nested generic containers. @Valid must be put to a type argument of that nested container type in order to trigger validation of the elements of all the nested containers.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation.containerelement
Test archive name: 32ce26cfce3a132ac2060175f772fa916d8affa
NestedCascadingOnContainerElementsTest.testNestedValid()github
Test archive name: 32ce26cfce3a132ac2060175f772fa916d8affa
NestedCascadingOnContainerElementsTest.testNestedValidWithTwoInnerExtractions()github
Test archive name: 32ce26cfce3a132ac2060175f772fa916d8affa
NestedCascadingOnContainerElementsTest.testMultipleNestedValidWithCustomExtractor()github
Test archive name: 32ce26cfce3a132ac2060175f772fa916d8affa
NestedCascadingOnContainerElementsTest.testNestedNullValue()github
n)

The @Valid annotation is applied recursively.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testGraphNavigationDeterminism()github
o)

It is not supported to put @Valid to the type parameters of generic types or methods.

p)

It is also not supported to put @Valid to type arguments within the extends or implements clauses of type definitions.

Section 5.2 - Constraint declaration [constraintdeclarationvalidationprocess-constraintdeclaration]

a)

When a constraint is defined on a class, the class instance being validated is passed to the ConstraintValidator. When a constraint is defined on a field, the value of the field is passed to the ConstraintValidator. When a constraint is defined on a getter, the result of the getter invocation is passed to the ConstraintValidator.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 48cabd69b824abe373d131ff57b25af52a61184
ValueAccessStrategyTest.testValidatedObjectIsPassedToValidatorOfClassLevelConstraint()github
Test archive name: 48cabd69b824abe373d131ff57b25af52a61184
ValueAccessStrategyTest.testValueFromFieldIsPassedToValidatorOfFieldLevelConstraint()github
Test archive name: 48cabd69b824abe373d131ff57b25af52a61184
ValueAccessStrategyTest.testValueFromGetterIsPassedToValidatorOfPropertyLevelConstraint()github

Section 5.3 - Inheritance (interface and superclass) [constraintdeclarationvalidationprocess-inheritance]

a)

A constraint declaration can be placed on an interface.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.inheritance
Test archive name: 198ec6c45538ff48c51826b2cbe6aa42fde3915
ConstraintInheritanceTest.testConstraintsOnInterfaceAreInherited()github
Test archive name: 198ec6c45538ff48c51826b2cbe6aa42fde3915
ConstraintInheritanceTest.testConstraintsOnInterfaceAndImplementationAddUp()github
Test archive name: 198ec6c45538ff48c51826b2cbe6aa42fde3915
ConstraintInheritanceTest.testConstraintsOnSuperAndSubClassAddUp()github
b)

For a given class, constraint declarations held on superclasses as well as interfaces are evaluated by the Bean Validation provider.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.inheritance
Test archive name: 198ec6c45538ff48c51826b2cbe6aa42fde3915
ConstraintInheritanceTest.testConstraintsOnSuperClassAreInherited()github
Test archive name: 198ec6c45538ff48c51826b2cbe6aa42fde3915
ConstraintInheritanceTest.testConstraintsOnInterfaceAreInherited()github
c)

The effect of constraint declarations is cumulative. Constraints declared on a superclass getter will be validated along with any constraints defined on an overridden version of the getter according to the Java Language Specification visibility rules.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.inheritance
Test archive name: 198ec6c45538ff48c51826b2cbe6aa42fde3915
ConstraintInheritanceTest.testConstraintsOnInterfaceAndImplementationAddUp()github
Test archive name: 198ec6c45538ff48c51826b2cbe6aa42fde3915
ConstraintInheritanceTest.testConstraintsOnSuperAndSubClassAddUp()github

Section 5.4 - Group and group sequence [constraintdeclarationvalidationprocess-groupsequence]

a)

If no group is explicitly declared, a constraint belongs to the Default group.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups
Test archive name: b2b43af61c76fd2859324fdb4fa6ecfb9e22532
GroupTest.testConstraintWithNoExplicitlySpecifiedGroupBelongsToDefault()github
b)

Groups are represented by interfaces.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups
Test archive name: b2b43af61c76fd2859324fdb4fa6ecfb9e22532
GroupTest.testValidateAgainstDifferentGroups()github
c)

A constraint can belong to one or more groups.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups
Test archive name: b2b43af61c76fd2859324fdb4fa6ecfb9e22532
GroupTest.testConstraintCanBelongToMoreThanOneGroup()github
Test archive name: b2b43af61c76fd2859324fdb4fa6ecfb9e22532
GroupTest.testValidationFailureInMultipleGroups()github
d)

During the validation call, one or more groups are validated. All the constraints belonging to this set of groups is evaluated on the object graph.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups
Test archive name: b2b43af61c76fd2859324fdb4fa6ecfb9e22532
GroupTest.testGroups()github
Test archive name: b2b43af61c76fd2859324fdb4fa6ecfb9e22532
GroupTest.testGroupSequenceFollowedByGroup()github
Test archive name: b2b43af61c76fd2859324fdb4fa6ecfb9e22532
GroupTest.testValidateAgainstDifferentGroups()github

Section 5.4.1 - Group inheritance [constraintdeclarationvalidationprocess-groupsequence-groupinheritance]

a)

A group may inherit one or more groups by using interface inheritance.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups.inheritance
Test archive name: f0275b3ff685117bffdf2714458d6aca220dee5
GroupInheritanceTest.testGroupCanInheritGroupsViaInterfaceInheritance()github
b)

For a given interface Z, constraints marked as belonging to the group Z (i.e. where the annotation element groups contains the interface Z) or any of the super interfaces of Z (inherited groups) are considered part of the group Z.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups.inheritance
Test archive name: f0275b3ff685117bffdf2714458d6aca220dee5
GroupInheritanceTest.testGroupMembership()github

Section 5.4.2 - Group sequence [constraintdeclarationvalidationprocess-groupsequence-groupsequence]

a)

By default, constraints are evaluated in no particular order regardless of which groups they belong to.

b)

Each group in a group sequence must be processed sequentially in the order defined by @GroupSequence.value when the group defined as a sequence is requested.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testOnlyFirstGroupInSequenceGetEvaluated()github
org.hibernate.beanvalidation.tck.tests.constraints.groups
Test archive name: b2b43af61c76fd2859324fdb4fa6ecfb9e22532
GroupTest.testGroupSequence()github
org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testFullGraphValidationBeforeNextGroupInSequence()github
c)

Note that a group member of a sequence can itself be composed of several groups via inheritance or sequence definition. In this case, each composed group must respect the sequence order as well.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups.groupsequence
Test archive name: 1d279a93f5a9e2b7ca5d335781b69bda83c39b
SequenceResolutionTest.testGroupSequenceContainerOtherGroupSequences()github
d)

If one of the groups processed in the sequence generates one or more constraint violations, the groups following in the sequence must not be processed.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups
Test archive name: b2b43af61c76fd2859324fdb4fa6ecfb9e22532
GroupTest.testGroupSequence()github
org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testFullGraphValidationBeforeNextGroupInSequence()github
e)

Groups defining a sequence and groups composing a sequence must not be involved in a cyclic dependency: either directly or indirectly either through cascaded sequence definitions or group inheritance

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups
Test archive name: b2b43af61c76fd2859324fdb4fa6ecfb9e22532
GroupTest.testCyclicGroupSequence()github
org.hibernate.beanvalidation.tck.tests.constraints.groups.groupsequence
Test archive name: 1d279a93f5a9e2b7ca5d335781b69bda83c39b
SequenceResolutionTest.testInvalidDefinitionOfDefaultSequenceInEntity()github
f)

If a group containing such a circularity is evaluated, a GroupDefinitionException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups
Test archive name: b2b43af61c76fd2859324fdb4fa6ecfb9e22532
GroupTest.testCyclicGroupSequence()github
org.hibernate.beanvalidation.tck.tests.constraints.groups.groupsequence
Test archive name: 1d279a93f5a9e2b7ca5d335781b69bda83c39b
SequenceResolutionTest.testInvalidDefinitionOfDefaultSequenceInEntity()github
g)

Groups defining a sequence should not directly inherit other groups. In other words, the interface hosting the group sequence should not have any super interface.

h)

Groups defining a sequence should not be used directly in constraint declarations.

i)

To define a group as a sequence, the interface must be annotated with the @GroupSequence annotation.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups
Test archive name: b2b43af61c76fd2859324fdb4fa6ecfb9e22532
GroupTest.testCyclicGroupSequence()github
org.hibernate.beanvalidation.tck.tests.constraints.groups.groupsequence
Test archive name: 1d279a93f5a9e2b7ca5d335781b69bda83c39b
SequenceResolutionTest.testInvalidDefinitionOfDefaultSequenceInEntity()github
j)

A given constraint can belong to two or more groups ordered by a sequence. In this case, the constraint is evaluated as part of the first group and ignored in the subsequent group(s).

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups.groupsequence
Test archive name: 1d279a93f5a9e2b7ca5d335781b69bda83c39b
SequenceResolutionTest.testOnlyFirstGroupInSequenceGetEvaluated()github

Section 5.4.3 - Redefining the Default group for a class [constraintdeclarationvalidationprocess-groupsequence-redefiningdefaultgroup]

a)

To redefine Default for a class, place a @GroupSequence annotation on the class; this sequence expresses the sequence of groups that does substitute Default for this class.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups
Test archive name: beccd7892933d457924b83eb276796d896cb55
DefaultGroupRedefinitionTest.testRedefiningDefaultGroup()github
Test archive name: beccd7892933d457924b83eb276796d896cb55
DefaultGroupRedefinitionTest.testValidatingAgainstRedefinedDefaultGroup()github
org.hibernate.beanvalidation.tck.tests.constraints.groups.groupsequenceisolation
Test archive name: f8b519111de294dda6be9cf32630d964b9968d63
GroupSequenceIsolationTest.testCorrectDefaultSequenceInheritance()github
Test archive name: f8b519111de294dda6be9cf32630d964b9968d63
GroupSequenceIsolationTest.testCorrectDefaultSequenceInheritance2()github
b)

Constraints hosted on a class A and belonging to the Default group (by default or explicitly) implicitly belong to the group A.

c)

A sequence defined on a class A (i.e. redefining the Default groups for the class) must contain the group A.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups
Test archive name: beccd7892933d457924b83eb276796d896cb55
DefaultGroupRedefinitionTest.testGroupSequenceContainingDefault()github
Test archive name: beccd7892933d457924b83eb276796d896cb55
DefaultGroupRedefinitionTest.testGroupSequenceWithNoImplicitDefaultGroup()github
org.hibernate.beanvalidation.tck.tests.constraints.groups.groupsequenceisolation
Test archive name: f8b519111de294dda6be9cf32630d964b9968d63
GroupSequenceIsolationTest.testCorrectDefaultSequenceInheritance()github
Test archive name: f8b519111de294dda6be9cf32630d964b9968d63
GroupSequenceIsolationTest.testCorrectDefaultSequenceInheritance2()github
d)

If a @GroupSequence redefining the Default group for a class A does not contain the group A, a GroupDefinitionException is raised when the class is validated or when its metadata is requested.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups
Test archive name: beccd7892933d457924b83eb276796d896cb55
DefaultGroupRedefinitionTest.testGroupSequenceContainingDefault()github
Test archive name: beccd7892933d457924b83eb276796d896cb55
DefaultGroupRedefinitionTest.testGroupSequenceWithNoImplicitDefaultGroup()github

Section 5.4.4 - Implicit grouping [constraintdeclarationvalidationprocess-groupsequence-implicitgrouping]

a)

Every constraint hosted on an interface Z and part of the Default group (implicitly or explicitly) belongs to the group Z.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups
Test archive name: b2b43af61c76fd2859324fdb4fa6ecfb9e22532
GroupTest.testImplicitGrouping()github

Section 5.4.5 - Group conversion [constraintdeclarationvalidationprocess-groupsequence-groupconversion]

a)

@ConvertGroup and @ConvertGroup.List can be used everywhere @Valid can be used (associations, method/constructor parameters and return value). If these annotations are used without @Valid, a ConstraintDeclarationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionWithoutValidAnnotationOnField()github
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionWithoutValidAnnotationOnProperty()github
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionWithoutValidAnnotationOnMethodReturnValue()github
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionWithoutValidAnnotationOnMethodParameter()github
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionWithoutValidAnnotationOnConstructorReturnValue()github
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionWithoutValidAnnotationOnConstructorParameter()github
org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion.containerelement
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionWithoutValidAnnotationOnField()github
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionWithoutValidAnnotationOnProperty()github
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionWithoutValidAnnotationOnMethodReturnValue()github
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionWithoutValidAnnotationOnMethodParameter()github
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionWithoutValidAnnotationOnConstructorParameter()github
b)

Groups are passed as is to the nested elements unless the @ConvertGroup annotation is used.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.groupconversion
Test archive name: 9d6ed7c53a4fba5aa1635f70bcac819bb5afc2
GroupConversionValidationTest.testGroupIsPassedAsIsToNestedElementWithoutConversion()github
c)

If the group expected to be passed to the nested element validation is defined as the from attribute of a @ConvertGroup annotation, the group used to effectively validate the nested element is the corresponding group defined in the to attribute.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.groupconversion
Test archive name: 9d6ed7c53a4fba5aa1635f70bcac819bb5afc2
GroupConversionValidationTest.testGroupConversionIsAppliedOnProperty()github
Test archive name: 9d6ed7c53a4fba5aa1635f70bcac819bb5afc2
GroupConversionValidationTest.testGroupConversionIsAppliedOnMethodReturnValue()github
Test archive name: 9d6ed7c53a4fba5aa1635f70bcac819bb5afc2
GroupConversionValidationTest.testGroupConversionDefinedInSubClassIsAppliedOnMethodReturnValue()github
Test archive name: 9d6ed7c53a4fba5aa1635f70bcac819bb5afc2
GroupConversionValidationTest.testGroupConversionDefinedInImplementedClassIsAppliedOnMethodReturnValue()github
Test archive name: 9d6ed7c53a4fba5aa1635f70bcac819bb5afc2
GroupConversionValidationTest.testGroupConversionIsAppliedOnMethodParameter()github
Test archive name: 9d6ed7c53a4fba5aa1635f70bcac819bb5afc2
GroupConversionValidationTest.testGroupConversionIsAppliedOnConstructorReturnValue()github
Test archive name: 9d6ed7c53a4fba5aa1635f70bcac819bb5afc2
GroupConversionValidationTest.testGroupConversionIsAppliedOnConstructorParameter()github
Test archive name: 9d6ed7c53a4fba5aa1635f70bcac819bb5afc2
GroupConversionValidationTest.testGroupConversionIsAppliedOnField()github
Test archive name: 9d6ed7c53a4fba5aa1635f70bcac819bb5afc2
GroupConversionValidationTest.testSeveralGroupConversionsAppliedOnField()github
org.hibernate.beanvalidation.tck.tests.validation.groupconversion.containerelement
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnField()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testSeveralGroupConversionsAppliedOnField()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnProperty()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnMethodReturnValue()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnMethodParameter()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnConstructorReturnValue()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnConstructorParameter()github
d)

If no value for the from attribute is specified, Default.class will be used as the source group of the conversion.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 5d9d6f32c16548b7665f2b3f4bbfb3c8b62fd989
ConvertGroupDefaultFromTest.testConvertGroupDefaultFromForProperty()github
Test archive name: 5d9d6f32c16548b7665f2b3f4bbfb3c8b62fd989
ConvertGroupDefaultFromTest.testConvertGroupDefaultFromForConstructorParameter()github
Test archive name: 5d9d6f32c16548b7665f2b3f4bbfb3c8b62fd989
ConvertGroupDefaultFromTest.testConvertGroupDefaultFromForMethodParameter()github
Test archive name: 5d9d6f32c16548b7665f2b3f4bbfb3c8b62fd989
ConvertGroupDefaultFromTest.testConvertGroupDefaultFromForMethodReturnValue()github
org.hibernate.beanvalidation.tck.tests.xmlconfiguration.groupconversion
Test archive name: 6f7a8a204d1f35029276345deaf6b250bdabf8
GroupConversionTest.testGroupConversionsAppliedOnGetter()github
org.hibernate.beanvalidation.tck.tests.validation.groupconversion
Test archive name: 9d6ed7c53a4fba5aa1635f70bcac819bb5afc2
GroupConversionValidationTest.testSeveralGroupConversionsAppliedOnField()github
e)

Rules are not executed recursively.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.groupconversion
Test archive name: 9d6ed7c53a4fba5aa1635f70bcac819bb5afc2
GroupConversionValidationTest.testGroupConversionIsNotExecutedRecursively()github
org.hibernate.beanvalidation.tck.tests.validation.groupconversion.containerelement
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsNotExecutedRecursively()github
f)

It is not legal to have more than one conversion rule containing the same from value. In this case, a ConstraintDeclarationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testSeveralGroupConversionsWithSameFrom()github
org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion.containerelement
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testSeveralGroupConversionsWithSameFrom()github
g)

Like regular constraint declarations, the from attribute cannot refer to a group sequence. A ConstraintDeclarationException is raised in this situation.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionWithSequenceAsFrom()github
org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion.containerelement
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionWithSequenceAsFrom()github
h)

The to attribute can. The group sequence will then be expanded before validating the associated object.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.groupconversion
Test archive name: 9d6ed7c53a4fba5aa1635f70bcac819bb5afc2
GroupConversionValidationTest.testGroupConversionWithSequenceAsTo()github
org.hibernate.beanvalidation.tck.tests.validation.groupconversion.containerelement
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionWithSequenceAsTo()github
i)

@ConvertGroup and @ConvertGroup.List can only be placed where @Valid is present to ensure proper respect of the Liskov substitution principle

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionGivenOnParameterInSubClass()github
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionGivenOnParameterInImplementingClass()github
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionGivenOnParameterInParallelInterfaces()github
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionGivenOnParameterInImplementedInterfaceWithSuperClass()github
org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion.containerelement
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionGivenOnParameterInSubClass()github
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionGivenOnParameterInImplementingClass()github
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionGivenOnParameterInParallelInterfaces()github
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionGivenOnParameterImplementedInterfaceWithSuperClass()github
j)

Likewise, if a sub type overrides/implements a method originally defined in several parallel types of the hierarchy (e.g. two interfaces not extending each other, or a class and an interface not implemented by said class) and if that method's return value has been marked for cascading validation in one of the parallel types, no group conversion rule may be declared for that method's return value in the parallel types of the hierarchy.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionGivenOnReturnValueInParallelInterfaces()github
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionGivenOnReturnValueInImplementedInterfaceWithSuperClass()github
org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion.containerelement
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionGivenOnReturnValueInParallelInterfaces()github
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionGivenOnReturnValueInImplementedInterfaceWithSuperClass()github
k)

If any of these rules is violated, a ConstraintDeclarationException is raised by default as defined in 5.6.5.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionGivenOnParameterInSubClass()github
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionGivenOnParameterInImplementingClass()github
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionGivenOnParameterInParallelInterfaces()github
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionGivenOnReturnValueInParallelInterfaces()github
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionGivenOnParameterInImplementedInterfaceWithSuperClass()github
Test archive name: fe4c251f3c2bc86513a850affa3f9d92c49b19e
InvalidGroupDefinitionsTest.testGroupConversionGivenOnReturnValueInImplementedInterfaceWithSuperClass()github
org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion.containerelement
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionGivenOnParameterInSubClass()github
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionGivenOnParameterInImplementingClass()github
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionGivenOnParameterInParallelInterfaces()github
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionGivenOnReturnValueInParallelInterfaces()github
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionGivenOnParameterImplementedInterfaceWithSuperClass()github
Test archive name: f2b867b43355d3d8b70c0c28f4e9b54f71ed52f
InvalidGroupDefinitionsOnContainerElementsTest.testGroupConversionGivenOnReturnValueInImplementedInterfaceWithSuperClass()github

Section 5.4.5.1 - Group conversion examples [constraintdeclarationvalidationprocess-groupsequence-groupconversion-examples]

a)

Group conversions can also be applied during container element validation

Coverage

org.hibernate.beanvalidation.tck.tests.validation.groupconversion.containerelement
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnField()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testSeveralGroupConversionsAppliedOnField()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnProperty()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnMethodReturnValue()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnMethodParameter()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnConstructorReturnValue()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnConstructorParameter()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsNotExecutedRecursively()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionWithSequenceAsTo()github

Section 5.4.6 - Formal group definitions [constraintdeclarationvalidationprocess-groupsequence-formaldefinition]

a)

The group X contains the following constraints: every constraint declared by the class X which does not declare a group or does declare the group Default explicitly. every constraint declared by any interface implemented by X and not annotated @GroupSequence which does not explicitly declare a group or does declare the group Default explicitly. if X has a direct superclass Y, every constraint in the group Y

Coverage

No tests exist for this assertion

b)

If X has no @GroupSequence annotation, the group Default contains the following constraints: every constraint in the group X if X has a direct superclass Y, every constraint in the group Default of Y

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups.groupsequenceisolation
Test archive name: f8b519111de294dda6be9cf32630d964b9968d63
GroupSequenceIsolationTest.testCorrectDefaultSequenceInheritance3()github
c)

If X does have a @GroupSequence annotation, the group Default contains every constraint belonging to every group declared by the @GroupSequence annotation.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups.groupsequenceisolation
Test archive name: f8b519111de294dda6be9cf32630d964b9968d63
GroupSequenceIsolationTest.testCorrectDefaultSequenceInheritance()github
Test archive name: f8b519111de294dda6be9cf32630d964b9968d63
GroupSequenceIsolationTest.testCorrectDefaultSequenceInheritance2()github
d)

The @GroupSequence annotation must declare the group X

Coverage

No tests exist for this assertion

e)

For every interface Z, the group Z contains the following constraints: every constraint declared by the interface Z which does not explicitly declare a group or does declare the group Default explicitly. every constraint (which does not explicitly declare a group) declared by any superinterface not annotated @GroupSequence of the interface Z every constraint declared by the class X which explicitly declares the group Z every constraint declared by any interface implemented by X and not annotated @GroupSequence which explicitly declares the group Z if X has a direct superclass Y, every constraint in the group Z of Y

Coverage

No tests exist for this assertion

f)

For every interface Z annotated @GroupSequence, the group Z contains every constraint belonging to every group declared by the @GroupSequence annotation.

Coverage

No tests exist for this assertion

g)

When a given group G (represented by an interface G) is requested for the validation of a class X: constraints belonging to the group G are evaluated if the interface G is not annotated @GroupSequence, every group represented by the super interface of G are requested for validation if the interface G is annotated with @GroupSequence, every group represented by the interfaces declared by the @GroupSequence annotation are requested for validation the validation of groups declared to the @GroupSequence must happen in the sequencing order declared by @GroupSequence: the sequencing order is propagated to the groups composing the sequenced group (via inheritance or group sequence) if a group validation triggers the failure of one or more constraints, groups following in the sequence must not be evaluated. if the group G represents the Default group of X overridden by @GroupSequence, operations are equivalent

Coverage

No tests exist for this assertion

h)

When the Default group of a given class X is overridden via @GroupSequence, its validation is as followed: every group represented by the interfaces declared by the @GroupSequence annotation are requested for validation the validation of groups declared to the @GroupSequence must happen in the sequencing order declared by @GroupSequence: the sequencing order is propagated to the groups composing the sequenced group (via inheritance or group sequence) if a group validation triggers the failure of one or more constraints, groups following in the sequence must not be evaluated.

Coverage

No tests exist for this assertion

i)

Unless defined by a @GroupSequence, evaluation ordering is not constrained. In particular, several groups can be validated in the same pass.

j)

If a group definition leads to a circular sequencing order between groups, a GroupDefinitionException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups
Test archive name: b2b43af61c76fd2859324fdb4fa6ecfb9e22532
GroupTest.testCyclicGroupSequence()github

Section 5.5 - Container element constraints [constraintdeclarationvalidationprocess-containerelementconstraints]

a)

Constraints can be applied to the elements of generic containers, e.g. List, Map or Optional. This is done by putting constraint annotations to the type arguments of such containers.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.containerelement
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.field_constraint_provided_on_type_parameter_of_a_list_gets_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.getter_constraint_provided_on_type_parameter_of_a_list_gets_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.return_value_constraint_provided_on_type_parameter_of_a_list_gets_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.method_parameter_constraint_provided_as_type_parameter_of_a_list_gets_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.constructor_parameter_constraint_provided_on_type_parameter_of_a_list_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.constraint_specified_on_type_parameter_of_optional_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.getter_constraint_provided_on_type_parameter_of_an_optional_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.return_value_constraint_provided_on_type_parameter_of_an_optional_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.method_parameter_constraint_provided_as_type_parameter_of_an_optional_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.constructor_parameter_constraint_provided_on_type_parameter_of_an_optional_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.constraint_specified_on_type_parameter_of_custom_container_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.getter_constraint_provided_on_type_parameter_of_an_custom_container_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.return_value_constraint_provided_on_type_parameter_of_an_custom_container_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.method_parameter_constraint_provided_as_type_parameter_of_an_custom_container_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.constructor_parameter_constraint_provided_on_type_parameter_of_an_custom_container_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.constraint_specified_on_key_type_parameter_of_map_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.getter_constraint_provided_on_key_type_parameter_of_a_map_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.return_value_constraint_provided_on_key_type_parameter_of_a_map_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.method_parameter_constraint_provided_as_key_type_parameter_of_a_map_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.constructor_parameter_constraint_provided_on_key_type_parameter_of_a_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.constraint_specified_on_value_type_parameter_of_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.getter_constraint_provided_on_value_type_parameter_of_a_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.return_value_constraint_provided_on_value_type_parameter_of_a_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.method_parameter_constraint_provided_as_value_type_parameter_of_a_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.constructor_parameter_constraint_provided_on_value_type_parameter_of_a_map_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.field_constraint_provided_on_type_parameter_of_a_set_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.getter_constraint_provided_on_type_parameter_of_a_set_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.return_value_constraint_provided_on_type_parameter_of_a_set_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.method_parameter_constraint_provided_as_type_parameter_of_a_set_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.constructor_parameter_constraint_provided_on_type_parameter_of_a_set_gets_validated()github
org.hibernate.beanvalidation.tck.tests.validation.graphnavigation.containerelement
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_list_parameter_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_map_parameter_value_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_map_parameter_key_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_optional_parameter_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_set_parameter_and_cascading_gets_validated()github
b)

Container element constraints can be used within the following declarations: fields, properties, method or constructor parameters or method return values.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.containerelement
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.field_constraint_provided_on_type_parameter_of_a_list_gets_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.getter_constraint_provided_on_type_parameter_of_a_list_gets_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.return_value_constraint_provided_on_type_parameter_of_a_list_gets_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.method_parameter_constraint_provided_as_type_parameter_of_a_list_gets_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.constructor_parameter_constraint_provided_on_type_parameter_of_a_list_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.constraint_specified_on_type_parameter_of_optional_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.getter_constraint_provided_on_type_parameter_of_an_optional_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.return_value_constraint_provided_on_type_parameter_of_an_optional_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.method_parameter_constraint_provided_as_type_parameter_of_an_optional_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.constructor_parameter_constraint_provided_on_type_parameter_of_an_optional_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.constraint_specified_on_type_parameter_of_custom_container_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.getter_constraint_provided_on_type_parameter_of_an_custom_container_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.return_value_constraint_provided_on_type_parameter_of_an_custom_container_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.method_parameter_constraint_provided_as_type_parameter_of_an_custom_container_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.constructor_parameter_constraint_provided_on_type_parameter_of_an_custom_container_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.constraint_specified_on_key_type_parameter_of_map_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.getter_constraint_provided_on_key_type_parameter_of_a_map_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.return_value_constraint_provided_on_key_type_parameter_of_a_map_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.method_parameter_constraint_provided_as_key_type_parameter_of_a_map_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.constructor_parameter_constraint_provided_on_key_type_parameter_of_a_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.constraint_specified_on_value_type_parameter_of_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.getter_constraint_provided_on_value_type_parameter_of_a_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.return_value_constraint_provided_on_value_type_parameter_of_a_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.method_parameter_constraint_provided_as_value_type_parameter_of_a_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.constructor_parameter_constraint_provided_on_value_type_parameter_of_a_map_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.field_constraint_provided_on_type_parameter_of_a_set_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.getter_constraint_provided_on_type_parameter_of_a_set_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.return_value_constraint_provided_on_type_parameter_of_a_set_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.method_parameter_constraint_provided_as_type_parameter_of_a_set_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.constructor_parameter_constraint_provided_on_type_parameter_of_a_set_gets_validated()github
org.hibernate.beanvalidation.tck.tests.validation.graphnavigation.containerelement
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_list_parameter_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_map_parameter_value_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_map_parameter_key_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_optional_parameter_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_set_parameter_and_cascading_gets_validated()github
c)

When a field, property, executable parameter or method return value which is of a container type gets validated, then all values contained in the container will be validated provided that their container element type is constrained.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.containerelement
Test archive name: 8a40a4a8f09be83fce93d9a31c7c4b6bc5458357
SameElementContainedSeveralTimesInCollectionTest.sameInvalidInstanceInListShouldBeReportedWithAllPaths()github
Test archive name: 8a40a4a8f09be83fce93d9a31c7c4b6bc5458357
SameElementContainedSeveralTimesInCollectionTest.sameInvalidInstanceInMapShouldBeReportedWithAllPaths()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.field_constraint_provided_on_type_parameter_of_a_list_gets_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.getter_constraint_provided_on_type_parameter_of_a_list_gets_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.return_value_constraint_provided_on_type_parameter_of_a_list_gets_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.method_parameter_constraint_provided_as_type_parameter_of_a_list_gets_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.constructor_parameter_constraint_provided_on_type_parameter_of_a_list_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.constraint_specified_on_type_parameter_of_optional_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.getter_constraint_provided_on_type_parameter_of_an_optional_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.return_value_constraint_provided_on_type_parameter_of_an_optional_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.method_parameter_constraint_provided_as_type_parameter_of_an_optional_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.constructor_parameter_constraint_provided_on_type_parameter_of_an_optional_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.constraint_specified_on_type_parameter_of_custom_container_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.getter_constraint_provided_on_type_parameter_of_an_custom_container_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.return_value_constraint_provided_on_type_parameter_of_an_custom_container_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.method_parameter_constraint_provided_as_type_parameter_of_an_custom_container_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.constructor_parameter_constraint_provided_on_type_parameter_of_an_custom_container_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.constraint_specified_on_key_type_parameter_of_map_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.getter_constraint_provided_on_key_type_parameter_of_a_map_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.return_value_constraint_provided_on_key_type_parameter_of_a_map_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.method_parameter_constraint_provided_as_key_type_parameter_of_a_map_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.constructor_parameter_constraint_provided_on_key_type_parameter_of_a_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.constraint_specified_on_value_type_parameter_of_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.getter_constraint_provided_on_value_type_parameter_of_a_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.return_value_constraint_provided_on_value_type_parameter_of_a_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.method_parameter_constraint_provided_as_value_type_parameter_of_a_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.constructor_parameter_constraint_provided_on_value_type_parameter_of_a_map_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.field_constraint_provided_on_type_parameter_of_a_set_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.getter_constraint_provided_on_type_parameter_of_a_set_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.return_value_constraint_provided_on_type_parameter_of_a_set_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.method_parameter_constraint_provided_as_type_parameter_of_a_set_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.constructor_parameter_constraint_provided_on_type_parameter_of_a_set_gets_validated()github
org.hibernate.beanvalidation.tck.tests.validation.graphnavigation.containerelement
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_list_parameter_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_map_parameter_value_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_map_parameter_key_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_optional_parameter_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_set_parameter_and_cascading_gets_validated()github
d)

Any container element constraints of that element will be validated alongside any other constraints hosted by that element.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.containerelement
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.constraints_specified_on_list_and_on_type_parameter_of_list_get_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.constraints_specified_on_optional_and_on_type_parameter_of_optional_get_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.constraints_specified_on_custom_container_and_on_type_parameter_of_custom_container_get_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.constraints_specified_on_map_and_on_key_type_parameter_of_map_get_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.constraints_specified_on_map_and_on_value_type_parameter_of_map_get_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.constraints_specified_on_set_and_on_type_parameter_of_set_get_validated()github
e)

For container element constraints, the same rules for validation groups and group sequences apply as for any other constraint on the same element.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.containerelement
Test archive name: a9ae434c303fe772e84d355d2b51b34e1b24cb
ContainerElementConstraintGroupValidationTest.sameGroupValidationRulesAppliesOnContainerElementConstraints()github
f)

Container element constraints can be applied to nested container types

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.containerelement
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_on_getter_with_map_of_list_of_optional()github
org.hibernate.beanvalidation.tck.tests.valueextraction.builtin
Test archive name: 839e17b42fb2562de25117c3e67e4eb2a4eaa3f6
JavaFXValueExtractorsTest.testValueExtractionForListOfStringProperty()github
org.hibernate.beanvalidation.tck.tests.constraints.containerelement
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_map_of_list_of_optional()github
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_map_of_list_of_stringproperty()github
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_list_of_maps()github
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_list_of_iterables()github
g)

It is not supported to declare container element constraints on the type parameters of generic types or methods.

h)

It is also not supported to declare container element constraints on type arguments within the extends or implements clauses of type definitions.

Section 5.5.1 - Implicit unwrapping of containers [constraintdeclarationvalidationprocess-containerelementconstraints-implicitunwrapping]

a)

This is useful for applying a constraint given on a non-generic container to the container element(s) if there is no value extractor marked with @UnwrapByDefault (by using Unwrap) the container itself in case there is a value extractor marked with @UnwrapByDefault (by using Skip)

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.unwrapping
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.no_constraint_validator_for_unwrapped_value_throws_exception()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_explicit_unwrapping()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapper_itself_if_there_is_no_unwrapping()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapper_if_unwrapping_disabled_per_constraint_for_generic_container()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_value_extractor_unwraps_by_default_and_unwrapping_enabled_per_constraint_for_generic_container()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapper_if_unwrapping_disabled_per_constraint_for_non_generic_container()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_value_extractor_unwraps_by_default_and_unwrapping_enabled_per_constraint_for_non_generic_container()github
b)

If both Unwrap and Skip are present in the definition of a payload, a ConstraintDeclarationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.unwrapping
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.skip_and_unwrap_at_the_same_time_throws_exception()github

Section 5.6.1 - Requirements on methods to be validated [constraintdeclarationvalidationprocess-methodlevelconstraints-requirements]

a)

Static methods are ignored by validation. Putting constraints on a static method is not portable.

Section 5.6.2 - Declaring parameter constraints [constraintdeclarationvalidationprocess-methodlevelconstraints-parameterconstraints]

a)

Parameter constraints are declared by putting constraint annotations on method or constructor parameters.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application.method
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testMethodParameterConstraintsAreDeclaredByAnnotatingParameters()github
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testConstructorParameterConstraintsAreDeclaredByAnnotatingParameters()github

Section 5.6.2.1 - Cross-parameter constraints [constraintdeclarationvalidationprocess-methodlevelconstraints-parameterconstraints-crossparameterconstraints]

a)

Cross-parameter constraints are declared by putting cross-parameter constraint annotations on methods or constructors

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application.method
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testCrossParameterConstraintsAreDeclaredByAnnotatingMethods()github
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testCrossParameterConstraintsAreDeclaredByAnnotatingConstructors()github
b)

It is not legal to declare a cross-parameter constraint on a method or constructor which has no parameters. A ConstraintDeclarationException is raised in this case.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.crossparameter
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetParametersOnMethodWithoutParametersCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetParametersOnConstructorWithoutParametersCausesException()github
c)

They are known to be both generic and cross-parameter constraints. When using such a constraint on an executable to target the parameters, one must set validationAppliesTo if there is an ambiguity.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.crossparameter
Test archive name: 917055e31921558f8d6290f1dfaa427691e645b1
GenericAndCrossParameterConstraintTest.testOneValidatorSupportsBothValidationTargets()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetImplicitOnMethodWithParametersAndReturnValueCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetImplicitOnConstructorWithParametersCausesException()github

Section 5.6.2.2 - Naming parameters [constraintdeclarationvalidationprocess-methodlevelconstraints-parameterconstraints-namingparameters]

a)

A conforming Bean Validation implementation provides a default ParameterNameProvider implementation which returns parameter names as stored in the class file containing the validated executable, if present. A conforming implementation must either use the Java reflection API or ensure behavioral compatibility to using the reflection API in the following way: Obtain the method's or constructor's parameters via java.lang.reflect.Executable.getParameters() Obtain each parameter's name via java.lang.reflect.Parameter.getName()

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation.parameternameprovider
Test archive name: daf3d2faadd1488513ecf9a929a77318c4d78796
DefaultParameterNameProviderTest.testDefaultParameterProviderForMethod()github
Test archive name: daf3d2faadd1488513ecf9a929a77318c4d78796
DefaultParameterNameProviderTest.testDefaultParameterProviderForConstructor()github
b)

If an exception occurs during invocation of the getParameterNames() methods, this exception is wrapped into a ValidationException by the Bean Validation engine.

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation.parameternameprovider
Test archive name: adf5416d4e7a6cec3b6e9aa9eda9c8d7dc28a90
ParameterNameProviderTest.testExceptionInParameterNameProviderIsWrappedIntoValidationException()github

Section 5.6.3 - Declaring return value constraints [constraintdeclarationvalidationprocess-methodlevelconstraints-returnvalueconstraints]

a)

Return value constraints are declared by putting constraint annotations directly on a method or constructor.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application.method
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testReturnValueConstraintsAreDeclaredByAnnotatingMethods()github
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testReturnValueConstraintsAreDeclaredByAnnotatingConstructors()github
b)

They are known to be both generic and cross-parameter constraints. When using such constraint on an executable to target the return value, one must set validationAppliesTo in case there is an ambiguity.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.crossparameter
Test archive name: 917055e31921558f8d6290f1dfaa427691e645b1
GenericAndCrossParameterConstraintTest.testOneValidatorSupportsBothValidationTargets()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetImplicitOnMethodWithParametersAndReturnValueCausesException()github
Test archive name: 68ee59635dd2f0f360a32de9f618b2ba4438933f
InvalidDeclarationOfGenericAndCrossParameterConstraintTest.testConstraintTargetImplicitOnConstructorWithParametersCausesException()github

Section 5.6.4 - Marking parameters and return values for cascaded validation [constraintdeclarationvalidationprocess-methodlevelconstraints-cascadedvalidation]

a)

The @Valid annotation is used to declare that a cascaded validation of the given method/constructor parameters or return values is performed by the Bean Validation provider. When marked, the parameter or return value is considered a bean object to validate.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application.method
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testMethodParameterIsMarkedAsCascaded()github
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testConstructorParameterIsMarkedAsCascaded()github
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testMethodReturnValueIsMarkedAsCascaded()github
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testConstructorReturnValueIsMarkedAsCascaded()github
b)

Null arguments and null return values are ignored

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application.method
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testPassingNullToCascadedMethodParameterCausesNoViolation()github
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testPassingNullToCascadedConstructorParameterCausesNoViolation()github
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testReturningNullFromCascadedMethodCausesNoViolation()github
c)

The validation is recursive; that is, if validated parameter or return value objects have references marked with @Valid themselves, these references will also be validated

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application.method
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testCascadedMethodParameterIsValidatedRecursively()github
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testCascadedConstructorParameterIsValidatedRecursively()github
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testCascadedMethodReturnValueIsValidatedRecursively()github
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testCascadedConstructorReturnValueIsValidatedRecursively()github
d)

Bean Validation providers must guarantee the prevention of infinite loops during cascaded validation

Section 5.6.5 - Method constraints in inheritance hierarchies [constraintdeclarationvalidationprocess-methodlevelconstraints-inheritance]

a)

In sub types (be it sub classes/interfaces or interface implementations), no parameter constraints may be declared on overridden or implemented methods, nor may parameters be marked for cascaded validation. This would pose a strengthening of preconditions to be fulfilled by the caller.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.inheritance.method.invaliddeclarations
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterConstraintsAddedInInterfaceImplementationCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterConstraintsAddedInSubClassCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterMarkedAsCascadedInInterfaceImplementationCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterMarkedAsCascadedInSubClassCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterContainerElementConstraintsAddedInInterfaceImplementationCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterContainerElementConstraintsAddedInSubClassCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterContainerElementMarkedAsCascadedInInterfaceImplementationCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterContainerElementMarkedAsCascadedInSubClassCausesException()github
b)

If a sub type overrides/implements a method originally defined in several parallel types of the hierarchy (e.g. two interfaces not extending each other, or a class and an interface not implemented by said class), no parameter constraints may be declared for that method at all nor parameters be marked for cascaded validation. This again is to avoid an unexpected strengthening of preconditions to be fulfilled by the caller.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.inheritance.method.invaliddeclarations
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testConstrainedParameterInOneMethodOfParallelInterfacesCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterIsConstrainedInInterfaceMethodAndSuperClassMethodCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterIsCascadingInOneMethodOfParallelInterfacesCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterIsCascadingInInterfaceMethodAndSuperClassMethodCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testConstrainedContainerElementOfParameterInOneMethodOfParallelInterfacesCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testContainerElementOfParameterIsConstrainedInInterfaceMethodAndSuperClassMethodCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testContainerElementOfParameterIsCascadingInOneMethodOfParallelInterfacesCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testContainerElementOfParameterIsCascadingInInterfaceMethodAndSuperClassMethodCausesException()github
c)

In sub types (be it sub classes/interfaces or interface implementations), return value constraints may be declared on overridden or implemented methods and the return value may be marked for cascaded validation. Upon validation, all return value constraints of the method in question are validated, wherever they are declared in the hierarchy. This only poses possibly a strengthening but no weakening of the method's postconditions guaranteed to the caller.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.inheritance.method.validdeclarations
Test archive name: a494cbd15d706bf426c7be5247603cf5bcb8567d
ValidMethodConstraintDeclarationTest.testReturnValueConstraintAddedInInterfaceImplementation()github
Test archive name: a494cbd15d706bf426c7be5247603cf5bcb8567d
ValidMethodConstraintDeclarationTest.testReturnValueConstraintAddedInSubClass()github
Test archive name: a494cbd15d706bf426c7be5247603cf5bcb8567d
ValidMethodConstraintDeclarationTest.testReturnValueMarkedAsCascadedInInterfaceImplementation()github
Test archive name: a494cbd15d706bf426c7be5247603cf5bcb8567d
ValidMethodConstraintDeclarationTest.testReturnValueConstraintFromInterfaceAndImplementationAddUp()github
Test archive name: a494cbd15d706bf426c7be5247603cf5bcb8567d
ValidMethodConstraintDeclarationTest.testReturnValueConstraintFromInterfacesAndImplementationAddUp()github
Test archive name: a494cbd15d706bf426c7be5247603cf5bcb8567d
ValidMethodConstraintDeclarationTest.testReturnValueMarkedAsCascadedInSubClass()github
d)

One must not mark a method return value for cascaded validation more than once in a line of a class hierarchy. In other words, overriding methods on sub types (be it sub classes/interfaces or interface implementations) cannot mark the return value for cascaded validation if the return value has already been marked on the overridden method of the super type or interface.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.inheritance.method.validdeclarations
Test archive name: a494cbd15d706bf426c7be5247603cf5bcb8567d
ValidMethodConstraintDeclarationTest.testReturnValueMarkedAsCascadedInParallelInterfaces()github
org.hibernate.beanvalidation.tck.tests.constraints.inheritance.method.invaliddeclarations
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testReturnValueIsMarkedAsCascadedInInterfaceAndImplementationCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testReturnValueIsMarkedAsCascadedInBaseAndSubClassCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testReturnValueIsMarkedAsCascadedInSuperAndDerivedInterfaceCausesException()github
e)

Out of the box, a conforming Bean Validation provider must throw a ConstraintDeclarationException when discovering that any of these rules are violated.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.inheritance.method.invaliddeclarations
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterConstraintsAddedInInterfaceImplementationCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterConstraintsAddedInSubClassCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterMarkedAsCascadedInInterfaceImplementationCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterMarkedAsCascadedInSubClassCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testConstrainedParameterInOneMethodOfParallelInterfacesCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterIsConstrainedInInterfaceMethodAndSuperClassMethodCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterIsCascadingInOneMethodOfParallelInterfacesCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterIsCascadingInInterfaceMethodAndSuperClassMethodCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterContainerElementConstraintsAddedInInterfaceImplementationCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterContainerElementConstraintsAddedInSubClassCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterContainerElementMarkedAsCascadedInInterfaceImplementationCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testParameterContainerElementMarkedAsCascadedInSubClassCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testConstrainedContainerElementOfParameterInOneMethodOfParallelInterfacesCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testContainerElementOfParameterIsConstrainedInInterfaceMethodAndSuperClassMethodCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testContainerElementOfParameterIsCascadingInOneMethodOfParallelInterfacesCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testContainerElementOfParameterIsCascadingInInterfaceMethodAndSuperClassMethodCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testReturnValueIsMarkedAsCascadedInInterfaceAndImplementationCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testReturnValueIsMarkedAsCascadedInBaseAndSubClassCausesException()github
Test archive name: 7593273c269e383381ce43a7a86aaa9180d6fa
InvalidMethodConstraintDeclarationTest.testReturnValueIsMarkedAsCascadedInSuperAndDerivedInterfaceCausesException()github
f)

The above rules do not apply when validating constructor constraints as constructors do not override one another. Parameter and return value constraints can be applied to any constructor in the type hierarchy, but only the constraints defined directly on the validated constructor are evaluated.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.inheritance.method.validdeclarations
Test archive name: a494cbd15d706bf426c7be5247603cf5bcb8567d
ValidMethodConstraintDeclarationTest.testParameterConstraintAddedToConstructorInSubClass()github
Test archive name: a494cbd15d706bf426c7be5247603cf5bcb8567d
ValidMethodConstraintDeclarationTest.testParameterConstraintMarkedAsCascadedAtConstructorInSubClass()github
Test archive name: a494cbd15d706bf426c7be5247603cf5bcb8567d
ValidMethodConstraintDeclarationTest.testReturnValueConstraintAddedToConstructorInSubClass()github
Test archive name: a494cbd15d706bf426c7be5247603cf5bcb8567d
ValidMethodConstraintDeclarationTest.testReturnValueMarkedAsCascadedAtConstructorInSuperAndSubClass()github

Section 5.7 - Validation routine [constraintdeclarationvalidationprocess-validationroutine]

a)

For a given group, the validation routine applied on a given bean instance is expected to execute the following constraint validations in no particular order: for all reachable fields, execute all field level validations (including the ones expressed on superclasses) matching the targeted group unless the given validation constraint has already been processed during this validation routine for a given navigation path (see 5.7.1) as part of a previous group match. for all reachable getters, execute all getter level validations (including the ones expressed on interfaces and superclasses) matching the targeted group unless the given validation constraint has already been processed during this validation routine for a given navigation path (see 5.7.1) as part of a previous group match. execute all class level validations (including the ones expressed on interfaces and superclasses) matching the targeted group unless the given validation constraint has already been processed during this validation routine for a given navigation path (see 5.7.1) as part of a previous group match. for all reachable and cascadable associations, execute all cascading validations (see 5.7.1) including the ones expressed on interfaces and superclasses (see 5.4.6). Note that group conversion can apply (see 5.4.5).

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.inheritance
Test archive name: 198ec6c45538ff48c51826b2cbe6aa42fde3915
ConstraintInheritanceTest.testValidationConsidersConstraintsFromSuperTypes()github
org.hibernate.beanvalidation.tck.tests.constraints.groups
Test archive name: b2b43af61c76fd2859324fdb4fa6ecfb9e22532
GroupTest.testValidationFailureInMultipleGroups()github
org.hibernate.beanvalidation.tck.tests.traversableresolver
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadable()github
org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testConstraintViolation()github
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testClassLevelConstraintViolation()github
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testGraphValidationWithList()github
org.hibernate.beanvalidation.tck.tests.validation.groupconversion
Test archive name: 9d6ed7c53a4fba5aa1635f70bcac819bb5afc2
GroupConversionValidationTest.testGroupConversionIsAppliedOnField()github
Test archive name: 9d6ed7c53a4fba5aa1635f70bcac819bb5afc2
GroupConversionValidationTest.testSeveralGroupConversionsAppliedOnField()github
org.hibernate.beanvalidation.tck.tests.validation.groupconversion.containerelement
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnField()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testSeveralGroupConversionsAppliedOnField()github
org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 48cabd69b824abe373d131ff57b25af52a61184
ValueAccessStrategyTest.testValueFromFieldIsPassedToValidatorOfFieldLevelConstraint()github
Test archive name: 48cabd69b824abe373d131ff57b25af52a61184
ValueAccessStrategyTest.testValueFromGetterIsPassedToValidatorOfPropertyLevelConstraint()github
b)

Unless ordered by group sequences, groups can be validated in no particular order.

c)

The object validation routine is described as such. For each constraint declaration: determine for the constraint declaration, the appropriate ConstraintValidator to use (see 5.7.4). execute the isValid operation (from the constraint validation implementation) on the appropriate data (see 3.4) if isValid() returns true, continue to the next constraint, if isValid() returns false, the Bean Validation provider populates ConstraintViolation object(s) according to the rules defined in 3.4 and appends these objects to the list of constraint violations.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testMultipleConstraintViolationOfDifferentTypes()github
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testConstraintViolation()github

Section 5.7.1 - Object graph validation [constraintdeclarationvalidationprocess-validationroutine-graphvalidation]

a)

The @Valid annotation on a given association (i.e. object reference or collection, array, Iterable of objects), dictates the Bean Validator implementation to apply recursively the Bean Validation routine on (each of) the associated object(s).

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testGraphNavigationDeterminism()github
b)

This mechanism is recursive: an associated object can itself contain cascaded references.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testGraphNavigationDeterminism()github
c)

Null references are ignored.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testNullReferencesGetIgnored()github
d)

To prevent infinite loops, the Bean Validation implementation must ignore the cascading operation if the associated object instance has already been validated in the current navigation path (starting from the root object).

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation
Test archive name: e1ea2dcaf75db9badeee5229345aa6dcd6177a3
GraphNavigationTest.testNoEndlessLoop()github
e)

@Valid is an orthogonal concept to the notion of group. If two groups are in sequence, the first group must pass for all associated objects before the second group is evaluated.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups.groupsequenceisolation
Test archive name: f8b519111de294dda6be9cf32630d964b9968d63
GroupSequenceIsolationTest.testCorrectDefaultSequenceContainedCaseWithoutGroupRedefinitionOnContainedEntity()github
Test archive name: f8b519111de294dda6be9cf32630d964b9968d63
GroupSequenceIsolationTest.testCorrectDefaultSequenceContainedCaseWithGroupRedefinitionOnContainedEntity()github

Section 5.7.2 - Method and constructor validation [constraintdeclarationvalidationprocess-validationroutine-methodconstructorvalidation]

a)

For a given group, the validation routine applied to validate parameters of a method or constructor is expected to execute the following constraint validations in no particular order: execute all parameter validations (in case of overriding method validation, including the ones expressed on overridden methods of the interfaces and superclasses) matching the targeted group unless the given validation constraint has already been processed during this validation routine for a given navigation path (see 5.7.1) as part of a previous group match. execute all cross parameter validations (in case of overriding method validation, including the ones expressed on overridden methods of the interfaces and superclasses) matching the targeted group unless the given validation constraint has already been processed during this validation routine for a given navigation path (see 5.7.1) as part of a previous group match. for all parameters marked for cascaded validation, execute all cascading validations (see 5.7.1), in case of overriding method validation including the ones expressed on overridden methods of the interfaces and superclasses (see 5.4.6). Note that group conversion can apply (see 5.4.5).

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.methodParameterValidationTargetsParameterCrossParameterAndCascadedConstraints()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.methodParameterValidationIncludesConstraintsFromSuperClass()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.methodParameterValidationIncludesConstraintsFromImplementedInterface()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.methodParameterValidationIsAppliedGroupWise()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.methodParameterValidationPerformsGroupConversion()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.methodParameterValidationValidatesEachConstraintOnlyOnce()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.methodParameterValidationUsingSequence()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.methodParameterValidationWithRedefinedDefaultGroupSequence()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.constructorParameterValidationTargetsParameterCrossParameterAndCascadedConstraints()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.constructorParameterValidationDoesNotIncludeConstraintsFromSuperClass()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.constructorParameterValidationIsAppliedGroupWise()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.constructorParameterValidationPerformsGroupConversion()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.constructorParameterValidationValidatesEachConstraintOnlyOnce()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.constructorParameterValidationUsingSequence()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.constructorParameterValidationWithRedefinedDefaultGroupSequence()github
b)

For a given group, the validation routine applied to validate the return value of a method or constructor is expected to execute the following constraint validations in no particular order: execute all return value validations (including the ones expressed on interfaces and superclasses) matching the targeted group unless the given validation constraint has already been processed during this validation routine for a given navigation path (see 5.7.1) as part of a previous group match. if the return value is marked for cascaded validation, execute all cascading validations (see 5.7.1) including the ones expressed on interfaces and superclasses (see 5.4.6). Note that group conversion can apply (see 5.4.5).

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.methodReturnValueValidationTargetsReturnValueAndCascadedConstraints()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.methodReturnValueValidationIncludesConstraintsFromSuperClass()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.methodReturnValueValidationIncludesConstraintsFromImplementedInterface()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.methodReturnValueValidationIsAppliedGroupWise()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.methodReturnValueValidationPerformsGroupConversion()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.methodReturnValueValidationValidatesEachConstraintOnlyOnce()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.methodReturnValueValidationUsingSequence()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.methodReturnValueValidationWithRedefinedDefaultGroupSequence()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.constructorReturnValueValidationTargetsReturnValueAndCascadedConstraints()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.constructorReturnValueValidationDoesNotIncludeConstraintsFromSuperClass()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.constructorReturnValueValidationIsAppliedGroupWise()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.constructorReturnValueValidationPerformsGroupConversion()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.constructorReturnValueValidationValidatesEachConstraintOnlyOnce()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.constructorReturnValueValidationUsingSequence()github
Test archive name: d62896e83396b41f5ec48f20a6ce7077bbd6fb35
MethodValidationTest.constructorReturnValueValidationWithRedefinedDefaultGroupSequence()github
c)

Unless ordered by group sequences, groups can be validated in no particular order.

Section 5.7.3 - Traversable property [constraintdeclarationvalidationprocess-validationroutine-traversable]

a)

isReachable() is called for every property about to be accessed either for validation or for cascading.

Coverage

org.hibernate.beanvalidation.tck.tests.traversableresolver
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadable()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForValidateValue()github
b)

isCascadable() is called for every property about to be cascaded (i.e. marked as @Valid).

Coverage

org.hibernate.beanvalidation.tck.tests.traversableresolver
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadable()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForValidateValue()github
c)

isCascadable() for a given property is only called if isReachable() returns true. In other words, isReachable() is always called before isCascadable() for a given property.

Coverage

org.hibernate.beanvalidation.tck.tests.traversableresolver
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadable()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForValidateValue()github
d)

traversableObject is the object instance being evaluated. null if the check is triggered as part of a validateValue() call.

Coverage

org.hibernate.beanvalidation.tck.tests.traversableresolver
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadable()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForValidateValue()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForParameterValidation()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForReturnValueValidation()github
e)

traversableProperty is the Node representing the property hosted by the traversableObject being considered for traversal. The name of a property is defined in 5.1.2.

Coverage

org.hibernate.beanvalidation.tck.tests.traversableresolver
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadable()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForValidateValue()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForParameterValidation()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForReturnValueValidation()github
f)

rootBeanType is the class of the root being validated, i.e. either the type of the object passed to the validate method or the type declaring the validated method/constructor in case of method validation.

Coverage

org.hibernate.beanvalidation.tck.tests.traversableresolver
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadable()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForValidateValue()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForParameterValidation()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForReturnValueValidation()github
g)

pathToTraversableObject is the Path from the rootBeanType down to the traversableObject. If the root object is traversableObject, pathToTraversableObject is composed of a single Node whose name is null. The path is described following the conventions described in 6.2 (getPropertyPath).

Coverage

org.hibernate.beanvalidation.tck.tests.traversableresolver
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadable()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForValidateValue()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForParameterValidation()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForReturnValueValidation()github
h)

elementType is the java.lang.annotation.ElementType the annotation is placed on. It can be either FIELD or METHOD. Any other value is not expected.

Coverage

org.hibernate.beanvalidation.tck.tests.traversableresolver
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadable()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForValidateValue()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForParameterValidation()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForReturnValueValidation()github
i)

The Bean Validation provider must not access the state of a property, nor validate its constraints if the property is not traversable. A property is traversable if TraversableResolver returns true for this property.

Coverage

org.hibernate.beanvalidation.tck.tests.traversableresolver
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCustomTraversableResolverViaConfiguration()github
j)

If an exception occurs when the TraversableResolver is called, the exception is wrapped into a ValidationException.

Coverage

org.hibernate.beanvalidation.tck.tests.traversableresolver
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testResolverExceptionsGetWrappedInValidationException()github
k)

The following elements are not passed through the traversable resolver filter: the bean instance validated the method and constructor parameter values being validated the method and constructor return value being validated

Coverage

org.hibernate.beanvalidation.tck.tests.traversableresolver
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadable()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForParameterValidation()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForReturnValueValidation()github
l)

But the properties of these elements (if validated) are. In this case the complete path is provided via pathToTraversableObject.

Coverage

org.hibernate.beanvalidation.tck.tests.traversableresolver
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadable()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForParameterValidation()github
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testCorrectCallsToIsReachableAndIsCascadableForReturnValueValidation()github
m)

If Java Persistence is available in the runtime environment, a property is considered reachable if Java Persistence considers the property as loaded.

n)

If Java Persistence is not available in the runtime environment, all properties are considered reachable.

o)

All properties are considered cascadable.

Section 5.7.4 - ConstraintValidator resolution algorithm [constraintdeclarationvalidationprocess-validationroutine-typevalidatorresolution]

a)

The list of ConstraintValidators can contain at most one which targets cross-parameter. If the constraint targets the parameters of an executable either implicitly or by the use of validationAppliesTo in the constraint - see 3.1.1.4, then the cross-parameter ConstraintValidator is used. If none is present, a ConstraintDefinitionException is raised. If more than one cross-parameter ConstraintValidator is present, a ConstraintDefinitionException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testSeveralCrossParameterValidatorsCauseConstraintDefinitionException()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testCrossParameterConstraintWithoutValidatorCausesConstraintDefinitionException()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testCrossParameterValidatorIsUsedForConstraintImplicitlyTargetingParameters()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testCrossParameterValidatorIsUsedForConstraintExplicitlyTargetingParameters()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testCrossParameterValidatorValidatingObjectArray()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testCrossParameterValidatorValidatingObject()github
b)

If the constraint declaration is hosted on a class or an interface, the targeted type is the class or the interface.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetTypeIsInterface()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetTypeIsClass()github
c)

If the constraint is hosted on a class attribute, the type of the attribute is the targeted type.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsField()github
d)

If the constraint is hosted on a method (getter or non-getter) or constructor, the return type is the targeted type.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsGetter()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsConstructor()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsMethod()github
e)

If the constraint is hosted on a method or constructor parameter, the parameter type is the targeted type.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsMethodParameter()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsConstructorParameter()github
f)

If the constraint is hosted on a type argument of a parameterized type (i.e. a container element constraint, see 5.5), the type argument's type is the targeted type.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsTypeArgument()github
g)

If the constraint is subject to implicit unwrapping (see 5.5.1) and the applicable value extractor is defined for a generic type (e.g. javafx.beans.value.ObservableValue), the targeted type is the type captured for the type parameter handled by the value extractor (e.g. String if the constraint is placed on a StringProperty).

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsTypeArgumentForNonGenericContainerInheritingFromGenericTypeWithValueExtractor()github
h)

If the constraint is subject to implicit unwrapping and the applicable value extractor is defined for a non-generic type, the targeted type is the type defined by the extractor via @ExtractedValue#type() (e.g. Integer if the constraint is placed on a java.util.OptionalInt).

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsTypeArgumentForNonGenericContainerWithValueExtractorWithExtractedType()github
i)

The ConstraintValidator chosen to validate the generic constraint on a declared type T is the one where the ConstraintValidator targets the annotated element, where the type supported by the ConstraintValidator is a supertype of T and where there is no other ConstraintValidator whose supported type is a supertype of T and not a supertype of the chosen ConstraintValidator supported type.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testResolutionOfMultipleSizeValidators()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testResolutionOfMinMaxForDifferentTypes()github
j)

Only ConstraintValidator implementations targeting annotated elements are considered.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testGenericValidatorIsUsedForConstraintTargetingMethodReturnValue()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testGenericValidatorIsUsedForConstraintTargetingField()github
k)

Primitive types are considered equivalent to their respective primitive wrapper class.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testValidatorForWrapperTypeIsAppliedForPrimitiveType()github
l)

If no ConstraintValidator compliant with T is found among the ConstraintValidators listed by the constraint A, an UnexpectedTypeException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testUnexpectedTypeInValidatorResolution()github
org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testUnexpectedTypeException()github
m)

A ConstraintValidator<A, U> compliant with T is considered strictly more specific than a ConstraintValidator<A, V> compliant with T if U is a strict subtype of V. U is a strict subtype of V if U is a subtype of V and U != V (according to the Java Language Specification).

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testClassLevelValidatorForSubTypeHasPredenceOverValidatorForSuperClass()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsField()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsGetter()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsConstructor()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsMethod()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsMethodParameter()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsConstructorParameter()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsTypeArgument()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsTypeArgumentForNonGenericContainerInheritingFromGenericTypeWithValueExtractor()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTargetedTypeIsTypeArgumentForNonGenericContainerWithValueExtractorWithExtractedType()github
n)

If more than one maximally specific ConstraintValidator is found, an UnexpectedTypeException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testTwoValidatorsForSameTypeCauseUnexpectedTypeException()github
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testAmbiguousValidatorResolution()github

Section 5.7.5.1 - Registering ValueExtractor implementations [constraintdeclarationvalidationprocess-validationroutine-valueextractorresolution-registering]

a)

Via the Java service loader mechanism; for this the file META-INF/services/javax.validation.valueextraction.ValueExtractor must be provided

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.declaration
Test archive name: bf86c598a2b0dc8df7dea8be76bfd21a2c20a
ValueExtractorFromServiceLoaderTest.canDeclareValueExtractorViaServiceLoader()github
b)

By specifying the fully-qualified class name of one or several extractors in META-INF/validation.xml

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.declaration
Test archive name: 4c7dd15ec869aeb1acddcaee551b74510e2e48d
ValueExtractorDeclaredInValidationXmlTest.canUseValueExtractorGivenInValidationXml()github
c)

By invoking the method Configuration#addValueExtractor(ValueExtractor<?>) (to apply it at the validator factory level).

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.declaration
Test archive name: 7f49493b9e78b5cf68ca29243ab517a198916d6
ValueExtractorDefinedInConfigurationApiTest.canUseCustomExtractor()github
org.hibernate.beanvalidation.tck.tests.validation.graphnavigation.containerelement
Test archive name: 32ce26cfce3a132ac2060175f772fa916d8affa
NestedCascadingOnContainerElementsTest.testMultipleNestedValidWithCustomExtractor()github
Test archive name: 32ce26cfce3a132ac2060175f772fa916d8affa
NestedCascadingOnContainerElementsTest.testNestedNullValue()github
d)

By invoking the method ValidatorContext#addValueExtractor(ValueExtractor<?>) (to apply it for a single Validator instance).

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.declaration
Test archive name: 7f49493b9e78b5cf68ca29243ab517a198916d6
ValueExtractorDefinedInConfigurationApiTest.canUseCustomValueExtractorPerValidator()github
e)

A value extractor for a given type and type parameter specified at a higher priority overrides any other extractors for the same type and type parameter given at lower priorities.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.managedobjects
Test archive name: d3c758349abcc948081654b51cccc5b50545f
ManagedXmlAndServiceLoaderValueExtractorsTest.testValueExtractorsAreSubjectToDependencyInjection()github
org.hibernate.beanvalidation.tck.tests.valueextraction.declaration
Test archive name: 6f457eaa35f4b85d602253321f2a66816c9ff618
ValueExtractorsPrecedenceTest.valueExtractorPrecedenceIsAppliedCorrectly()github
Test archive name: 6f457eaa35f4b85d602253321f2a66816c9ff618
ValueExtractorsPrecedenceTest.valueExtractorDefinedInXmlHasPrecedenceOverBuiltInValueExtractors()github

Section 5.7.5.2 - ValueExtractor resolution algorithm for container element constraints [constraintdeclarationvalidationprocess-validationroutine-valueextractorresolution-algorithm-constraints]

a)

A ValueExtractor<T> is said to be type-compliant with C, if C is a subtype of T (according to the Java Language Specification, Java SE 8 Edition, chapter 4.10, "Subtyping"). Note that C is a subtype of T if C = T.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.resolution
Test archive name: 8e3681f197ef565a23328ee937cb80a2e4e753b1
ContainerElementValueExtractorResolutionAlgorithmTest.mostSpecificValueExtractorFound()github
Test archive name: 8e3681f197ef565a23328ee937cb80a2e4e753b1
ContainerElementValueExtractorResolutionAlgorithmTest.parallelValueExtractorDefinitionsIsOKIfOnlyOneMaximallySpecific()github
Test archive name: 8e3681f197ef565a23328ee937cb80a2e4e753b1
ContainerElementValueExtractorResolutionAlgorithmTest.declaringTypeIsConsideredAndNotRuntimeType()github
b)

A ValueExtractor implementation is said to be container-element-compliant with C, if C is a generic container type and the value extractor implementation handles a type parameter that maps to the constrained type argument.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.resolution
Test archive name: 8e3681f197ef565a23328ee937cb80a2e4e753b1
ContainerElementValueExtractorResolutionAlgorithmTest.mostSpecificValueExtractorFound()github
Test archive name: 8e3681f197ef565a23328ee937cb80a2e4e753b1
ContainerElementValueExtractorResolutionAlgorithmTest.parallelValueExtractorDefinitionsIsOKIfOnlyOneMaximallySpecific()github
Test archive name: 8e3681f197ef565a23328ee937cb80a2e4e753b1
ContainerElementValueExtractorResolutionAlgorithmTest.declaringTypeIsConsideredAndNotRuntimeType()github
c)

If no ValueExtractor type-compliant and container-element-compliant with C is found among the available value extractors, a ConstraintDeclarationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.resolution
Test archive name: 8e3681f197ef565a23328ee937cb80a2e4e753b1
ContainerElementValueExtractorResolutionAlgorithmTest.customGenericTypeWithContainerElementConstraintButNoValueExtractorThrowsException()github
d)

A ValueExtractor<U> type-compliant with C is considered strictly more specific than a ValueExtractor<V> compliant with C if U is a strict subtype of V.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.resolution
Test archive name: 8e3681f197ef565a23328ee937cb80a2e4e753b1
ContainerElementValueExtractorResolutionAlgorithmTest.mostSpecificValueExtractorFound()github
Test archive name: 8e3681f197ef565a23328ee937cb80a2e4e753b1
ContainerElementValueExtractorResolutionAlgorithmTest.parallelValueExtractorDefinitionsIsOKIfOnlyOneMaximallySpecific()github
Test archive name: 8e3681f197ef565a23328ee937cb80a2e4e753b1
ContainerElementValueExtractorResolutionAlgorithmTest.declaringTypeIsConsideredAndNotRuntimeType()github
e)

If more than one maximally specific and container-element-compliant ValueExtractor is found, a ConstraintDeclarationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.resolution
Test archive name: 8e3681f197ef565a23328ee937cb80a2e4e753b1
ContainerElementValueExtractorResolutionAlgorithmTest.parallelValueExtractorDefinitionsCausesException()github

Section 5.7.5.3 - ValueExtractor resolution algorithm for cascaded validation [constraintdeclarationvalidationprocess-validationroutine-valueextractorresolution-algorithm-cascaded]

a)

A ValueExtractor<T> is said to be type-compliant with C', if C' is a subtype of T.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.resolution
Test archive name: 104fdcbeb2ce152799d755b3dc267ac45b6bba
CascadingValueExtractorResolutionAlgorithmTest.mostSpecificValueExtractorFound()github
Test archive name: 104fdcbeb2ce152799d755b3dc267ac45b6bba
CascadingValueExtractorResolutionAlgorithmTest.mostSpecificValueExtractorFoundWithParallelHierarchiesAsRuntimeTypeIsConsidered()github
b)

A ValueExtractor implementation is said to be container-element-compliant with C, if it handles a type parameter that maps to the type argument marked with @Valid.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.resolution
Test archive name: 104fdcbeb2ce152799d755b3dc267ac45b6bba
CascadingValueExtractorResolutionAlgorithmTest.mostSpecificValueExtractorFound()github
Test archive name: 104fdcbeb2ce152799d755b3dc267ac45b6bba
CascadingValueExtractorResolutionAlgorithmTest.mostSpecificValueExtractorFoundWithParallelHierarchiesAsRuntimeTypeIsConsidered()github
c)

If no ValueExtractor type-compliant with C' and container-element-compliant with C is found among the available value extractors, a ConstraintDeclarationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.resolution
Test archive name: 104fdcbeb2ce152799d755b3dc267ac45b6bba
CascadingValueExtractorResolutionAlgorithmTest.customGenericTypeWithCascadingButNoValueExtractorThrowsException()github
d)

A ValueExtractor<U> type-compliant with C' is considered strictly more specific than a ValueExtractor<V> compliant with C' if U is a strict subtype of V.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.resolution
Test archive name: 104fdcbeb2ce152799d755b3dc267ac45b6bba
CascadingValueExtractorResolutionAlgorithmTest.mostSpecificValueExtractorFound()github
Test archive name: 104fdcbeb2ce152799d755b3dc267ac45b6bba
CascadingValueExtractorResolutionAlgorithmTest.mostSpecificValueExtractorFoundWithParallelHierarchiesAsRuntimeTypeIsConsidered()github
e)

A ValueExtractor<U> type-compliant with C' is considered maximally specific if no other ValueExtractor<V> type-compliant with C' is strictly more specific than ValueExtractor<U>.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.resolution
Test archive name: 104fdcbeb2ce152799d755b3dc267ac45b6bba
CascadingValueExtractorResolutionAlgorithmTest.mostSpecificValueExtractorFound()github
Test archive name: 104fdcbeb2ce152799d755b3dc267ac45b6bba
CascadingValueExtractorResolutionAlgorithmTest.mostSpecificValueExtractorFoundWithParallelHierarchiesAsRuntimeTypeIsConsidered()github
f)

If more than one maximally specific and container-element-compliant ValueExtractor is found, a ConstraintDeclarationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.resolution
Test archive name: 104fdcbeb2ce152799d755b3dc267ac45b6bba
CascadingValueExtractorResolutionAlgorithmTest.parallelValueExtractorDefinitionsCausesException()github

Section 5.7.5.4 - ValueExtractor resolution algorithm for applying container-level constraints to container elements [constraintdeclarationvalidationprocess-validationroutine-valueextractorresolution-implicitunwrapping]

a)

If the constraint carries the Unwrapping.Skip payload, no value extractor is applied.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.unwrapping
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapper_if_unwrapping_disabled_per_constraint_for_generic_container()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapper_if_unwrapping_disabled_per_constraint_for_non_generic_container()github
b)

If the constraint carries the Unwrapping.Unwrap payload and there is exactly one maximally-specific type-compliant value extractor, this extractor is applied;

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.unwrapping
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.no_constraint_validator_for_unwrapped_value_throws_exception()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_explicit_unwrapping()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_value_extractor_unwraps_by_default_and_unwrapping_enabled_per_constraint_for_generic_container()github
c)

If no type-compliant extractor or multiple maximally-specific type-compliant extractors exist, a ConstraintDeclarationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.unwrapping
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.missing_value_extractor_throws_exception()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_implicit_unwrapping_having_two_type_parameters_and_two_maximally_specific_value_extractors_marked_with_unwrap_by_default_raises_exception()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_forced_unwrapping_having_two_type_parameters_and_two_maximally_specific_value_extractors_raises_exception()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_implicit_unwrapping_having_two_type_parameters_and_only_one_maximally_specific_value_extractor_is_ok()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_implicit_unwrapping_having_two_type_parameters_and_only_one_maximally_specific_value_extractor_marked_with_unwrap_by_default_is_ok()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_forced_unwrapping_having_two_type_parameters_and_only_one_maximally_specific_value_extractor_is_ok()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_forced_unwrapping_having_two_reverted_type_parameters_correctly_identifies_type_parameter()github
d)

If there is exactly one maximally-specific type-compliant value extractor and this extractor is marked with @UnwrapByDefault, this extractor is applied;

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.unwrapping
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_value_extractor_unwraps_by_default_for_generic_container()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_value_extractor_unwraps_by_default_for_non_generic_container()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_value_extractor_unwraps_by_default_and_unwrapping_enabled_per_constraint_for_non_generic_container()github
e)

Otherwise, no value extractor is applied.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.unwrapping
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapper_itself_if_there_is_no_unwrapping()github

Section 6.1 - Validator API [validationapi-validatorapi]

a)

Validator implementations must be thread-safe.

Section 6.1.1 - Validation methods [validationapi-validatorapi-validationmethods]

a)

<T> Set<ConstraintViolation<T>> validate(T object, Class<?>... groups) is used to validate a given object.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testMultipleViolationOfTheSameType()github
b)

An IllegalArgumentException is thrown when null is passed for the object parameter or the varargs groups parameter.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testValidateWithNullValue()github
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testValidateWithNullGroup()github
c)

A Set containing all ConstraintViolation objects representing the failing constraints is returned, an empty Set is returned otherwise.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testMultipleViolationOfTheSameType()github
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testMultipleConstraintViolationOfDifferentTypes()github
Test archive name: e7f1dbb871fc8021edf896294e4ba11d8ca57e
ValidatePropertyTest.testValidateProperty()github
d)

<T> Set<ConstraintViolation<T>> validateProperty(T object, String propertyName, Class<?>... groups) validates a given field or property of an object.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: e7f1dbb871fc8021edf896294e4ba11d8ca57e
ValidatePropertyTest.testValidateProperty()github
e)

An IllegalArgumentException is thrown when validateProperty() is called and object is null or propertyName is null, empty or invalid or null is passed to the varargs groups parameter.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: e7f1dbb871fc8021edf896294e4ba11d8ca57e
ValidatePropertyTest.testPassingNullAsGroup()github
Test archive name: e7f1dbb871fc8021edf896294e4ba11d8ca57e
ValidatePropertyTest.testIllegalArgumentExceptionIsThrownForNullValue()github
Test archive name: e7f1dbb871fc8021edf896294e4ba11d8ca57e
ValidatePropertyTest.testValidatePropertyWithNullProperty()github
Test archive name: e7f1dbb871fc8021edf896294e4ba11d8ca57e
ValidatePropertyTest.testValidatePropertyWithEmptyProperty()github
Test archive name: e7f1dbb871fc8021edf896294e4ba11d8ca57e
ValidatePropertyTest.testValidatePropertyWithInvalidPropertyPath()github
f)

The property name is the JavaBeans property name (as defined by the JavaBeans Introspector class).

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: e7f1dbb871fc8021edf896294e4ba11d8ca57e
ValidatePropertyTest.testValidatePropertyWithInvalidPropertyPath()github
Test archive name: e7f1dbb871fc8021edf896294e4ba11d8ca57e
ValidatePropertyTest.testValidateProperty()github
g)

@Valid is not honored by this method.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: e7f1dbb871fc8021edf896294e4ba11d8ca57e
ValidatePropertyTest.testValidIsNotHonoredValidateProperty()github
h)

<T> Set<ConstraintViolation<T>> validateValue(Class<T> beanType, String propertyName, Object value, Class<?>... groups) validates the property referenced by propertyName present on beanType or any of its superclasses, if the property value were value.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 32dfdb9f3ddfc025bd2d5cb9ccb5569fb3c673
ValidateValueTest.testValidateValueSuccess()github
Test archive name: 32dfdb9f3ddfc025bd2d5cb9ccb5569fb3c673
ValidateValueTest.testValidateValueFailure()github
Test archive name: 32dfdb9f3ddfc025bd2d5cb9ccb5569fb3c673
ValidateValueTest.testValidateValue()github
i)

An IllegalArgumentException is thrown when validateValue() is called and beanType is null or propertyName is null, empty or invalid or null is passed to the varargs groups parameter.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 32dfdb9f3ddfc025bd2d5cb9ccb5569fb3c673
ValidateValueTest.testValidateValueWithInvalidPropertyPath()github
Test archive name: 32dfdb9f3ddfc025bd2d5cb9ccb5569fb3c673
ValidateValueTest.testExistingPropertyWoConstraintsNorCascaded()github
Test archive name: 32dfdb9f3ddfc025bd2d5cb9ccb5569fb3c673
ValidateValueTest.testValidateValuePassingNullAsGroup()github
Test archive name: 32dfdb9f3ddfc025bd2d5cb9ccb5569fb3c673
ValidateValueTest.testValidateValueWithEmptyPropertyPath()github
Test archive name: 32dfdb9f3ddfc025bd2d5cb9ccb5569fb3c673
ValidateValueTest.testValidateValueWithNullObject()github
Test archive name: 32dfdb9f3ddfc025bd2d5cb9ccb5569fb3c673
ValidateValueTest.testValidateValueWithNullPropertyName()github
j)

@Valid is not honored by this method.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 32dfdb9f3ddfc025bd2d5cb9ccb5569fb3c673
ValidateValueTest.testValidIsNotHonoredValidateValue()github
k)

If some unrecoverable failure happens during validation, a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testUnexpectedExceptionsInValidateGetWrappedInValidationExceptions()github
Test archive name: e7f1dbb871fc8021edf896294e4ba11d8ca57e
ValidatePropertyTest.testUnexpectedExceptionsInValidatePropertyGetWrappedInValidationExceptions()github

Section 6.1.2 - Methods for validating method and constructor constraints [validationapi-validatorapi-methodlevelvalidationmethods]

a)

<T> Set<ConstraintViolation<T>> validateParameters(T object, Method method, Object[] parameterValues, Class<?>... groups) validates the arguments (as given in parameterValues) for the parameters of a given method (identified by method). Cross-parameter constraints are also validated.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application.method
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testMethodParameterAndCrossParameterConstraintsAreEvaluatedAtTheSameTime()github
org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testUnexpectedType()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testOneViolation()github
b)

A set containing all ConstraintViolation objects representing the failing constraints is returned, an empty set is returned if no constraint violations occurred.

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testTwoViolations()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testTwoViolationsOnSameParameter()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testTwoConstraintsOfSameType()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testCrossParameterConstraintGivenSeveralTimes()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testNoViolations()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testValidationWithGroup()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testCrossParameterConstraintValidationWithGroup()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testValidationWithSeveralGroups()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testOneViolation()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testOneViolationFromCrossParameterConstraint()github
c)

An IllegalArgumentException will be thrown if null is passed for any of the parameters or if the parameters don't match with each other (i.e. object and method don't match, parameterValues and method don't match).

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testNullPassedForObjectCausesException()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testNullPassedForMethodCausesException()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testNullPassedForParameterValuesCausesException()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testNullPassedForGroupsCausesException()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testNullPassedAsSingleGroupCausesException()github
d)

<T> Set<ConstraintViolation<T>> validateReturnValue(T object, Method method, Object returnValue, Class<?>... groups) validates the return value (specified by returnValue) of a given method (identified by method).

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testUnexpectedType()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testOneViolation()github
e)

A set containing all ConstraintViolation objects representing the failing constraints is returned, an empty set is returned if no constraint violations occurred.

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testTwoViolations()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testTwoConstraintsOfSameType()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testNoViolations()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testValidationWithGroup()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testValidationWithSeveralGroups()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testOneViolation()github
f)

An IllegalArgumentException will be thrown if null is passed for any of the parameters object, method and groups or if the parameters don't match with each other (i.e. object and method don't match, returnValue and method don't match).

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testNullPassedForObjectCausesException()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testNullPassedForMethodCausesException()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testNullPassedForGroupsCausesException()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testNullPassedAsSingleGroupCausesException()github
g)

<T> Set<ConstraintViolation<T>> validateConstructorParameters(Constructor<T> constructor, Object[] parameterValues, Class<?>... groups) validates the arguments (as given in parameterValues) for the parameters of a given constructor (identified by constructor). Cross-parameter constraints are also validated.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.application.method
Test archive name: 59c62e58129ef3a8015dd438a60a94ce9d30c7
MethodValidationRequirementTest.testConstructorParameterAndCrossParameterConstraintsAreEvaluatedAtTheSameTime()github
org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testUnexpectedType()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testOneViolation()github
h)

A set containing all ConstraintViolation objects representing the failing constraints is returned, an empty set is returned if no constraint violations occurred.

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testTwoViolations()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testTwoViolationsOnSameParameter()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testTwoConstraintsOfSameType()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testCrossParameterConstraintGivenSeveralTimes()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testNoViolations()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testValidationWithGroup()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testCrossParameterConstraintValidationWithGroup()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testValidationWithSeveralGroups()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testOneViolation()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testOneViolationFromCrossParameterConstraint()github
i)

An IllegalArgumentException will be thrown if null is passed for any of the parameters or if the parameters don't match with each other (i.e. parameterValues and constructor don't match).

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testNullPassedForConstructorCausesException()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testNullPassedForParameterValuesCausesException()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testNullPassedForGroupsCausesException()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testNullPassedAsSingleGroupCausesException()github
j)

<T> Set<ConstraintViolation<T>> validateConstructorReturnValue(Constructor<T> constructor, T createdObject, Class<?>... groups) validates the object (specified by createdObject) of a given constructor (identified by constructor).

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testUnexpectedType()github
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testOneViolation()github
k)

A set containing all ConstraintViolation objects representing the failing constraints is returned, an empty set is returned if no constraint violations occurred.

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testTwoViolations()github
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testTwoConstraintsOfSameType()github
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testNoViolations()github
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testValidationWithGroup()github
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testValidationWithSeveralGroups()github
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testOneViolation()github
l)

An IllegalArgumentException will be thrown if null is passed for any of the parameters or if the parameters don't match with each other (i.e. createdObject and constructor don't match).

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testNullPassedForConstructorCausesException()github
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testNullPassedForReturnValueCausesException()github
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testNullPassedForGroupsCausesException()github
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testNullPassedAsSingleGroupCausesException()github
m)

None of those methods honor the XML configuration around executable validation nor the presence of @ValidateOnExecution. In other words, elements will be validated regardless of these settings when explicitly calling the validation methods.

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: aa83cb8b1771e8cfeceda149cfef7d19eb82a976
ExecutableValidationIgnoresValidatedExecutableXmlSettingsTest.testValidateParametersYieldsConstraintViolationIfValidateExecutableIsSetToNONEInXml()github
Test archive name: aa83cb8b1771e8cfeceda149cfef7d19eb82a976
ExecutableValidationIgnoresValidatedExecutableXmlSettingsTest.testValidateConstructorParametersYieldsConstraintViolationIfValidateExecutableIsSetToNONEInXml()github
Test archive name: aa83cb8b1771e8cfeceda149cfef7d19eb82a976
ExecutableValidationIgnoresValidatedExecutableXmlSettingsTest.testValidateReturnValueYieldsConstraintViolationIfValidateExecutableIsSetToNONEInXml()github
Test archive name: aa83cb8b1771e8cfeceda149cfef7d19eb82a976
ExecutableValidationIgnoresValidatedExecutableXmlSettingsTest.testValidateConstructorReturnValueYieldsConstraintViolationIfValidateExecutableIsSetToNONEInXml()github
Test archive name: 1a3f6e73829c112e765967d85b095846733ceae
ExecutableValidationIgnoresValidatedExecutableAnnotationSettingsTest.testValidateParametersYieldsConstraintViolationIfValidateExecutableIsSetToNONEOnTypeLevel()github
Test archive name: 1a3f6e73829c112e765967d85b095846733ceae
ExecutableValidationIgnoresValidatedExecutableAnnotationSettingsTest.testValidateConstructorParametersYieldsConstraintViolationIfValidateExecutableIsSetToNONEOnTypeLevel()github
Test archive name: 1a3f6e73829c112e765967d85b095846733ceae
ExecutableValidationIgnoresValidatedExecutableAnnotationSettingsTest.testValidateReturnValueYieldsConstraintViolationIfValidateExecutableIsSetToNONEOnTypeLevel()github
Test archive name: 1a3f6e73829c112e765967d85b095846733ceae
ExecutableValidationIgnoresValidatedExecutableAnnotationSettingsTest.testValidateConstructorReturnValueYieldsConstraintViolationIfValidateExecutableIsSetToNONEOnTypeLevel()github
Test archive name: 1a3f6e73829c112e765967d85b095846733ceae
ExecutableValidationIgnoresValidatedExecutableAnnotationSettingsTest.testValidateParametersYieldsConstraintViolationIfValidateExecutableIsSetToNONEOnExecutableLevel()github
Test archive name: 1a3f6e73829c112e765967d85b095846733ceae
ExecutableValidationIgnoresValidatedExecutableAnnotationSettingsTest.testValidateConstructorParametersYieldsConstraintViolationIfValidateExecutableIsSetToNONEOnExecutableLevel()github
Test archive name: 1a3f6e73829c112e765967d85b095846733ceae
ExecutableValidationIgnoresValidatedExecutableAnnotationSettingsTest.testValidateReturnValueYieldsConstraintViolationIfValidateExecutableIsSetToNONEOnExecutableLevel()github
Test archive name: 1a3f6e73829c112e765967d85b095846733ceae
ExecutableValidationIgnoresValidatedExecutableAnnotationSettingsTest.testValidateConstructorReturnValueYieldsConstraintViolationIfValidateExecutableIsSetToNONEOnExecutableLevel()github

Section 6.1.3 - groups [validationapi-validatorapi-groups]

a)

All constraints belonging to the targeted group(s) are applied during the 5.7.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5a4965348761b58bd15b3c6bf3482b139ae89cfc
ValidateWithGroupsTest.testCorrectGroupsAreAppliedForValidate()github
Test archive name: 5a4965348761b58bd15b3c6bf3482b139ae89cfc
ValidateWithGroupsTest.testCorrectGroupsAreAppliedForValidateProperty()github
Test archive name: 5a4965348761b58bd15b3c6bf3482b139ae89cfc
ValidateWithGroupsTest.testCorrectGroupsAreAppliedForValidateValue()github
b)

If no group is passed, the Default group is assumed.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5a4965348761b58bd15b3c6bf3482b139ae89cfc
ValidateWithGroupsTest.testCorrectGroupsAreAppliedForValidate()github
Test archive name: 5a4965348761b58bd15b3c6bf3482b139ae89cfc
ValidateWithGroupsTest.testCorrectGroupsAreAppliedForValidateProperty()github
Test archive name: 5a4965348761b58bd15b3c6bf3482b139ae89cfc
ValidateWithGroupsTest.testCorrectGroupsAreAppliedForValidateValue()github
c)

When more than one group is evaluated and passed to the various validate methods, order is not constrained.

Section 6.2 - ConstraintViolation [validationapi-constraintviolation]

a)

The getMessage() method returns the interpolated (localized) message for the failing constraint

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testConstraintViolation()github
b)

The getMessageTemplate() method returns the non-interpolated error message

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testConstraintViolation()github
c)

The getRootBean() method returns the root object being validated that led to the failing constraint

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testConstraintViolation()github
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testClassLevelConstraintViolation()github
d)

For method validation, returns the object the method is executed on. For constructors or when Validator.validateValue() is used, returns null.

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testOneViolation()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testOneViolation()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testOneViolation()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testOneViolation()github
org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 32dfdb9f3ddfc025bd2d5cb9ccb5569fb3c673
ValidateValueTest.testValidateValue()github
e)

The getRootBeanClass() method returns the class of the root bean being validated. For method validation, this is the object class the method is executed on. For constructor validation, this is the class the constructor is declared on.

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testOneViolation()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testOneViolation()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testOneViolation()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testOneViolation()github
org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testConstraintViolation()github
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testClassLevelConstraintViolation()github
Test archive name: e7f1dbb871fc8021edf896294e4ba11d8ca57e
ValidatePropertyTest.testValidateProperty()github
Test archive name: 32dfdb9f3ddfc025bd2d5cb9ccb5569fb3c673
ValidateValueTest.testValidateValue()github
f)

The getLeafBean() method returns the following object: If a bean constraint, the bean instance the constraint is applied on. If a property constraint or a container element constraint hosted on a property, the bean instance hosting the property the constraint is applied on. If a property constraint, null when the ConstraintViolation is returned after calling Validator.validateValue(). If a method parameter, cross-parameter or return value constraint or a container element constraint hosted on a method parameter or return value, the object the method is executed on. If a constructor parameter or cross-parameter constraint or a container element constraint hosted on a constructor parameter, null. If a constructor return value constraint, the object the constructor has created.

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testContainerElementLeafBean()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testContainerElementLeafBean()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testContainerElementLeafBean()github
org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testContainerElementLeafBean()github
org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testOneViolation()github
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testOneViolationForCascadedValidation()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testOneViolation()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testOneViolationFromCrossParameterConstraint()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testOneViolationForCascadedValidation()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testOneViolation()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testOneViolationForCascadedValidation()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testOneViolation()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testOneViolationFromCrossParameterConstraint()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testOneViolationForCascadedValidation()github
org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testConstraintViolation()github
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testClassLevelConstraintViolation()github
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testGraphValidationWithList()github
Test archive name: e7f1dbb871fc8021edf896294e4ba11d8ca57e
ValidatePropertyTest.testValidateProperty()github
Test archive name: 32dfdb9f3ddfc025bd2d5cb9ccb5569fb3c673
ValidateValueTest.testValidateValue()github
g)

The getExecutableParameters() returns the parameters provided to the method or constructor invocation or null if not validating a method or constructor parameters.

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testOneViolation()github
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testOneViolationForCascadedValidation()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testOneViolation()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testOneViolationForCascadedValidation()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testOneViolation()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testOneViolationForCascadedValidation()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testOneViolation()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testOneViolationForCascadedValidation()github
org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testConstraintViolation()github
Test archive name: e7f1dbb871fc8021edf896294e4ba11d8ca57e
ValidatePropertyTest.testValidateProperty()github
Test archive name: 32dfdb9f3ddfc025bd2d5cb9ccb5569fb3c673
ValidateValueTest.testValidateValue()github
h)

The getExecutableReturnValue() returns the return value of the method or constructor invocation or null if the method has no return value or if not validating a method or constructor return value.

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testOneViolation()github
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testOneViolationForCascadedValidation()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testOneViolation()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testOneViolationForCascadedValidation()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testOneViolation()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testOneViolationForCascadedValidation()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testOneViolation()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testOneViolationForCascadedValidation()github
org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testConstraintViolation()github
Test archive name: e7f1dbb871fc8021edf896294e4ba11d8ca57e
ValidatePropertyTest.testValidateProperty()github
Test archive name: 32dfdb9f3ddfc025bd2d5cb9ccb5569fb3c673
ValidateValueTest.testValidateValue()github
i)

The getInvalidValue() method returns the value (field, property, method/constructor parameter, method/constructor return value, container element or validated object) being passed to isValid().

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.unwrapping
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapper_itself_if_there_is_no_unwrapping()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapper_if_unwrapping_disabled_per_constraint_for_generic_container()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapper_if_unwrapping_disabled_per_constraint_for_non_generic_container()github
org.hibernate.beanvalidation.tck.tests.constraints.containerelement
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_map_of_list_of_optional()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.field_constraint_provided_on_type_parameter_of_a_list_gets_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.constraints_specified_on_list_and_on_type_parameter_of_list_get_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.getter_constraint_provided_on_type_parameter_of_a_list_gets_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.return_value_constraint_provided_on_type_parameter_of_a_list_gets_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.method_parameter_constraint_provided_as_type_parameter_of_a_list_gets_validated()github
Test archive name: 67399773cb8c3039b79d74bfcacb57514dea8bd
ContainerElementConstraintListTest.constructor_parameter_constraint_provided_on_type_parameter_of_a_list_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.constraint_specified_on_type_parameter_of_optional_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.constraints_specified_on_optional_and_on_type_parameter_of_optional_get_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.getter_constraint_provided_on_type_parameter_of_an_optional_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.return_value_constraint_provided_on_type_parameter_of_an_optional_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.method_parameter_constraint_provided_as_type_parameter_of_an_optional_gets_validated()github
Test archive name: 9bb3baf393cfb73e2456b1cd87ea8c17d259e4d9
ContainerElementConstraintOptionalTest.constructor_parameter_constraint_provided_on_type_parameter_of_an_optional_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.constraint_specified_on_type_parameter_of_custom_container_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.constraints_specified_on_custom_container_and_on_type_parameter_of_custom_container_get_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.getter_constraint_provided_on_type_parameter_of_an_custom_container_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.return_value_constraint_provided_on_type_parameter_of_an_custom_container_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.method_parameter_constraint_provided_as_type_parameter_of_an_custom_container_gets_validated()github
Test archive name: d880ebe7ee40ff5284d8ccecc0d49c6b52c52e5d
ContainerElementConstraintCustomContainerTest.constructor_parameter_constraint_provided_on_type_parameter_of_an_custom_container_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.constraint_specified_on_key_type_parameter_of_map_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.constraints_specified_on_map_and_on_key_type_parameter_of_map_get_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.getter_constraint_provided_on_key_type_parameter_of_a_map_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.return_value_constraint_provided_on_key_type_parameter_of_a_map_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.method_parameter_constraint_provided_as_key_type_parameter_of_a_map_gets_validated()github
Test archive name: 758d9bf3d6bc56bc4e8a63c5953cf75c4defb5
ContainerElementConstraintMapKeyTest.constructor_parameter_constraint_provided_on_key_type_parameter_of_a_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.constraint_specified_on_value_type_parameter_of_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.constraints_specified_on_map_and_on_value_type_parameter_of_map_get_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.getter_constraint_provided_on_value_type_parameter_of_a_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.return_value_constraint_provided_on_value_type_parameter_of_a_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.method_parameter_constraint_provided_as_value_type_parameter_of_a_map_gets_validated()github
Test archive name: 58c6a6e8821bfe256b3252e2fed6caacb43b9033
ContainerElementConstraintMapValueTest.constructor_parameter_constraint_provided_on_value_type_parameter_of_a_map_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.field_constraint_provided_on_type_parameter_of_a_set_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.constraints_specified_on_set_and_on_type_parameter_of_set_get_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.getter_constraint_provided_on_type_parameter_of_a_set_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.return_value_constraint_provided_on_type_parameter_of_a_set_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.method_parameter_constraint_provided_as_type_parameter_of_a_set_gets_validated()github
Test archive name: ad2c6d1ae74ac3502e2fb132639a95259cf1865
ContainerElementConstraintSetTest.constructor_parameter_constraint_provided_on_type_parameter_of_a_set_gets_validated()github
org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testOneViolation()github
Test archive name: 408ec54bf1a39526e13ca2d32c4d82fd76ae3b0
ValidateConstructorReturnValueTest.testOneViolationForCascadedValidation()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testOneViolation()github
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testOneViolationForCascadedValidation()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testOneViolation()github
Test archive name: 8f9a4716688637ed2914a1787511db89f5f6dcd
ValidateReturnValueTest.testOneViolationForCascadedValidation()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testOneViolation()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testOneViolationForCascadedValidation()github
org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testConstraintViolation()github
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testClassLevelConstraintViolation()github
Test archive name: e7f1dbb871fc8021edf896294e4ba11d8ca57e
ValidatePropertyTest.testValidateProperty()github
Test archive name: 32dfdb9f3ddfc025bd2d5cb9ccb5569fb3c673
ValidateValueTest.testValidateValue()github
j)

For a cross-parameter constraint failure, an Object[] representing the method/constructor invocation arguments is returned.

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation
Test archive name: 35a7a2577e1c9c6c12bed1aa6c64f347691b3e8
ValidateConstructorParametersTest.testOneViolationFromCrossParameterConstraint()github
Test archive name: cdce658119cb131bab84532082defa7e54353ca
ValidateParametersTest.testOneViolationFromCrossParameterConstraint()github
k)

In case a constraint given on a container is subject to implicit application to the container element(s) (see 5.5.1), getInvalidValue() returns the invalid container element value.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.unwrapping
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_explicit_unwrapping()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_value_extractor_unwraps_by_default_for_generic_container()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_value_extractor_unwraps_by_default_and_unwrapping_enabled_per_constraint_for_generic_container()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_value_extractor_unwraps_by_default_for_non_generic_container()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_wrapped_value_if_value_extractor_unwraps_by_default_and_unwrapping_enabled_per_constraint_for_non_generic_container()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_implicit_unwrapping_having_two_type_parameters_and_only_one_maximally_specific_value_extractor_is_ok()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_implicit_unwrapping_having_two_type_parameters_and_only_one_maximally_specific_value_extractor_marked_with_unwrap_by_default_is_ok()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_forced_unwrapping_having_two_type_parameters_and_only_one_maximally_specific_value_extractor_is_ok()github
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validate_forced_unwrapping_having_two_reverted_type_parameters_correctly_identifies_type_parameter()github
l)

getConstraintDescriptor() provides access to the failing constraint metadata

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testConstraintViolation()github
m)

The getPropertyPath() method returns the Path object representing the navigation path from the root object to the failing object.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithConstraintViolationForRootObject()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversedObject()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithList()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithArray()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithRuntimeTypeList()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithMap()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathSet()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraintWithCustomParameterNameProvider()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraintWithCustomParameterNameProvider()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorReturnValue()github
n)

getName() returns the name of the element which the node represents

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithConstraintViolationForRootObject()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversedObject()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithList()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithArray()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithRuntimeTypeList()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithMap()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathSet()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraintWithCustomParameterNameProvider()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraintWithCustomParameterNameProvider()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorReturnValue()github
o)

isInIterable() returns true if the node represents an object contained in an array or in a multi-valued container such as Iterable or Map, false otherwise.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithConstraintViolationForRootObject()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversedObject()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithList()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithArray()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithRuntimeTypeList()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithMap()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathSet()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraintWithCustomParameterNameProvider()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraintWithCustomParameterNameProvider()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorReturnValue()github
p)

getIndex() returns the index of the node if it is contained in an array, List or any other container supporting indexed access. Returns null otherwise.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithConstraintViolationForRootObject()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversedObject()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithList()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithArray()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithRuntimeTypeList()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithMap()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathSet()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraintWithCustomParameterNameProvider()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraintWithCustomParameterNameProvider()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorReturnValue()github
q)

getKey() returns the key of the node if it is contained in a Map or any other container supporting keyed access. Returns null otherwise.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithConstraintViolationForRootObject()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversedObject()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithList()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithArray()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithRuntimeTypeList()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithMap()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathSet()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraintWithCustomParameterNameProvider()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraintWithCustomParameterNameProvider()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorReturnValue()github
r)

getKind() returns the ElementKind corresponding to the actual node type. This can be used in conjunction with the method as() to narrow the type and access node specific methods

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithConstraintViolationForRootObject()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversedObject()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithList()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithArray()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithRuntimeTypeList()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithMap()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathSet()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraintWithCustomParameterNameProvider()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraintWithCustomParameterNameProvider()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorReturnValue()github
s)

as(Class<? extends Node>) returns the node instance narrowed to the type passed as a parameter or throws a ClassCastException if the type and node don't match.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPassingWrongTypeToAsOnBeanNodeCausesClassCastException()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPassingWrongTypeToAsOnConstructorNodeCausesClassCastException()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPassingWrongTypeToAsOnParameterNodeCausesClassCastException()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithConstraintViolationForRootObject()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversedObject()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorCrossParameterConstraint()github
t)

In particular, MethodNode and ConstructorNode host getParameterTypes() which return the method or constructor parameter list.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraint()github
u)

Likewise ParameterNode hosts getParameterIndex() which returns the parameter index in the method or constructor parameter list.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraint()github
v)

BeanNode, PropertyNode and ContainerElementNode host getContainerClass() and getTypeArgumentIndex(). If the node represents an element that is contained in a container such as Optional, List or Map, the former returns the declared type of the container and, if the container is of a generic type, the latter returns the index of the affected type argument.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testGetContainerClassGetTypeArgumentIndex()github
w)

The runtime type is considered, not the static type. For example if a property is declared Collection<String> but its runtime type is ArrayList<String>, the property is considered an ArrayList<String>.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithRuntimeTypeList()github
x)

If the failing object is the root object, a BeanNode with name set to null is added to the Path. The ElementKind of the node is ElementKind.BEAN.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithConstraintViolationForRootObject()github
y)

A PropertyNode object whose name equals the name of the association property (field name or Java Bean property name) is added to Path. The ElementKind of the node is ElementKind.PROPERTY.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversedObject()github
z)

If the association is an array, a List or any other container whose value extractor invokes ValueReceiver#indexedValue() (see 4), the following Node object added contains the index value in getIndex()

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithList()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithArray()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithRuntimeTypeList()github
aa)

If the association is a Map or any other container whose value extractor invokes ValueReceiver#keyedValue(), the following Node object added (representing a given map entry) contains the key value in getKey()

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithMap()github
ab)

For all Iterable, Map or other container whose value extractor invokes ValueReceiver#indexedValue(), ValueReceiver#keyedValue() or ValueReceiver#iterableValue(), the following Node object added is marked as inIterable (isInIterable())

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithList()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithArray()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithRuntimeTypeList()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithMap()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathSet()github
ac)

If the traversed object is of a container type (e.g. a List or Map), the following Node object added returns the declared type of the traversed container via getContainerClass() and the index of the affected type argument via getTypeArgumentIndex()

Coverage

org.hibernate.beanvalidation.tck.tests.validation.graphnavigation.containerelement
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_list_parameter_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_map_parameter_value_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_map_parameter_key_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_optional_parameter_and_cascading_gets_validated()github
Test archive name: 802d883e44f9da890cbf7c3913a677ef67c83b5
CascadingOnContainerElementsTest.constraint_provided_on_custom_bean_used_as_set_parameter_and_cascading_gets_validated()github
ad)

If the value extractor of the outer container has provided a non-null node name, a ContainerElementNode object whose name equals that name is added to Path. The ElementKind of the node is ElementKind.CONTAINER_ELEMENT

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.containerelement
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_map_of_list_of_optional()github
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_map_of_list_of_stringproperty()github
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_list_of_maps()github
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_list_of_iterables()github
ae)

If the container is a List or any other container whose value extractor invokes ValueReceiver#indexedValue(), the following Node object added contains the index value in getIndex()

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.containerelement
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_map_of_list_of_optional()github
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_map_of_list_of_stringproperty()github
af)

If the container is a Map or any other container whose value extractor invokes ValueReceiver#keyedValue(), the following Node object added (representing a given map entry) contains the key value in getKey()

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.containerelement
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_map_of_list_of_stringproperty()github
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_list_of_maps()github
ag)

For all Iterable, Map or other container whose value extractor invokes ValueReceiver#indexedValue(), ValueReceiver#keyedValue() or ValueReceiver#iterableValue(), the following Node object added is marked as inIterable (isInIterable())

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.containerelement
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_map_of_list_of_optional()github
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_map_of_list_of_stringproperty()github
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_list_of_maps()github
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_list_of_iterables()github
ah)

The following Node object added returns the declared type of the traversed container via getContainerClass() and the index of the affected type argument via getTypeArgumentIndex()

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.containerelement
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_map_of_list_of_optional()github
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_map_of_list_of_stringproperty()github
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_list_of_maps()github
Test archive name: 534afdfeef2ff2ed73a37f3354b592c326b995
NestedContainerElementConstraintsTest.validation_of_nested_type_arguments_works_with_list_of_iterables()github
ai)

For a property level constraint (field and getter) a PropertyNode object is added to Path whose name equals the name of the property (field name or Java Bean property name). The ElementKind of the node is ElementKind.PROPERTY. the property path is considered complete

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversedObject()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorReturnValue()github
aj)

For a class level constraint: a BeanNode object is added to Path whose name is null. The ElementKind of the node is ElementKind.BEAN. the property path is considered complete

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathWithConstraintViolationForRootObject()github
ak)

A MethodNode respectively a ConstructorNode object is added to the Path which represents the validated method respectively constructor. The name of the node equals the validated method name or the validated constructor's unqualified class name, the ElementKind of the node is ElementKind.METHOD respectively ElementKind.CONSTRUCTOR.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorReturnValueConstraint()github
al)

If the constraint is on a parameter, a ParameterNode object is added to the Path which represents the validated parameter. The name of the node equals the parameter name as determined by the current parameter name provider (see 5.6.2.2). The ElementKind of the node is ElementKind.PARAMETER.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraintWithCustomParameterNameProvider()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraintWithCustomParameterNameProvider()github
am)

If the constraint is a cross-parameter constraint, a CrossParameterNode object is added to the Path which represents the validated cross-parameter element. The name of the node has the constant value <cross-parameter>. The ElementKind of the node is ElementKind.CROSS_PARAMETER.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorCrossParameterConstraint()github
an)

If the constraint is on the return value, a ReturnValueNode object is added to the Path which represents the validated return value. The name of the node has the constant value <return value>. The ElementKind of the node is ElementKind.RETURN_VALUE.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorReturnValueConstraint()github
ao)

The property path is considered complete

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodParameterConstraintWithCustomParameterNameProvider()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodReturnValueConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForMethodCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorParameterConstraintWithCustomParameterNameProvider()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorCrossParameterConstraint()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathForConstructorReturnValueConstraint()github
ap)

A MethodNode respectively ConstructorNode object is added to the Path which represents the concerned method respectively constructor. The name of the node equals the concerned method name or the constructor's unqualified class name, the ElementKind of the node is ElementKind.METHOD or ElementKind.CONSTRUCTOR, respectively.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorReturnValue()github
aq)

If a parameter is traversed, a ParameterNode object is added to the Path which represents the traversed parameter. The name of the node equals the parameter name as determined by the current parameter name provider. The ElementKind of the node is ElementKind.PARAMETER.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorMapParameter()github
ar)

If a return value is traversed, a ReturnValueNode object is added to the Path which represents the traversed return value. The name of the node has the constant value <return value>. The ElementKind of the node is ElementKind.RETURN_VALUE.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorReturnValue()github
as)

If the parameter/return value is a List or an array, the following Node object added contains the index value in getIndex().

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayReturnValue()github
at)

If the parameter/return value is a Map, the following Node object added (representing a given map entry) contains the key value in getKey().

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapReturnValue()github
au)

For all Iterable or Map, the following Node object added is marked as inIterable (isInIterable()).

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorListParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorArrayParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorSetParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingConstructorMapParameter()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodListReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodArrayReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodSetReturnValue()github
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testPropertyPathTraversingMethodMapReturnValue()github
av)

For a container element constraint: if the corresponding value extractor (see 4) has specified a node name when calling one of the receiver methods, a ContainerElementNode object with that name is added to the Path. The ElementKind of the node is ElementKind.CONTAINER_ELEMENT. getContainerClass() returns the declared type of the container hosting the constraint. getTypeArgumentIndex() returns the index of the type argument hosting the constraint. If the constraint is given on a container and is subject to implicit application to the container's element(s) (see 5.5.1) and the applied value extractor is not tied to a type parameter, getTypeArgumentIndex() returns null. if the corresponding value extractor has passed no node name to the called receiver method, no node is appended. the property path is considered complete

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 5e318493ab92a5e24c9f3228cb798d4536c5a6ad
PropertyPathTest.testGetContainerClassGetTypeArgumentIndex()github
aw)

If additional path nodes are added in a constraint validator implementation using the node builder API (see 3.4), the following rules apply: if the default path ends with a BeanNode, this node is removed and the first added node (a PropertyNode) inherits its inIterable, key and index values. inIterable, key and index value must not be specified directly on this first node by the user. if the default path ends with a CrossParameterNode, this node is removed. then the additional nodes are appended to the (possibly amended) path generated by the Bean Validation engine as previously described

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddPropertyNode()github
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddBeanNode()github
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddingNodesInClassLevelConstraintKeepsInIterableKeyAndIndex()github
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddParameterNode()github
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddParameterNodeUsingCustomParameterNameProvider()github
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddParameterNodeForFieldLevelConstraintCausesException()github
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddInContainerPropertyNodes()github
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddContainerElementNodes()github
ax)

A PropertyNode is appended in case addPropertyNode(String) is invoked. The node name is equal to the name provided. The ElementKind of the node is ElementKind.PROPERTY.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddPropertyNode()github
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddingNodesInClassLevelConstraintKeepsInIterableKeyAndIndex()github
ay)

A BeanNode is appended in case addBeanNode() is invoked. The node name is null. The ElementKind of the node is ElementKind.BEAN.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddBeanNode()github
az)

A ParameterNode is appended in case addParameterNode(int) is invoked. The node name is equal to the parameter name at the provided index. The name is determined by the current parameter name provider. The ElementKind of the node is ElementKind.PARAMETER. The previous node (removed) must be a CrossParameterNode.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddParameterNode()github
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddParameterNodeUsingCustomParameterNameProvider()github
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddParameterNodeForFieldLevelConstraintCausesException()github
ba)

A ContainerElementNode is appended in case addContainerElementNode(String, Class, Integer) is invoked. The name, container type and type argument index of the node are equal to the values provided. The ElementKind of the node is ElementKind.CONTAINER_ELEMENT.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddContainerElementNodes()github
bb)

If inIterable() is invoked, the node returns true for isInIterable(), false otherwise.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddingNodesInClassLevelConstraintKeepsInIterableKeyAndIndex()github
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddInContainerPropertyNodes()github
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddContainerElementNodes()github
bc)

If inContainer(Class, Integer) is invoked, the node returns the passed container type and type argument index from getContainerClass() and getTypeArgumentIndex(), respectively.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddInContainerPropertyNodes()github
bd)

If atIndex(Integer) is invoked, the node returns the provided integer for getIndex(), null otherwise.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddingNodesInClassLevelConstraintKeepsInIterableKeyAndIndex()github
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddInContainerPropertyNodes()github
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddContainerElementNodes()github
be)

If atKey(Object) is invoked, the node returns the provided object for getKey(), null otherwise.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddingNodesInClassLevelConstraintKeepsInIterableKeyAndIndex()github
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddInContainerPropertyNodes()github
Test archive name: a2b7bf1ec1cfee387a15fedbfa27bdfeb3461
CustomPropertyPathTest.testAddContainerElementNodes()github
bf)

Bean Validation implementations should ensure that a ConstraintViolation implementation is Serializable provided that the root bean, the leaf bean, the invalid value and keys in the Path object are Serializable objects.

Section 6.3.1 - Default message interpolation [validationapi-message-defaultmessageinterpolation]

a)

Every conforming Bean Validation implementation includes a default message interpolator which has to comply with the algorithm defined here to interpolate message descriptors.

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testDefaultMessageInterpolatorIsNotNull()github
b)

Each constraint defines a message descriptor via its message property.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithoutMessageParameter()github
c)

Every constraint definition defines a default message descriptor for that constraint.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithoutMessageParameter()github
d)

Messages can be overridden at constraint declaration time by setting the message property on the constraint.

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testMessagesCanBeOverriddenAtConstraintLevel()github
e)

The message descriptor is a string literal and may contain one or more message parameters or expressions. Message parameters and expressions are string literals enclosed in {} or ${} respectively.

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationWithElExpression()github
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testSuccessfulInterpolationOfValidationMessagesValue()github
f)

\{ is considered as the literal { instead of being considered as the beginning of a message parameter

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testEscapedCharactersAreConsideredAsLiterals()github
g)

\} is considered as the literal } instead of being considered as the end of a message parameter

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testEscapedCharactersAreConsideredAsLiterals()github
h)

\\ is considered as the literal \ instead of being considered as the escaping character

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testEscapedCharactersAreConsideredAsLiterals()github
i)

\$ is considered as the literal $ instead of being considered as the beginning of a message expression

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testEscapedCharactersAreConsideredAsLiterals()github

Section 6.3.1.1 - Default message interpolation algorithm [validationapi-message-defaultmessageinterpolation-resolutionalgorithm]

a)

Message parameters are extracted from the message string and used as keys to search the ResourceBundle named ValidationMessages

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testUnSuccessfulInterpolation()github
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testUnknownTokenInterpolation()github
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testSuccessfulInterpolationOfValidationMessagesValue()github
b)

Step 1 is applied recursively until no replacement is performed

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testRecursiveMessageInterpolation()github
c)

Message parameters are extracted from the message string and used as keys to search the Bean Validation provider's built-in ResourceBundle using the defined locale (see 6.3.1.2). If a property is found, the message parameter is replaced with the property value in the message string.

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testParametersAreExtractedFromBeanValidationProviderBundle()github
d)

Contrary to step 1, step 2 is not processed recursively.

e)

If step 2 triggers a replacement, then step 1 is applied again.

f)

Message parameters are extracted from the message string. Those matching the name of an attribute of the constraint are replaced by the value of that attribute in the constraint declaration. Parameter interpolation has precedence over message expressions. For example for the message descriptor ${value}, trying to evaluate {value} as message parameter has precedence over evaluating ${value} as message expression.

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testConstraintAttributeValuesAreInterpolated()github
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testParameterInterpolationHasPrecedenceOverExpressionEvaluation()github
g)

Message expressions are extracted from the message string and evaluated using Expression Language. See also 6.3.1.3.

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testElExpressionsAreInterpolated()github

Section 6.3.1.2 - Locale for default message interpolation [validationapi-message-defaultmessageinterpolation-locale]

a)

If the locale is passed explicitly to the interpolator method via interpolate(String, Context, Locale), this provided instance is used.

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testMessageInterpolationWithLocale()github
b)

Otherwise, the default Locale as provided by Locale.getDefault() is used.

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testIfNoLocaleIsSpecifiedTheDefaultLocaleIsAssumed()github

Section 6.3.1.3 - Message expressions using Expression Language (EL) [validationapi-message-defaultmessageinterpolation-expressionlanguage]

a)

The default message interpolation allows the use of Expression Language (EL) as defined in JSR 341.

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationWithIncompleteElExpression()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationWithElExpression()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationWithSeveralElExpressions()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationWithUnknownElExpression()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testOnlyDollarSignIsSupportedForEnclosingElExpressions()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationUsingAnnotationAttributesInElExpression()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationUsingGroupsAndPayloadInElExpression()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationUsingValidatedValueInElExpression()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationUsingFormatterInElExpression()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationUsingFormatterWithSeveralObjectsInElExpression()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationWithFormatterUsesDefaultLocaleInElExpression()github
b)

Expressions to be evaluated by EL need to be enclosed in ${} within the message descriptor

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationWithElExpression()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationWithSeveralElExpressions()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testOnlyDollarSignIsSupportedForEnclosingElExpressions()github
c)

The attribute values of the constraint declaration mapped to their attribute name

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationUsingAnnotationAttributesInElExpression()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationUsingGroupsAndPayloadInElExpression()github
d)

The validated value mapped under the name validatedValue.

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationUsingValidatedValueInElExpression()github
e)

A bean mapped to the name formatter exposing the vararg method format(String format, Object... args). This method must behave like java.util.Formatter.format(String format, Object... args). The locale used for formatting is defined by 6.3.1.2. The formatter bean allows to format property values, for example in the case of the validated value being 98.12345678, ${formatter.format('%1$.2f', validatedValue)} would format it to 98.12 (two digits after the decimal point, where the use of '.' vs ',' would be locale specific).

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationUsingFormatterInElExpression()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationUsingFormatterWithSeveralObjectsInElExpression()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationWithFormatterUsesDefaultLocaleInElExpression()github
f)

If an exception occurs during message interpolation, e.g. due to invalid expressions or references to an unknown property, the message expression stays unchanged.

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationWithInvalidElExpression()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationWithElExpressionThrowingAnException()github
Test archive name: 211248cb38c14d29871bcbfb8a609ea26687af2c
ExpressionLanguageMessageInterpolationTest.testInterpolationWithUnknownElExpression()github

Section 6.3.2 - Custom message interpolation [validationapi-message-customresolution]

a)

messageTemplate is the value of the message attribute of the constraint declaration or provided to the ConstraintValidatorContext methods.

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testCorrectValuesArePassedToInterpolateForPropertyConstraint()github
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testCorrectValuesArePassedToInterpolateForClassLevelConstraint()github
b)

getConstraintDescriptor() returns the ConstraintDescriptor object representing the metadata of the failing constraint (see 7).

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testCorrectValuesArePassedToInterpolateForPropertyConstraint()github
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testCorrectValuesArePassedToInterpolateForClassLevelConstraint()github
c)

getValidatedValue() returns the value being validated.

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testCorrectValuesArePassedToInterpolateForPropertyConstraint()github
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testCorrectValuesArePassedToInterpolateForClassLevelConstraint()github
d)

A message interpolator implementation must be thread-safe.

e)

It is possible to override the MessageInterpolator implementation for a given Validator instance by invoking ValidatorFactory.usingContext().messageInterpolator(messageInterpolator).getValidator().

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap
Test archive name: 9fb5cc83c5bad12a3bf88fc3558990431bf19
CustomMessageInterpolatorTest.testCustomMessageInterpolatorViaConfiguration()github
Test archive name: 9fb5cc83c5bad12a3bf88fc3558990431bf19
CustomMessageInterpolatorTest.testCustomMessageInterpolatorViaValidatorContext()github
f)

The default implementation is accessible through Configuration.getDefaultMessageInterpolator().

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testDefaultMessageInterpolatorIsNotNull()github
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testSuccessfulInterpolationOfValidationMessagesValue()github
g)

If the interpolation process leads to an exception, the exception is wrapped into a ValidationException.

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testExceptionDuringMessageInterpolationIsWrappedIntoValidationException()github

Section 6.4 - Triggering method validation [validationapi-triggeringmethodvalidation]

a)

The validation of method / constructor constraints comprises the following steps: Intercept the method call to be validated Validate the parameter values provided by the method caller using ExecutableValidator.validateParameters() or ExecutableValidator.validateConstructorParameters(). If this validation yields a non-empty set of constraint violations, throw a ConstraintViolationException wrapping the violations. Otherwise proceed with the actual method invocation. Validate the result returned by the invoked method using ExecutableValidator.validateReturnValue() or ExecutableValidator.validateConstructorReturnValue(). If this validation yields a non-empty set of constraint violations, throw a ConstraintViolationException wrapping the violations. Otherwise return the invocation result to the method caller.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testMethodValidationInvokesParameterAndReturnValueValidationUsingDefaultGroup()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testConstructorValidationInvokesParameterAndReturnValueValidationUsingDefaultGroup()github
b)

The Default group is used for validation out of the box.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testMethodValidationInvokesParameterAndReturnValueValidationUsingDefaultGroup()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testConstructorValidationInvokesParameterAndReturnValueValidationUsingDefaultGroup()github

Section 6.5 - Bootstrapping [validationapi-bootstrapping]

a)

A bootstrap implementation must be able to bootstrap any Bean Validation provider implementation.

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap.customprovider
Test archive name: 7d3a28ea311a5691163682514b5eba6cd96f1d1
BootstrapCustomProviderDefinedInValidationXmlTest.testGetFactoryByProviderSpecifiedInValidationXml()github
Test archive name: 7ab2e390d7edfbe49e768e27146e4a18a7aa01f
BootstrapCustomProviderDefinedInServiceFileTest.testGetFactoryByProviderSpecifiedProgrammatically()github

Section 6.5.1 - Examples [validationapi-bootstrapping-examples]

a)

The ValidatorFactory object is thread-safe.

Section 6.5.2 - ValidatorFactory [validationapi-bootstrapping-validatorfactory]

a)

ValidatorFactory implementations must be thread-safe.

b)

getMessageInterpolator() returns the MessageInterpolator instance configured during the initialization of the ValidatorFactory.

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap
Test archive name: 9fb5cc83c5bad12a3bf88fc3558990431bf19
CustomMessageInterpolatorTest.testCustomMessageInterpolatorViaValidatorContext()github
c)

getTraversableResolver() returns the TraversableResolver instance configured during the initialization of the ValidatorFactory.

Coverage

org.hibernate.beanvalidation.tck.tests.traversableresolver
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testTraversableResolverFromValidatorFactory()github
d)

getConstraintValidatorFactory() returns the ConstraintValidatorFactory instance configured during the initialization of the ValidatorFactory.

Coverage

org.hibernate.beanvalidation.tck.tests.validatorfactory
Test archive name: 170c61972151f665dfca5a542df6b11de2f5754
CustomConstraintValidatorTest.testGetConstraintValidatorFactoryFromValidatorFactory()github
e)

getParameterNameProvider() returns the ParameterNameProvider instance configured during the initialization of the ValidatorFactory.

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation.parameternameprovider
Test archive name: adf5416d4e7a6cec3b6e9aa9eda9c8d7dc28a90
ParameterNameProviderTest.testGetParameterNameProviderFromValidatorFactory()github
f)

getClockProvider() returns the ClockProvider instance configured during the initialization of the ValidatorFactory.

Coverage

org.hibernate.beanvalidation.tck.tests.time
Test archive name: 61774ad4505d8a2bc4f9e44f96f7e9e89511ee7
ClockProviderTest.testCustomClockProviderFromValidatorFactory()github
Test archive name: 61774ad4505d8a2bc4f9e44f96f7e9e89511ee7
ClockProviderTest.testCustomClockProviderViaConfiguration()github
g)

The MessageInterpolator, the TraversableResolver, the ConstraintValidatorFactory, the ParameterNameProvider or the ClockProvider passed to the ValidatorContext are used instead of the ValidatorFactory's MessageInterpolator, TraversableResolver, ConstraintValidatorFactory, ParameterNameProvider or ClockProvider instances.

Coverage

org.hibernate.beanvalidation.tck.tests.time
Test archive name: 61774ad4505d8a2bc4f9e44f96f7e9e89511ee7
ClockProviderTest.canConfigureClockProviderForValidator()github
org.hibernate.beanvalidation.tck.tests.methodvalidation.parameternameprovider
Test archive name: adf5416d4e7a6cec3b6e9aa9eda9c8d7dc28a90
ParameterNameProviderTest.testParameterNameProviderSetUsingContext()github
org.hibernate.beanvalidation.tck.tests.bootstrap
Test archive name: 9fb5cc83c5bad12a3bf88fc3558990431bf19
CustomMessageInterpolatorTest.testCustomMessageInterpolatorViaValidatorContext()github
h)

A ValueExtractorDeclarationException is raised if more than one extractor for the same type and type parameter is added via addValueExtractor().

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.declaration
Test archive name: 168b91f918c37aec263f4cb63986adb23374622
MultipleValueExtractorsDeclaredProgrammaticallyForSameTypeAndTypeArgumentTest.configuringValidatorWithMultipleExtractorsForSameTypeAndTypeUseCausesException()github

Section 6.5.3 - Configuration [validationapi-bootstrapping-configuration]

a)

Configuration does provide a MessageInterpolator implementation following the default Bean Validation MessageInterpolator rules as defined in 6.3.1. You can access it by calling getDefaultMessageInterpolator().

Coverage

org.hibernate.beanvalidation.tck.tests.messageinterpolation
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testDefaultMessageInterpolatorIsNotNull()github
Test archive name: d761ca348470b6f928b9ba8472d5429ed6149e70
MessageInterpolationTest.testSuccessfulInterpolationOfValidationMessagesValue()github
b)

Configuration does provide a TraversableResolver implementation following the default Bean Validation TraversableResolver rules as defined in 5.7.3. You can access it by calling getDefaultTraversableResolver().

Coverage

org.hibernate.beanvalidation.tck.tests.traversableresolver
Test archive name: e46c6725bdd8114c30c93c7f8cff3b3d21f97d
TraversableResolverTest.testDefaultTraversableResolverIsNotNull()github
c)

Configuration does provide a ConstraintValidatorFactory implementation following the default Bean Validation ConstraintValidatorFactory rules as defined in 3.5. You can access it by calling getDefaultConstraintValidatorFactory().

Coverage

org.hibernate.beanvalidation.tck.tests.validatorfactory
Test archive name: 7167046db8546d5b8e31cc8ecb92062f95165b6
DefaultConstraintValidatorFactoryTest.testDefaultConstructorInValidatorCalled()github
Test archive name: 7167046db8546d5b8e31cc8ecb92062f95165b6
DefaultConstraintValidatorFactoryTest.testRuntimeExceptionInValidatorCreationIsWrapped()github
d)

Configuration does provide a ParameterNameProvider implementation following the default Bean Validation ParameterNameProvider rules as defined in 5.6.2.2. You can access it by calling getDefaultParameterNameProvider().

Coverage

org.hibernate.beanvalidation.tck.tests.methodvalidation.parameternameprovider
Test archive name: daf3d2faadd1488513ecf9a929a77318c4d78796
DefaultParameterNameProviderTest.testGetDefaultParameterNameProviderFromConfiguration()github
e)

Configuration does provide a ClockProvider implementation following the default Bean Validation ClockProvider rules as defined in 3.4.1. You can access it by calling getDefaultClockProvider().

Coverage

org.hibernate.beanvalidation.tck.tests.time
Test archive name: 61774ad4505d8a2bc4f9e44f96f7e9e89511ee7
ClockProviderTest.testDefaultClockProviderProvidedByConfiguration()github
f)

Via getBootstrapConfiguration(), Configuration also exposes data stored in META-INF/validation.xml

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap
Test archive name: ba7c3bc980cca8f7b332bf38ad529049514a34
BootstrapConfigurationWithoutValidationXmlTest.testGetBootstrapConfigurationNoValidationXml()github
Test archive name: b9a723c327ee7f59d64be09b356ec0dc81c16bf6
BootstrapConfigurationWithEmptyValidatedExecutableTypesTest.testEmptyExecutableTypesCauseValidationException()github
Test archive name: e978b7cad03a9c734822d6286e27aa539914737
BootstrapConfigurationTest.testGetBootstrapConfiguration()github
Test archive name: 395d222e2f2f7119d0d8795d6e6bfd99b0b19d24
BootstrapConfigurationWithValidatedExecutableTypesContainingALLTest.testGetDefaultValidatedExecutableTypesReturnsSetWithAllOptionsIfALLIsContained()github
Test archive name: 8fdbb92fe68941b8d9f51da2b412f5d8fb666c3
BootstrapConfigurationWithValidatedExecutableTypesContainingALLAndNONETest.testGetDefaultValidatedExecutableTypesReturnsSetWithAllOptionsIfALLAndNONEAreContained()github
Test archive name: e8194461c7a4d90b3d893cf384b1611a1c71
BootstrapConfigurationWithValidatedExecutableTypesContainingSomeTest.testGetDefaultValidatedExecutableTypesReturnsSetWithConfiguredValues()github
Test archive name: e59779b9abe955b0a3889fb8ca72948395ed79
BootstrapConfigurationWithValidatedExecutableTypesContainingNONETest.testGetDefaultValidatedExecutableTypesReturnsEmptySetIfNONEIsContained()github
g)

Via addValueExtractor(), additional value extractor implementations can be added to the configuration. A value extractor for a given type and type parameter takes precedence over any extractor for the same type and type parameter detected through the service loader or given in the XML configuration.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.declaration
Test archive name: 7f49493b9e78b5cf68ca29243ab517a198916d6
ValueExtractorDefinedInConfigurationApiTest.canUseCustomExtractor()github
h)

A ValueExtractorDeclarationException is raised if more than one extractor for the same type and type parameter is added.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.declaration
Test archive name: 168b91f918c37aec263f4cb63986adb23374622
MultipleValueExtractorsDeclaredProgrammaticallyForSameTypeAndTypeArgumentTest.configuringMultipleExtractorsForSameTypeAndTypeUseCausesException()github
i)

Using addMapping(), additional constraint mapping XML descriptors can be added to the configuration

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap
Test archive name: 8aeecba06439fbe931a081d8eec0a3378c654e9
ConfigurationTest.testMappingsCanBeAddedViaConfiguration()github
j)

Streams not supporting the mark() and reset() methods will be wrapped with an InputStream implementation supporting these methods by the Bean Validation provider in order to allow the streams to be read several times.

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap
Test archive name: 8aeecba06439fbe931a081d8eec0a3378c654e9
ConfigurationTest.testNonResettableInputStreamCanBeAddedViaConfigurationAndFactoryCanBeCreatedSeveralTimes()github
k)

It is legal to invoke buildValidatorFactory() several times, e.g. in order to retrieve several ValidatorFactory instances with a slightly different configuration (see ).

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap
Test archive name: 8aeecba06439fbe931a081d8eec0a3378c654e9
ConfigurationTest.testSeveralFactoriesCanBeBuildFromOneConfiguration()github
l)

A Bean Validation provider must define a sub interface of Configuration uniquely identifying the provider.

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap
Test archive name: 8aeecba06439fbe931a081d8eec0a3378c654e9
ConfigurationTest.testProviderUnderTestDefinesSubInterfaceOfConfiguration()github
m)

Streams represented in the XML configuration and opened by the Configuration implementation must be closed by the Configuration implementation after the ValidatorFactory creation (or if an exception occurs).

n)

The requested provider implementation is resolved according to the following rules in the following order: Use the provider implementation requested if Configuration has been created from Validation.byProvider(Class). Use the provider implementation described in the XML configuration (under validation-config.default-provider see 6.5.6) if defined: the value of this element is the fully qualified class name of the ValidationProvider implementation uniquely identifying the provider. Use the first provider implementation returned by validationProviderResolver.getValidationProviders().

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap.customprovider
Test archive name: 7d3a28ea311a5691163682514b5eba6cd96f1d1
BootstrapCustomProviderDefinedInValidationXmlTest.testGetFactoryByProviderSpecifiedInValidationXml()github
Test archive name: 7ab2e390d7edfbe49e768e27146e4a18a7aa01f
BootstrapCustomProviderDefinedInServiceFileTest.testGetFactoryByProviderSpecifiedProgrammatically()github
Test archive name: 7ab2e390d7edfbe49e768e27146e4a18a7aa01f
BootstrapCustomProviderDefinedInServiceFileTest.testProviderResolverReturnsListOfAvailableProviders()github
o)

If no ValidationProviderResolver instance has been specified, the default ValidationProviderResolver is used.

Section 6.5.4.1 - ValidationProviderResolver [validationapi-bootstrapping-validationprovider-resolver]

a)

ValidationProviderResolver returns the list of Bean Validation providers available at runtime and more specifically a ValidationProvider instance for each provider available in the context.

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap.customprovider
Test archive name: 7ab2e390d7edfbe49e768e27146e4a18a7aa01f
BootstrapCustomProviderDefinedInServiceFileTest.testProviderResolverReturnsListOfAvailableProviders()github
b)

Implementations must be thread-safe.

c)

Bean Validation providers must supply a service provider configuration file by creating a text file javax.validation.spi.ValidationProvider and placing it in the META-INF/services directory of one of its jar files.

Section 6.5.4.2 - ValidationProvider [validationapi-bootstrapping-validationprovider-provider]

a)

A client can request a specific Bean Validation provider by using <T extends Configuration<T>, U extends ValidationProvider<T>> Validation.byProvider(Class<U>) or by defining the provider in the XML configuration file.

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap.customprovider
Test archive name: 7d3a28ea311a5691163682514b5eba6cd96f1d1
BootstrapCustomProviderDefinedInValidationXmlTest.testGetFactoryByProviderSpecifiedInValidationXml()github
Test archive name: 7ab2e390d7edfbe49e768e27146e4a18a7aa01f
BootstrapCustomProviderDefinedInServiceFileTest.testGetFactoryByProviderSpecifiedProgrammatically()github
b)

The provider discovery mechanism uses the following algorithm: Retrieve available providers using ValidationProviderResolver.getValidationProviders(). The first ValidationProvider matching the requested provider is returned. Providers are evaluated in the order they are returned by ValidationProviderResolver. A provider instance is considered matching if it is assignable to the requested provider class.

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap
Test archive name: 4d7e3b582adb7e3fcc77a3795f1184fa5d6749c
ValidationProviderTest.testFirstMatchingValidationProviderResolverIsReturned()github
c)

When the default Bean Validation provider is requested, the first ValidationProvider returned by the ValidationProviderResolver strategy is returned.

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap
Test archive name: 4d7e3b582adb7e3fcc77a3795f1184fa5d6749c
ValidationProviderTest.testByDefaultProviderUsesTheFirstProviderReturnedByValidationProviderResolver()github
d)

Every Bean Validation provider must provide a ValidationProvider implementation containing a public no-arg constructor

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap
Test archive name: 4d7e3b582adb7e3fcc77a3795f1184fa5d6749c
ValidationProviderTest.testValidationProviderContainsNoArgConstructor()github
e)

If a problem occurs while building the ValidatorFactory, a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap
Test archive name: 4d7e3b582adb7e3fcc77a3795f1184fa5d6749c
ValidationProviderTest.testValidationExceptionIsThrownInCaseValidatorFactoryCreationFails()github

Section 6.5.5 - Validation [validationapi-bootstrapping-validation]

a)

The first entry point, buildDefaultValidatorFactory(), is considered to be the default ValidatorFactory and is equivalent to the ValidatorFactory returned by Validation.byDefaultProvider().configure().buildValidatorFactory().

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: dad022b8efbbed55f8e59b3a39b05ed7efb853a
ValidationTest.testBuildDefaultValidatorFactory()github
b)

The second entry point lets the client provide a custom ValidationProviderResolver instance. This instance is passed to GenericBootstrap. GenericBootstrap builds a generic Configuration using the first ValidationProvider returned by ValidationProviderResolution and calling ValidationProvider.createGenericConfiguration(BootstrapState state).

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: dad022b8efbbed55f8e59b3a39b05ed7efb853a
ValidationTest.testCustomValidationProviderResolution()github
c)

The last entry point lets the client define the specific Bean Validation provider requested as well as a custom ValidationProviderResolver implementation if needed. The entry point method, Validation.byProvider(Class<U> providerType), takes the provider specific ValidationProvider implementation type and returns a ProviderSpecificBootstrap object that guarantees to return an instance of the specific Configuration sub interface.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: dad022b8efbbed55f8e59b3a39b05ed7efb853a
ValidationTest.testSpecificValidationProvider()github
d)

The Validation implementation must not contain any non private attribute or method aside from the three public static bootstrap methods

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: dad022b8efbbed55f8e59b3a39b05ed7efb853a
ValidationTest.testVerifyMethodsOfValidationObjects()github
e)

The bootstrap implementation must ensure it can bootstrap third party providers.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: dad022b8efbbed55f8e59b3a39b05ed7efb853a
ValidationTest.testCustomValidationProviderResolution()github
Test archive name: dad022b8efbbed55f8e59b3a39b05ed7efb853a
ValidationTest.testSpecificValidationProvider()github
f)

When bootstrapping a Bean Validation provider, if the ValidationProviderResolver either fails or if the expected provider is not found, a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap.customprovider
Test archive name: ae1f657d183154ca86ef43c77982f26f255e3
BootstrapNonAvailableValidationProviderTest.testUnknownProviderConfiguredInValidationXml()github
Test archive name: ae1f657d183154ca86ef43c77982f26f255e3
BootstrapNonAvailableValidationProviderTest.testConfiguredValidationProviderIsNotLoadable()github
org.hibernate.beanvalidation.tck.tests.bootstrap
Test archive name: 4d7e3b582adb7e3fcc77a3795f1184fa5d6749c
ValidationProviderTest.testValidationExceptionIsThrownInCaseValidatorFactoryCreationFails()github

Section 6.5.6 - XML configuration: META-INF/validation.xml [validationapi-bootstrapping-xmlconfiguration]

a)

Unless explicitly ignored by calling Configuration.ignoreXMLConfiguration(), a Configuration takes into account the configuration available in META-INF/validation.xml.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testClassConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testIgnoreValidationXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testPropertyConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testFieldConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testAnnotationDefinedConstraintApplies()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testCascadingConfiguredInXml()github
b)

This configuration file is optional

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: f85c67a11719ceb1b51ab4845424e15e6965fbea
OptionalValidationXmlTest.testIgnoreValidationXml()github
c)

If more than one META-INF/validation.xml file is found in the classpath, a ValidationException is raised.

d)

Unless stated otherwise, XML based configuration settings are overridden by values explicitly set via the Configuration API.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: fca8712e8341b762bd94f2b08b4d786186977117
ClockProviderSpecifiedInValidationXmlTest.testClockProviderSpecifiedInValidationXmlCanBeOverridden()github
Test archive name: e6a2fc10f1c6b1fec841877de8eff5381a852f2a
TraversableResolverSpecifiedInValidationXmlTest.testTraversableResolverSpecifiedInValidationXmlCanBeOverridden()github
Test archive name: 36b410f14ae59377aae96619ce39ef23136fe0b9
MessageInterpolatorSpecifiedInValidationXmlTest.testMessageInterpolatorSpecifiedInValidationXmlCanBeOverridden()github
e)

default-provider: represents the class name of the provider specific ValidationProvider implementation class. If defined, the specific provider is used

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: c117229a20576d83c7c55db5e9ab02a5c4f81f
DefaultProviderSpecifiedInValidationXmlTest.testProviderSpecifiedInValidationXml()github
f)

message-interpolator: represents the fully qualified class name of the MessageInterpolator implementation. When defined in XML, the implementation must have a public no-arg constructor.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 36b410f14ae59377aae96619ce39ef23136fe0b9
MessageInterpolatorSpecifiedInValidationXmlTest.testMessageInterpolatorSpecifiedInValidationXml()github
Test archive name: 36b410f14ae59377aae96619ce39ef23136fe0b9
MessageInterpolatorSpecifiedInValidationXmlTest.testMessageInterpolatorSpecifiedInValidationXmlCanBeOverridden()github
Test archive name: 4c7ca76c6c51aa34aef95781c047fc8a37d623
MessageInterpolatorSpecifiedInValidationXmlNoDefaultConstructorTest.testMessageInterpolatorSpecifiedInValidationXmlHasNoDefaultConstructor()github
g)

traversable-resolver: represents the fully qualified class name of the TraversableResolver implementation. When defined in XML, the implementation must have a public no-arg constructor.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: e6a2fc10f1c6b1fec841877de8eff5381a852f2a
TraversableResolverSpecifiedInValidationXmlTest.testTraversableResolverSpecifiedInValidationXml()github
Test archive name: d62d86bc729728415468ba94497c0ebbec4cece
TraversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.testTraversableResolverSpecifiedInValidationXmlHasNoDefaultConstructor()github
Test archive name: 8e1aa23e8b6ce8ba89f1b7186639aeafd3421a
ConstraintValidatorFactorySpecifiedInValidationXmlTest.testConstraintValidatorFactorySpecifiedInValidationXmlCanBeOverridden()github
Test archive name: e6a2fc10f1c6b1fec841877de8eff5381a852f2a
TraversableResolverSpecifiedInValidationXmlTest.testTraversableResolverSpecifiedInValidationXmlCanBeOverridden()github
h)

constraint-validator-factory: represents the fully qualified class name of the ConstraintValidatorFactory implementation. When defined in XML, the implementation must have a public no-arg constructor.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 8e1aa23e8b6ce8ba89f1b7186639aeafd3421a
ConstraintValidatorFactorySpecifiedInValidationXmlTest.testConstraintValidatorFactorySpecifiedInValidationXml()github
Test archive name: 8e1aa23e8b6ce8ba89f1b7186639aeafd3421a
ConstraintValidatorFactorySpecifiedInValidationXmlTest.testConstraintValidatorFactorySpecifiedInValidationXmlCanBeOverridden()github
i)

parameter-name-provider: represents the fully qualified class name of the ParameterNameProvider implementation. When defined in XML, the implementation must have a public no-arg constructor.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 9655bf668e6f37338cd4d8fc7ffcf73ed0948e
ParameterNameProviderSpecifiedInValidationXmlTest.testParameterNameProviderSpecifiedInValidationXml()github
j)

clock-provider: represents the fully qualified class name of the ClockProvider implementation. When defined in XML, the implementation must have a public no-arg constructor.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: fca8712e8341b762bd94f2b08b4d786186977117
ClockProviderSpecifiedInValidationXmlTest.testClockProviderSpecifiedInValidationXml()github
Test archive name: fca8712e8341b762bd94f2b08b4d786186977117
ClockProviderSpecifiedInValidationXmlTest.testClockProviderSpecifiedInValidationXmlCanBeOverridden()github
Test archive name: 5172742170af9ec6878d776f77f37ed7b6df8731
ClockProviderSpecifiedInValidationXmlNoDefaultConstructorTest.testClockProviderSpecifiedInValidationXmlHasNoDefaultConstructor()github
k)

value-extractor: represents the fully qualified class name of a ValueExtractor implementation.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.declaration
Test archive name: 4c7dd15ec869aeb1acddcaee551b74510e2e48d
ValueExtractorDeclaredInValidationXmlTest.canUseValueExtractorGivenInValidationXml()github
l)

value-extractor can be given several times for declaring multiple extractors.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.declaration
Test archive name: 4c7dd15ec869aeb1acddcaee551b74510e2e48d
ValueExtractorDeclaredInValidationXmlTest.canUseValueExtractorGivenInValidationXml()github
m)

When defined in XML, the implementation must have a public no-arg constructor.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.declaration
Test archive name: d5c07b9f3fb54622d551bf358fedd3bef5bbe37
ValueExtractorWithNoPublicNoArgConstructorInValidationXmlTest.valueExtractorWithNoPublicNoArgConstructorInValidationXmlThrowsException()github
n)

An extractor for a given type and type parameter configured via XML takes precedence over any extractor for the same type and type parameter detected through the service loader or provided by the Bean Validation implementation itself.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.declaration
Test archive name: 6f457eaa35f4b85d602253321f2a66816c9ff618
ValueExtractorsPrecedenceTest.valueExtractorPrecedenceIsAppliedCorrectly()github
Test archive name: 6f457eaa35f4b85d602253321f2a66816c9ff618
ValueExtractorsPrecedenceTest.valueExtractorDefinedInXmlHasPrecedenceOverBuiltInValueExtractors()github
o)

If more than one value extractor for the same type and type parameter is configured via XML, a ValueExtractorDeclarationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.declaration
Test archive name: 2767ffa78e6a271fe8b679fde1a3fb421a85fafe
MultipleValueExtractorsInValidationXmlForSameTypeAndTypeArgumentTest.configuringMultipleExtractorsForSameTypeAndTypeUseInValidationXmlCausesException()github
p)

executable-validation: allows to disable executable validation entirely via its attribute enabled="false" and optionally contains default-validated-executable-types. enabled defaults to true.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.global
Test archive name: 54d0d635789723fddd9df84b187a3614c43a046
ExecutableValidationBasedOnGlobalConfigurationTest.testValidationOfConstrainedMethodOnTypeAnnotatedWithValidateOnExecutionContainingExecutableType()github
org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.globallydisabled
Test archive name: 1144cb23bef6951a01f7bbaa058469b889fa476
ExecutableValidationGloballyDisabledTest.testExecutableValidationGloballyTurnedOff()github
q)

default-validated-executable-types: declared under executable-validation, contains the list of executable-type that are considered by default by the integration technology validating executables upon execution.

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap
Test archive name: 395d222e2f2f7119d0d8795d6e6bfd99b0b19d24
BootstrapConfigurationWithValidatedExecutableTypesContainingALLTest.testGetDefaultValidatedExecutableTypesReturnsSetWithAllOptionsIfALLIsContained()github
Test archive name: 8fdbb92fe68941b8d9f51da2b412f5d8fb666c3
BootstrapConfigurationWithValidatedExecutableTypesContainingALLAndNONETest.testGetDefaultValidatedExecutableTypesReturnsSetWithAllOptionsIfALLAndNONEAreContained()github
Test archive name: e8194461c7a4d90b3d893cf384b1611a1c71
BootstrapConfigurationWithValidatedExecutableTypesContainingSomeTest.testGetDefaultValidatedExecutableTypesReturnsSetWithConfiguredValues()github
Test archive name: e59779b9abe955b0a3889fb8ca72948395ed79
BootstrapConfigurationWithValidatedExecutableTypesContainingNONETest.testGetDefaultValidatedExecutableTypesReturnsEmptySetIfNONEIsContained()github
r)

constraint-mapping: represents the resource path of an XML mapping file.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testClassConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testIgnoreValidationXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testPropertyConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testFieldConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testAnnotationDefinedConstraintApplies()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testCascadingConfiguredInXml()github
s)

More than one constraint-mapping element can be present.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testClassConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testIgnoreValidationXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testPropertyConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testFieldConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testAnnotationDefinedConstraintApplies()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testCascadingConfiguredInXml()github
t)

Mappings provided via Configuration.addMapping(InputStream) are added to the list of mappings described via constraint-mapping.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testMappingFilesAddedViaConfigurationGetAddedToXmlConfiguredMappings()github
u)

The namespace javax.validation is reserved for use by this specification.

v)

Properties defined via Configuration.addProperty(String, String) are added to the properties defined via property.

w)

If a property with the same name are defined in both XML and via the programmatic API, the value provided via programmatic API has priority.

x)

All these top level elements are optional.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: c117229a20576d83c7c55db5e9ab02a5c4f81f
DefaultProviderSpecifiedInValidationXmlTest.testProviderSpecifiedInValidationXml()github
Test archive name: d62d86bc729728415468ba94497c0ebbec4cece
TraversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.testTraversableResolverSpecifiedInValidationXmlHasNoDefaultConstructor()github
Test archive name: 4c7ca76c6c51aa34aef95781c047fc8a37d623
MessageInterpolatorSpecifiedInValidationXmlNoDefaultConstructorTest.testMessageInterpolatorSpecifiedInValidationXmlHasNoDefaultConstructor()github
y)

If a public no-arg constructor is missing on any of the classes referenced by the relevant XML elements, a ValidationException is raised during the Configuration.buildValidatorFactory() call.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.declaration
Test archive name: d5c07b9f3fb54622d551bf358fedd3bef5bbe37
ValueExtractorWithNoPublicNoArgConstructorInValidationXmlTest.valueExtractorWithNoPublicNoArgConstructorInValidationXmlThrowsException()github
org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 5172742170af9ec6878d776f77f37ed7b6df8731
ClockProviderSpecifiedInValidationXmlNoDefaultConstructorTest.testClockProviderSpecifiedInValidationXmlHasNoDefaultConstructor()github

Section 6.5.7 - Bootstrapping considerations [validationapi-bootstrapping-usageandcontainerexpectation]

a)

ValidatorFactory is a thread-safe object that should be built once per deployment unit.

b)

Validator is a thread-safe and lightweight object which can be cached by the ValidatorFactory instance.

Section 7.1 - Validator [constraintmetadata-validator]

a)

getConstraintsForClass() returns a BeanDescriptor object describing the bean level constraints (see 5.1.1) and providing access to the property level constraints metadata.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testConstraintDescriptorWithoutExplicitGroup()github
org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testIsBeanConstrainedDueToValidAnnotation()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testIsBeanConstrainedDueToConstraintOnEntity()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testIsBeanConstrainedDueToConstraintProperty()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testIsBeanConstrainedDueToConstraintOnInterface()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testUnconstrainedClass()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForConstrainedProperty()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForNonExistingProperty()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstrainedProperties()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstrainedPropertiesForUnconstrainedEntity()github
b)

An IllegalArgumentException is raised if the clazz parameter is null.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testNullParameterToGetConstraintsForClass()github
c)

If a constraint definition or declaration hosted by the requested class (or any of its superclasses and interfaces according to the constraint propagation rules) is invalid, a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testUnexpectedTypeException()github

Section 7.2 - ElementDescriptor [constraintmetadata-elementdescriptor]

a)

getElementClass() returns the object type when invoked on BeanDescriptor, the type of a property or parameter when invoked on PropertyDescriptor or ParameterDescriptor respectively, Object[].class when invoked on CrossParameterDescriptor, the return type when invoked on ConstructorDescriptor, MethodDescriptor or ReturnValueDescriptor, the container element type when invoked on ContainerElementTypeDescriptor (e.g. when invoked on a descriptor representing the container element type of List<String>, String.class will be returned).

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 7c4d55f4bf6a526a069d89aa07ef3670c9c47c
ElementDescriptorTest.testGetElementClass()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetElementClassForMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetElementClassForVoidMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetElementClassForConstructor()github
Test archive name: 3fce52bb3b87396931df110cd3cb98c6874687d
PropertyDescriptorTest.testGetElementClass()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetElementClassForMethod()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetElementClassForConstructor()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetElementClassReturnsBeanClass()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetElementClassForMethod()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetElementClassForVoidMethod()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetElementClassForConstructor()github
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForRoles()github
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForDivision()github
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForColleagues()github
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForAddresses()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testGetElementClass()github
Test archive name: 3fce52bb3b87396931df110cd3cb98c6874687d
PropertyDescriptorTest.testGetContainerElementMetaData()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetContainerElementMetaDataForMethodParameter()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetContainerElementMetaDataForConstructorParameter()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetContainerElementMetaDataForReturnValue()github
b)

getConstraintDescriptors() returns all the ConstraintDescriptors (see 7.12) hosted on the given element in the class hierarchy, each ConstraintDescriptor describing one of the constraints declared on the given element.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 7c4d55f4bf6a526a069d89aa07ef3670c9c47c
ElementDescriptorTest.testGetConstraintDescriptors()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testGetConstraintsForMethod()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testGetConstraintsForMethodWithoutCrossParameterConstraints()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testGetConstraintsForConstructor()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testGetConstraintsForConstructorWithoutCrossParameterConstraints()github
c)

hasConstraints() returns true if the given element in the class hierarchy holds at least one constraint declaration.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 7c4d55f4bf6a526a069d89aa07ef3670c9c47c
ElementDescriptorTest.testHasConstraints()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testHasConstraintsForMethod()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testHasConstraintsForUnconstrainedMethod()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testHasConstraintsForConstructor()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testHasConstraintsForConstructorWithoutCrossParameterConstraints()github
d)

If you need to query the metadata API in a more fine grained way for example by restricting the constraints to the ones described on fields or on getters or by restricting to a given set of groups, you can use the ConstraintFinder fluent API by calling findConstraints().

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 7c4d55f4bf6a526a069d89aa07ef3670c9c47c
ElementDescriptorTest.testUnorderedAndMatchingGroups()github
Test archive name: 7c4d55f4bf6a526a069d89aa07ef3670c9c47c
ElementDescriptorTest.testUnorderedAndMatchingGroupsWithInheritance()github
Test archive name: 7c4d55f4bf6a526a069d89aa07ef3670c9c47c
ElementDescriptorTest.testUnorderedAndMatchingGroupsWithDefaultGroupOverriding()github
Test archive name: 7c4d55f4bf6a526a069d89aa07ef3670c9c47c
ElementDescriptorTest.testDeclaredOn()github
Test archive name: 7c4d55f4bf6a526a069d89aa07ef3670c9c47c
ElementDescriptorTest.testLookingAt()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testFindConstraintsForMethod()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testFindConstraintsForMethodWithoutCrossParameterConstraints()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testFindConstraintsForConstructor()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testFindConstraintsForConstructorWithoutCrossParameterConstraints()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testFindConstraintsForMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testFindConstraintsForMethodLookingAt()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testFindConstraintsForMethodDefinedOnSuperTypeLookingAt()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testFindConstraintsForConstructor()github
e)

unorderedAndMatchingGroups() restricts the results to the ConstraintDescriptors (see 7.12) matching the given groups. Order is not respected but group inheritance and inheritance via sequence (including the Default group overriding at the class level) are honored.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 7c4d55f4bf6a526a069d89aa07ef3670c9c47c
ElementDescriptorTest.testUnorderedAndMatchingGroups()github
Test archive name: 7c4d55f4bf6a526a069d89aa07ef3670c9c47c
ElementDescriptorTest.testUnorderedAndMatchingGroupsWithInheritance()github
Test archive name: 7c4d55f4bf6a526a069d89aa07ef3670c9c47c
ElementDescriptorTest.testUnorderedAndMatchingGroupsWithDefaultGroupOverriding()github
f)

declaredOn() lets you restrict the list of element types constraints are hosted on.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 7c4d55f4bf6a526a069d89aa07ef3670c9c47c
ElementDescriptorTest.testDeclaredOn()github
g)

lookingAt() lets you restrict which constraints are considered. Either constraints belonging to the element but hosted on the class represented by the given descriptor (Scope.LOCAL_ELEMENT), or constraints belonging to the element but hosted anywhere in the class hierarchy (Scope.HIERARCHY).

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 7c4d55f4bf6a526a069d89aa07ef3670c9c47c
ElementDescriptorTest.testLookingAt()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testFindConstraintsForMethodLookingAt()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testFindConstraintsForMethodDefinedOnSuperTypeLookingAt()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testFindConstraintsForMethodLookingAt()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testFindConstraintsForMethodDefinedOnSuperTypeLookingAt()github

Section 7.3 - BeanDescriptor [constraintmetadata-beandescriptor]

a)

isBeanConstrained() returns true if the given class (and superclasses and interfaces) has at least one class-level or property-level constraint or validation cascade.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testIsBeanConstrainedDueToValidAnnotation()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testIsBeanConstrainedDueToConstraintOnEntity()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testIsBeanConstrainedDueToConstraintProperty()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testIsBeanConstrainedDueToConstraintOnInterface()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testUnconstrainedClass()github
b)

getConstraintsForProperty() returns a PropertyDescriptor object describing the property level constraints (See 5.1.2). The property is uniquely identified by its name as per the JavaBeans convention: field level and getter level constraints of the given name are all returned.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForConstrainedProperty()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForUnConstrainedProperty()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForNonExistingProperty()github
c)

An IllegalArgumentException is raised if the propertyName parameter is null.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForNullProperty()github
d)

getConstrainedProperties() returns the PropertyDescriptors of the bean properties having at least one constraint or being cascaded (@Valid annotation).

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstrainedProperties()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstrainedPropertiesForUnconstrainedEntity()github
e)

getConstraintsForMethod() returns a MethodDescriptor object describing the method constraints of the given method. The method is uniquely identified by its name and the types of its parameters.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForParameterConstrainedMethod()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForCrossParameterConstrainedMethod()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForCascadedParameterMethod()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForReturnValueConstrainedMethod()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForCascadedReturnValueMethod()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForUnconstrainedMethod()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForNonExistingMethod()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForNullMethod()github
f)

getConstrainedMethods() returns the MethodDescriptors of the methods matching the MethodTypes provided as parameter and having at least one constraint or cascaded parameter or return value.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstrainedMethodsTypeNON_GETTER()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstrainedMethodsTypeGETTER()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstrainedMethodsTypesGETTERAndNON_GETTER()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstrainedMethodsForUnconstrainedEntity()github
g)

getConstraintsForConstructor() returns a ConstructorDescriptor object describing the method constraints of the given constructor. The constructor is uniquely identified by its name and the types of its parameters.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForParameterConstrainedConstructor()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForCrossParameterConstrainedConstructor()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForCascadedParameterConstructor()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForReturnValueConstrainedConstructor()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForCascadedReturnValueConstructor()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForUnconstrainedConstructor()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForNonExistingConstructorConstructor()github
h)

getConstrainedConstructors() returns the ConstructorDescriptors of the constructors having at least one constraint or cascaded parameter or return value.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstrainedConstructors()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstrainedConstructorsForUnconstrainedEntity()github

Section 7.4 - CascadableDescriptor [constraintmetadata-cascadabledescriptor]

a)

The isCascaded() method returns true if the element is marked for cascaded validation.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 3fce52bb3b87396931df110cd3cb98c6874687d
PropertyDescriptorTest.testIsNotCascaded()github
Test archive name: 3fce52bb3b87396931df110cd3cb98c6874687d
PropertyDescriptorTest.testIsCascaded()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testIsCascadedForMethod()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testIsCascadedForConstructor()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testIsCascadedForMethodReturnValue()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testIsCascadedForConstructorReturnValue()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testIsCascadedForVoidMethod()github
Test archive name: 8dda36905e5caaf9f3d269858466879eb74b976e
BeanDescriptorTest.testGetConstraintsForUnConstrainedProperty()github
b)

The method getGroupConversions() returns a set with the group conversions declared for the cascadable element. An empty set will be returned if no group conversions are configured.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 3fce52bb3b87396931df110cd3cb98c6874687d
PropertyDescriptorTest.testGetGroupConversionsReturnsEmptySet()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetGroupConversionsReturnsEmptySetForConstructorParameter()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetGroupConversionsReturnsEmptySetForMethodParameter()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetGroupConversionsReturnsEmptySetForConstructorReturnValue()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetGroupConversionsReturnsEmptySetForMethodReturnValue()github
Test archive name: 3fce52bb3b87396931df110cd3cb98c6874687d
PropertyDescriptorTest.testGetGroupConversionsForField()github
Test archive name: 3fce52bb3b87396931df110cd3cb98c6874687d
PropertyDescriptorTest.testGetGroupConversionsForProperty()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetGroupConversionsForConstructorParameter()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetGroupConversionsForMethodParameter()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetGroupConversionsForConstructorReturnValue()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetGroupConversionsForVoidMethod()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetGroupConversionsForMethodReturnValue()github

Section 7.5 - GroupConversionDescriptor [constraintmetadata-groupconversiondescriptor]

a)

The getFrom() method returns the source of a group conversion rule.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 3fce52bb3b87396931df110cd3cb98c6874687d
PropertyDescriptorTest.testGetGroupConversionsForField()github
Test archive name: 3fce52bb3b87396931df110cd3cb98c6874687d
PropertyDescriptorTest.testGetGroupConversionsForProperty()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetGroupConversionsForConstructorParameter()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetGroupConversionsForMethodParameter()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetGroupConversionsForConstructorReturnValue()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetGroupConversionsForVoidMethod()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetGroupConversionsForMethodReturnValue()github
b)

The getTo() method returns the target of a group conversion rule.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 3fce52bb3b87396931df110cd3cb98c6874687d
PropertyDescriptorTest.testGetGroupConversionsForField()github
Test archive name: 3fce52bb3b87396931df110cd3cb98c6874687d
PropertyDescriptorTest.testGetGroupConversionsForProperty()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetGroupConversionsForConstructorParameter()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetGroupConversionsForMethodParameter()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetGroupConversionsForConstructorReturnValue()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetGroupConversionsForVoidMethod()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetGroupConversionsForMethodReturnValue()github

Section 7.6 - PropertyDescriptor [constraintmetadata-propertydescriptor]

a)

getPropertyName() returns the property name as described in 6.2.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 3fce52bb3b87396931df110cd3cb98c6874687d
PropertyDescriptorTest.testPropertyName()github

Section 7.7 - ExecutableDescriptor, MethodDescriptor and ConstructorDescriptor [constraintmetadata-executabledescriptor]

a)

getName() returns the name of the represented method (e.g. "placeOrder") respectively the non-qualified name of the declaring class of the represented constructor (e.g. "OrderService").

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetNameForMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetNameForConstructor()github
b)

getParameterDescriptors() returns a list of ParameterDescriptors representing the method's or constructor's parameters in order of their declaration, including synthetic parameters. An empty list will be returned in case the method or constructor has no parameters.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetParameterDescriptorsForMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetParameterDescriptorsForParameterlessMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetParameterDescriptorsForConstructor()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetParameterDescriptorsForConstructorOfInnerClass()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetParameterDescriptorsForParameterlessConstructor()github
c)

getCrossParameterDescriptor() returns a descriptor containing cross-parameter constraints of the method or constructor. If no cross-parameter constraint is present, the descriptor will return an empty set of constraint descriptors.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetCrossParameterDescriptorForMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetCrossParameterDescriptorForMethodWithoutCrossParameterConstraints()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetCrossParameterDescriptorForConstructor()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetCrossParameterDescriptorForConstructorWithoutCrossParameterConstraints()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testGetConstraintsForMethod()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testGetConstraintsForMethodWithoutCrossParameterConstraints()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testGetConstraintsForConstructor()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testGetConstraintsForConstructorWithoutCrossParameterConstraints()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testFindConstraintsForMethod()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testFindConstraintsForMethodLookingAt()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testFindConstraintsForMethodDefinedOnSuperTypeLookingAt()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testFindConstraintsForMethodWithoutCrossParameterConstraints()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testFindConstraintsForConstructor()github
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testFindConstraintsForConstructorWithoutCrossParameterConstraints()github
d)

getReturnValueDescriptor() returns a descriptor for the method's or constructor's return value. A descriptor representing the special class void, without any constraint descriptors, will be returned for executables which have no return value.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetReturnValueDescriptorForMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetUnconstrainedReturnValueDescriptorForMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testReturnValueDescriptorForVoidMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetReturnValueDescriptorForConstructor()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetUnconstrainedReturnValueDescriptorForConstructor()github
e)

hasConstrainedParameters() returns true if any of the parameters is constrained or cascaded or if the represented executable has at least one cross-parameter constraint. Returns false if there is no parameter.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testAreParametersConstrainedForConstrainedMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testAreParametersConstrainedForCascadedMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testAreParametersConstrainedForCrossParameterConstrainedMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testAreParametersConstrainedForNotConstrainedMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testAreParametersConstrainedForParameterlessMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testAreParametersConstrainedForConstrainedConstructor()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testAreParametersConstrainedForCascadedConstructor()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testAreParametersConstrainedForCrossParameterConstrainedConstructor()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testAreParametersConstrainedForNotConstrainedConstructor()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testAreParametersConstrainedForParameterlessConstructor()github
f)

hasConstrainedReturnValue() returns true if the return value is constrained or cascaded. Returns false if there is no return value.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testIsReturnValueConstrainedForConstrainedMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testIsReturnValueConstrainedForCascadedMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testIsReturnValueConstrainedForNotConstrainedMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testIsReturnValueConstrainedForVoidMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testIsReturnValueConstrainedForConstrainedConstructor()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testIsReturnValueConstrainedForCascadedConstructor()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testIsReturnValueConstrainedForNotConstrainedConstructor()github
g)

The methods hasConstraints(), getConstraintDescriptors() and findConstraints() defined on ElementDescriptor are redefined to clarify that executables do not host constraints directly and thus will always return false or an empty set of constraints, respectively. Constraint descriptors for individual parameters can be obtained from the corresponding ParameterDescriptor object, constraint descriptors for cross-parameter constraints can be obtained from the corresponding CrossParameterDescriptor object and constraint descriptors for the return value can be obtained from ReturnValueDescriptor.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testHasConstraintsForMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testHasConstraintsForConstructor()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetConstraintsForMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testGetConstraintsForConstructor()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testFindConstraintsForMethod()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testFindConstraintsForMethodLookingAt()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testFindConstraintsForMethodDefinedOnSuperTypeLookingAt()github
Test archive name: b628e4ea44902b94dbf6c81c6c894bbdcc34918
ExecutableDescriptorTest.testFindConstraintsForConstructor()github
h)

None of the metadata API methods honor the XML configuration around executable validation nor the presence of @ValidateOnExecution. In other words, all constrained methods and constructors will be returned by the metadata API regardless of these settings.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 820d8291d9ce164f795751bf9827ebe7ad53192
ExecutableDescriptorIgnoresValidatedExecutableAnnotationSettingsTest.testMethodDescriptorCanBeRetrievedAlsoIfValidateExecutableIsSetToNONEOnTypeLevel()github
Test archive name: 820d8291d9ce164f795751bf9827ebe7ad53192
ExecutableDescriptorIgnoresValidatedExecutableAnnotationSettingsTest.testConstructorDescriptorCanBeRetrievedAlsoIfValidateExecutableIsSetToNONEOnTypeLevel()github
Test archive name: 820d8291d9ce164f795751bf9827ebe7ad53192
ExecutableDescriptorIgnoresValidatedExecutableAnnotationSettingsTest.testMethodDescriptorCanBeRetrievedAlsoIfValidateExecutableIsSetToNONEOnMethodLevel()github
Test archive name: 820d8291d9ce164f795751bf9827ebe7ad53192
ExecutableDescriptorIgnoresValidatedExecutableAnnotationSettingsTest.testConstructorDescriptorCanBeRetrievedAlsoIfValidateExecutableIsSetToNONEOnConstructorLevel()github
Test archive name: 178496c5929ac495ad7cd57cae9974b6f6c614
ExecutableDescriptorIgnoresValidatedExecutableXmlSettingsTest.testMethodDescriptorCanBeRetrievedAlsoIfValidateExecutableIsSetToNONEInXml()github
Test archive name: 178496c5929ac495ad7cd57cae9974b6f6c614
ExecutableDescriptorIgnoresValidatedExecutableXmlSettingsTest.testConstructorDescriptorCanBeRetrievedAlsoIfValidateExecutableIsSetToNONEInXml()github

Section 7.8 - ParameterDescriptor [constraintmetadata-parameterdescriptor]

a)

getIndex() returns the index of the represented parameter within the parameter array of the method or constructor holding it.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetIndexForMethod()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetIndexForConstructor()github
b)

getName() returns the name of the represented parameter.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetNameForMethod()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetNameForConstructor()github

Section 7.9 - CrossParameterDescriptor [constraintmetadata-crossparameterdescriptor]

a)

getElementClass() returns Object[].

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testGetElementClass()github

Section 7.11 - ContainerDescriptor and ContainerElementTypeDescriptor [constraintmetadata-containerdescriptor]

a)

If a given element is of a container type, getConstrainedContainerElementTypes() returns a set with descriptors representing those container element types that either host at least one constraint or are marked with @Valid.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForRoles()github
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForDivision()github
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForColleagues()github
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForAddresses()github
Test archive name: 3fce52bb3b87396931df110cd3cb98c6874687d
PropertyDescriptorTest.testGetContainerElementMetaData()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetContainerElementMetaDataForMethodParameter()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetContainerElementMetaDataForConstructorParameter()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetContainerElementMetaDataForReturnValue()github
b)

The returned set will be empty if the given element is not of a container type or is of a container type but has no element types that are constrained or marked with @Valid.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataIfNotAContainerElement()github
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForContainerElementWithoutConstraintAndValid()github
c)

The ContainerElementTypeDescriptor interface describes the potential container element constraints applied to one element type of a container.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForRoles()github
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForDivision()github
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForColleagues()github
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForAddresses()github
Test archive name: 3fce52bb3b87396931df110cd3cb98c6874687d
PropertyDescriptorTest.testGetContainerElementMetaData()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetContainerElementMetaDataForMethodParameter()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetContainerElementMetaDataForConstructorParameter()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetContainerElementMetaDataForReturnValue()github
d)

getTypeArgumentIndex() returns the index of the type argument corresponding to this descriptor instance.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForRoles()github
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForDivision()github
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForColleagues()github
Test archive name: 8648cc92d1d159e952ef84ace9bb04d1d1f75b4
ContainerElementTypeDescriptorTest.testGetContainerElementMetaDataForAddresses()github
Test archive name: 3fce52bb3b87396931df110cd3cb98c6874687d
PropertyDescriptorTest.testGetContainerElementMetaData()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetContainerElementMetaDataForMethodParameter()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetContainerElementMetaDataForConstructorParameter()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetContainerElementMetaDataForReturnValue()github
e)

getContainerClass() returns the type of the container declaring the container element type represented by this descriptor instance.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 3fce52bb3b87396931df110cd3cb98c6874687d
PropertyDescriptorTest.testGetContainerElementMetaData()github
Test archive name: e47f7368fc0c1b02c7d81f8ab659d66ea497c
ParameterDescriptorTest.testGetContainerElementMetaDataForConstructorParameter()github
Test archive name: a485c96738eaef9da8531d81d933818def2ba4
ReturnValueDescriptorTest.testGetContainerElementMetaDataForReturnValue()github

Section 7.12 - ConstraintDescriptor [constraintmetadata-constraintdescriptor]

a)

getAnnotation() returns the annotation instance (or an annotation instance representing the given constraint declaration).

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 1f95d2fc8a73cab8c3a6a2a6e6ecc3bc1874a0
CrossParameterDescriptorTest.testGetConstraintsForMethod()github
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testAnnotationAndMapParametersReflectParameterOverriding()github
org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constructorvalidation
Test archive name: cbe352b325aef7a3ecef657d9163564e8b2238c
ConstructorValidationTest.testConstraintOnConstructorReturnValueAndParameter()github
org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.propertylevel
Test archive name: e0586cf6a486bd4bb5c31c75b3319fb086d1df9
PropertyLevelOverridingTest.testIncludeAnnotations()github
org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.fieldlevel
Test archive name: 8223eca698b02d238634a27eddcaebec27ee3db7
FieldLevelOverridingTest.testIncludeAnnotations()github
org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: 5260217bd2adefd42f462d6b2a49d5220104e1f
MethodValidationTest.testConstraintOnMethodReturnValueAndParameter()github
org.hibernate.beanvalidation.tck.tests.validation
Test archive name: 2974e9457327e977643efd6609a9210a03288
ValidateTest.testConstraintViolation()github
b)

If ConstraintDescriptor represents a composing annotation (see 3.3), the returned annotation must reflect parameter overriding.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testAnnotationAndMapParametersReflectParameterOverriding()github
c)

getAttributes() returns a map containing the annotation attribute names as a key, and the annotation attribute values as a value

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testGetAttributesFromConstraintDescriptor()github
d)

If ConstraintDescriptor() represents a composing annotation (see 3.3), the returned Map must reflect attribute overriding.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testAnnotationAndMapParametersReflectParameterOverriding()github
e)

getMessageTemplate() returns the non-interpolated error message.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testGetMessageTemplate()github
f)

getGroups() returns the groups the constraint is supposed to be applied upon.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testGetGroups()github
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testGetGroupsOnInterface()github
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testGetGroupsWithImplicitGroup()github
g)

If no group is set on the constraint declaration, the Default group is returned.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testDefaultGroupIsReturnedIfNoGroupSpecifiedInDeclaration()github
h)

The groups of a composing constraint are the groups of the composed constraint.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testComposingConstraints()github
i)

getPayload() returns the payloads associated to the constraint or an empty set if none.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testPayload()github
j)

The payload from the main constraint annotation is inherited by the composing annotations.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testComposingConstraintsPayload()github
k)

Any payload definition on a composing annotation is ignored.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testComposingConstraintsPayload()github
l)

getValidationAppliesTo() returns the ConstraintTarget returned by validationAppliesTo if the constraint hosts the attribute or null otherwise. The constraint target from the main constraint annotation is inherited by the composing annotation. Any constraint target definition on a composing annotation is ignored.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testGetValidationAppliesTo()github
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testGetValidationAppliesToFromComposingConstraint()github
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testGetValidationAppliesToReturnsNull()github
m)

isReportAsSingleViolation() returns true if the constraint is annotated with @ReportAsSingleViolation.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testReportAsSingleViolation()github
n)

getComposingConstraints() return a set of composing ConstraintDescriptors where each descriptor describes a composing constraint.

Coverage

org.hibernate.beanvalidation.tck.tests.metadata
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testEmptyComposingConstraints()github
Test archive name: 50ff5592f1b11479139ccbed55aa5d3ead92b3c
ConstraintDescriptorTest.testComposingConstraints()github
o)

getConstraintValidatorClasses() returns the ConstraintValidator classes associated with the constraint.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdefinition
Test archive name: 20271c993b85dff3f3c4464858ba3568193e2ba
XmlConfiguredConstraintValidatorTest.testExcludeExistingValidators()github
Test archive name: 20271c993b85dff3f3c4464858ba3568193e2ba
XmlConfiguredConstraintValidatorTest.testIncludeExistingValidators()github
p)

getValueUnwrapping() returns a ValidateUnwrappedValue instance describing the unwrapping behavior.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.unwrapping
Test archive name: 11ccc0e5695fe391a2d03bca5cab894884ff6fd9
ValueExtractionUnwrappingTest.validateUnwrappedValue_returns_correct_values()github

Section 8 - Built-in Constraint definitions [builtinconstraints]

a)

Each Bean Validation provider must recognize built-in constraint annotations as valid constraint definitions and provide compliant constraint implementations for each.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: 52a649a1aaddc445c8865b0df1b61b4bae2ed11
SizeConstraintTest.testSizeConstraint()github
Test archive name: 5f859b1c3bcdaf6c2fd14ad011dd6ec0127287df
AssertConstraintsTests.testAssertTrueConstraint()github
Test archive name: 5f859b1c3bcdaf6c2fd14ad011dd6ec0127287df
AssertConstraintsTests.testAssertFalseConstraint()github
Test archive name: a896fa75942dc6d1ba7d767193e43f2c6b7168e
NegativePositiveConstraintsTest.testNegativeConstraint()github
Test archive name: a896fa75942dc6d1ba7d767193e43f2c6b7168e
NegativePositiveConstraintsTest.testNegativeConstraintInfinityAndNaN()github
Test archive name: a896fa75942dc6d1ba7d767193e43f2c6b7168e
NegativePositiveConstraintsTest.testNegativeOrZeroConstraint()github
Test archive name: a896fa75942dc6d1ba7d767193e43f2c6b7168e
NegativePositiveConstraintsTest.testNegativeOrZeroConstraintInfinityAndNaN()github
Test archive name: a896fa75942dc6d1ba7d767193e43f2c6b7168e
NegativePositiveConstraintsTest.testPositiveConstraint()github
Test archive name: a896fa75942dc6d1ba7d767193e43f2c6b7168e
NegativePositiveConstraintsTest.testPositiveConstraintInfinityAndNaN()github
Test archive name: a896fa75942dc6d1ba7d767193e43f2c6b7168e
NegativePositiveConstraintsTest.testPositiveOrZeroConstraint()github
Test archive name: a896fa75942dc6d1ba7d767193e43f2c6b7168e
NegativePositiveConstraintsTest.testPositiveOrZeroConstraintInfinityAndNaN()github
Test archive name: 898bee75864f2739aff683584176e5c2f5a7b16d
NotEmptyConstraintTest.testNotEmptyConstraint()github
Test archive name: c2713b745cef78b7cace75d0f5c32e1ab1798c
DecimalMinDecimalMaxConstraintsTest.testDecimalMinConstraint()github
Test archive name: c2713b745cef78b7cace75d0f5c32e1ab1798c
DecimalMinDecimalMaxConstraintsTest.testDecimalMaxConstraint()github
Test archive name: a2ed635366646975f318dea572da4cd195cd25e
PatternConstraintTest.testPatternConstraint()github
Test archive name: 57d5d3a62c7ef38d1ba9465f2a61e991dd2b59a3
NullNotNullConstraintsTest.testNullConstraint()github
Test archive name: 57d5d3a62c7ef38d1ba9465f2a61e991dd2b59a3
NullNotNullConstraintsTest.testNotNullConstraint()github
Test archive name: e8ce306e85fda59de9c8ab9c43c2786327d4bd72
MinMaxConstraintsTest.testMinConstraint()github
Test archive name: e8ce306e85fda59de9c8ab9c43c2786327d4bd72
MinMaxConstraintsTest.testMaxConstraint()github
Test archive name: 3320972ccad95b5fec6723181c02542e9ae829e
EmailConstraintTest.testEmailConstraint()github
Test archive name: 3320972ccad95b5fec6723181c02542e9ae829e
EmailConstraintTest.testEmailConstraintOnStringBuilder()github
Test archive name: d7bbd9de9b313c46e538743f538c351dc48cddc
DigitsConstraintTest.testDigitsConstraint()github
Test archive name: 48fc52a91813b5d11b25413249e7485ef4dac65
FuturePastConstraintsTest.testPastConstraint()github
Test archive name: 48fc52a91813b5d11b25413249e7485ef4dac65
FuturePastConstraintsTest.testPastConstraintForRelativePartial()github
Test archive name: 48fc52a91813b5d11b25413249e7485ef4dac65
FuturePastConstraintsTest.testFutureConstraint()github
Test archive name: 48fc52a91813b5d11b25413249e7485ef4dac65
FuturePastConstraintsTest.testFutureConstraintForRelativePartial()github
Test archive name: ac37c34b1e269d94e3ee89a1123d1776d496f45f
NotBlankConstraintTest.testNotBlankConstraint()github
Test archive name: ac37c34b1e269d94e3ee89a1123d1776d496f45f
NotBlankConstraintTest.testNotBlankConstraintOnStringBuilder()github
b)

The built-in constraint validation implementation is having a lower priority than an XML mapping definition.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: bbd05237ee1b8fd4247bfdb0027f3b9d7a3b7fe
BuiltinValidatorOverrideTest.testXmlConfiguredValidatorConfigurationHasPrecedence()github

Section 8.1 - @Null constraint [builtinconstraints-null]

a)

@Null constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: 57d5d3a62c7ef38d1ba9465f2a61e991dd2b59a3
NullNotNullConstraintsTest.testNullConstraint()github

Section 8.2 - @NotNull constraint [builtinconstraints-notnull]

a)

@NotNull constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: 57d5d3a62c7ef38d1ba9465f2a61e991dd2b59a3
NullNotNullConstraintsTest.testNotNullConstraint()github

Section 8.3 - @AssertTrue constraint [builtinconstraints-asserttrue]

a)

@AssertTrue constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: 5f859b1c3bcdaf6c2fd14ad011dd6ec0127287df
AssertConstraintsTests.testAssertTrueConstraint()github

Section 8.4 - @AssertFalse constraint [builtinconstraints-assertfalse]

a)

@AssertFalse constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: 5f859b1c3bcdaf6c2fd14ad011dd6ec0127287df
AssertConstraintsTests.testAssertFalseConstraint()github

Section 8.5 - @Min constraint [builtinconstraints-min]

a)

@Min constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: e8ce306e85fda59de9c8ab9c43c2786327d4bd72
MinMaxConstraintsTest.testMinConstraint()github

Section 8.6 - @Max constraint [builtinconstraints-max]

a)

@Max constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: e8ce306e85fda59de9c8ab9c43c2786327d4bd72
MinMaxConstraintsTest.testMaxConstraint()github

Section 8.7 - @DecimalMin constraint [builtinconstraints-decimalmin]

a)

@DecimalMin constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: c2713b745cef78b7cace75d0f5c32e1ab1798c
DecimalMinDecimalMaxConstraintsTest.testDecimalMinConstraint()github

Section 8.8 - @DecimalMax constraint [builtinconstraints-decimalmax]

a)

@DecimalMax constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: c2713b745cef78b7cace75d0f5c32e1ab1798c
DecimalMinDecimalMaxConstraintsTest.testDecimalMaxConstraint()github

Section 8.9 - @Negative constraint [builtinconstraints-negative]

a)

@Negative constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: a896fa75942dc6d1ba7d767193e43f2c6b7168e
NegativePositiveConstraintsTest.testNegativeConstraint()github
Test archive name: a896fa75942dc6d1ba7d767193e43f2c6b7168e
NegativePositiveConstraintsTest.testNegativeConstraintInfinityAndNaN()github

Section 8.10 - @NegativeOrZero constraint [builtinconstraints-negativeorzero]

a)

@NegativeOrZero constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: a896fa75942dc6d1ba7d767193e43f2c6b7168e
NegativePositiveConstraintsTest.testNegativeOrZeroConstraint()github
Test archive name: a896fa75942dc6d1ba7d767193e43f2c6b7168e
NegativePositiveConstraintsTest.testNegativeOrZeroConstraintInfinityAndNaN()github

Section 8.11 - @Positive constraint [builtinconstraints-positive]

a)

@Positive constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: a896fa75942dc6d1ba7d767193e43f2c6b7168e
NegativePositiveConstraintsTest.testPositiveConstraint()github
Test archive name: a896fa75942dc6d1ba7d767193e43f2c6b7168e
NegativePositiveConstraintsTest.testPositiveOrZeroConstraintInfinityAndNaN()github

Section 8.12 - @PositiveOrZero constraint [builtinconstraints-positiveorzero]

a)

@PositiveOrZero constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: a896fa75942dc6d1ba7d767193e43f2c6b7168e
NegativePositiveConstraintsTest.testPositiveConstraintInfinityAndNaN()github
Test archive name: a896fa75942dc6d1ba7d767193e43f2c6b7168e
NegativePositiveConstraintsTest.testPositiveOrZeroConstraint()github

Section 8.13 - @Size constraint [builtinconstraints-size]

a)

@Size constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: 52a649a1aaddc445c8865b0df1b61b4bae2ed11
SizeConstraintTest.testSizeConstraint()github

Section 8.14 - @Digits constraint [builtinconstraints-digits]

a)

@Digits constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: d7bbd9de9b313c46e538743f538c351dc48cddc
DigitsConstraintTest.testDigitsConstraint()github

Section 8.15 - @Past constraint [builtinconstraints-past]

a)

@Past constraint

Coverage

org.hibernate.beanvalidation.tck.tests.time
Test archive name: 77e1cedc3af2feaa0d539ef2267ae685af4ffe8
ClockProviderPastTest.clockProviderIsUsed()github
Test archive name: 77e1cedc3af2feaa0d539ef2267ae685af4ffe8
ClockProviderPastTest.clockProviderIsUsedForRelativePartials()github
org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: 48fc52a91813b5d11b25413249e7485ef4dac65
FuturePastConstraintsTest.testPastConstraint()github
Test archive name: 48fc52a91813b5d11b25413249e7485ef4dac65
FuturePastConstraintsTest.testPastConstraintForRelativePartial()github

Section 8.16 - @PastOrPresent constraint [builtinconstraints-pastorpresent]

a)

@PastOrPresent constraint

Coverage

org.hibernate.beanvalidation.tck.tests.time
Test archive name: 233818dd8a1563d27ee7a767cb958917e8ef4484
ClockProviderPastOrPresentTest.clockProviderIsUsed()github
Test archive name: 233818dd8a1563d27ee7a767cb958917e8ef4484
ClockProviderPastOrPresentTest.clockProviderIsUsedForRelativePartials()github
org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: 48fc52a91813b5d11b25413249e7485ef4dac65
FuturePastConstraintsTest.testPastOrPresentConstraint()github
Test archive name: 48fc52a91813b5d11b25413249e7485ef4dac65
FuturePastConstraintsTest.testPastOrPresentConstraintForRelativePartial()github

Section 8.17 - @Future constraint [builtinconstraints-future]

a)

@Future constraint

Coverage

org.hibernate.beanvalidation.tck.tests.time
Test archive name: e78e3a8088772baa38c68a6a7c6eb7e624efd0
ClockProviderFutureTest.clockProviderIsUsed()github
Test archive name: e78e3a8088772baa38c68a6a7c6eb7e624efd0
ClockProviderFutureTest.clockProviderIsUsedForRelativePartials()github
org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: 48fc52a91813b5d11b25413249e7485ef4dac65
FuturePastConstraintsTest.testFutureConstraint()github
Test archive name: 48fc52a91813b5d11b25413249e7485ef4dac65
FuturePastConstraintsTest.testFutureConstraintForRelativePartial()github

Section 8.18 - @FutureOrPresent constraint [builtinconstraints-futureorpresent]

a)

@FutureOrPresent constraint

Coverage

org.hibernate.beanvalidation.tck.tests.time
Test archive name: e3f451b2af6fa4b22e4d8b758ae6d0536288
ClockProviderFutureOrPresentTest.clockProviderIsUsed()github
Test archive name: e3f451b2af6fa4b22e4d8b758ae6d0536288
ClockProviderFutureOrPresentTest.clockProviderIsUsedForRelativePartials()github
org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: 48fc52a91813b5d11b25413249e7485ef4dac65
FuturePastConstraintsTest.testFutureOrPresentConstraint()github
Test archive name: 48fc52a91813b5d11b25413249e7485ef4dac65
FuturePastConstraintsTest.testFutureOrPresentConstraintForRelativePartial()github

Section 8.19 - @Pattern constraint [builtinconstraints-pattern]

a)

@Pattern constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: a2ed635366646975f318dea572da4cd195cd25e
PatternConstraintTest.testPatternConstraint()github

Section 8.20 - @NotEmpty constraint [builtinconstraints-notempty]

a)

@NotEmpty constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: 898bee75864f2739aff683584176e5c2f5a7b16d
NotEmptyConstraintTest.testNotEmptyConstraint()github

Section 8.21 - @NotBlank constraint [builtinconstraints-notblank]

a)

@NotBlank constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: ac37c34b1e269d94e3ee89a1123d1776d496f45f
NotBlankConstraintTest.testNotBlankConstraint()github
Test archive name: ac37c34b1e269d94e3ee89a1123d1776d496f45f
NotBlankConstraintTest.testNotBlankConstraintOnStringBuilder()github

Section 8.22 - @Email constraint [builtinconstraints-email]

a)

@Email constraint

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.builtinconstraints
Test archive name: 3320972ccad95b5fec6723181c02542e9ae829e
EmailConstraintTest.testEmailConstraint()github
Test archive name: 3320972ccad95b5fec6723181c02542e9ae829e
EmailConstraintTest.testEmailConstraintOnStringBuilder()github

Section 9 - XML deployment descriptor [xml]

a)

If an XML descriptor does not validate against the corresponding XSD file, a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.invalid
Test archive name: 88bd2a59a7185dc62cdf1a256c3a2aa308b16d5
InvalidMappingXmlTest.testInvalidConstraintMappingXml()github
Test archive name: 12468d61b76d28227541cd8f535550f1cc92cc1
InvalidValidationXmlTest.testInvalidValidationXml()github

Section 9.1 - Constraint definition and declaration [xml-mapping]

a)

Specifically when exploring metadata, the Bean Validation provider must ensure that an annotation instance corresponding to the XML declaration is provided via ConstraintDescriptor.getAnnnotation().

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 1044a0d64614261d3661666a948c18d52b892d6
DuplicateConfigurationTest.testXmlConfiguredConstraintExposesCorrespondingAnnotationViaMetadata()github
b)

A given class must not be described more than once among all the XML mapping descriptors.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 1044a0d64614261d3661666a948c18d52b892d6
DuplicateConfigurationTest.testBeanCannotBeDescribedMoreThanOnce()github
c)

A given field or getter must not be described more than once on a given class description.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 1044a0d64614261d3661666a948c18d52b892d6
DuplicateConfigurationTest.testFieldMappingCannotOccurMoreThanOnce()github
d)

A given constraint definition must not be overridden more than once among all the XML mapping descriptors.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 1044a0d64614261d3661666a948c18d52b892d6
DuplicateConfigurationTest.testGetterMappingCannotOccurMoreThanOnce()github
e)

If any of these rules is violated in a given validation deployment, a ValidationException is raised during the creation of the ValidatorFactory.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 1044a0d64614261d3661666a948c18d52b892d6
DuplicateConfigurationTest.testBeanCannotBeDescribedMoreThanOnce()github
Test archive name: 1044a0d64614261d3661666a948c18d52b892d6
DuplicateConfigurationTest.testFieldMappingCannotOccurMoreThanOnce()github
Test archive name: 1044a0d64614261d3661666a948c18d52b892d6
DuplicateConfigurationTest.testGetterMappingCannotOccurMoreThanOnce()github

Section 9.1.1 - Constraint declaration in XML [xml-mapping-constraintdeclarationinxml]

a)

If default-package is set, all unqualified class names (including annotations) are considered part of the package described by default-package.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration
Test archive name: d17e55d04c3cb563674fe9351bf31a09a69ae
ConfigurationViaXmlAndAnnotationsTest.testEntityConfiguredViaAnnotationsAndXml()github
org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testClassConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testIgnoreValidationXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testPropertyConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testFieldConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testAnnotationDefinedConstraintApplies()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testCascadingConfiguredInXml()github
b)

A given JavaBean is described by the bean element.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testClassConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testIgnoreValidationXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testPropertyConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testFieldConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testAnnotationDefinedConstraintApplies()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testCascadingConfiguredInXml()github
c)

The name of the class is mandatory.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 6d113b88b857e366a6563727b950d37a1e1831
MissingClassNameOnBeanNodeTest.testClassNameIsMandatory()github
d)

By default, all constraint declarations expressed via annotations are ignored for classes described in XML.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration
Test archive name: fc9f5e64e4e2f2ce272c2ce7e1125fd6512428d
ConstraintDeclarationTest.testConstraintAnnotationsArePerDefaultIgnoredForXmlConfiguredEntities()github
e)

You can force Bean Validation to consider both annotations and XML constraint declarations by using ignore-annotations="false" on bean.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration
Test archive name: d17e55d04c3cb563674fe9351bf31a09a69ae
ConfigurationViaXmlAndAnnotationsTest.testEntityConfiguredViaAnnotationsAndXml()github
f)

If the name of the class does refer to a class not present in the classpath, a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration
Test archive name: 9c3c20ba1843804dbd7975cc92a432bd069b840
ConfiguredBeanNotInClassPathTest.testExceptionIsThrownForUnknownBeanNameInXml()github

Section 9.1.1.1 - Class-level overriding [xml-mapping-constraintdeclarationinxml-classleveloverriding]

a)

If ignore-annotations is declared, Bean Validation must honor the explicit value for this element.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.clazzlevel
Test archive name: 2d3823433b9d66ad4c796c3aa2295c8c542a22
ClassLevelOverridingTest.testIgnoreClassLevelAnnotations()github
Test archive name: 2d3823433b9d66ad4c796c3aa2295c8c542a22
ClassLevelOverridingTest.testClassLevelAnnotationsApplied()github
b)

If not declared, the default value defined in the encapsulating bean element is considered.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.clazzlevel
Test archive name: 2d3823433b9d66ad4c796c3aa2295c8c542a22
ClassLevelOverridingTest.testIgnoreAnnotationsFromEnclosingBeanIsApplied()github
c)

When ignore-annotations is true, class-level Bean Validation annotations are ignored for this class (including the @GroupSequence).

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.clazzlevel
Test archive name: 2d3823433b9d66ad4c796c3aa2295c8c542a22
ClassLevelOverridingTest.testIgnoreClassLevelAnnotations()github
d)

Constraints declared in XML and constraints declared in annotations are added and form the list of class-level declared constraints.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.clazzlevel
Test archive name: 2d3823433b9d66ad4c796c3aa2295c8c542a22
ClassLevelOverridingTest.testClassLevelAnnotationsApplied()github
e)

@GroupSequence is considered unless group-sequence element is explicitly used.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration
Test archive name: d17e55d04c3cb563674fe9351bf31a09a69ae
ConfigurationViaXmlAndAnnotationsTest.testDefaultGroupDefinitionDefinedInEntityApplies()github
Test archive name: d1b576b954b92dfc50d9db444e66b7bc22c683
DefaultSequenceDefinedInXmlTest.testDefaultGroupDefinitionDefinedInEntityApplies()github

Section 9.1.1.2 - Field-level overriding [xml-mapping-constraintdeclarationinxml-fieldleveloverriding]

a)

If ignore-annotations is declared, Bean Validation must honor the explicit value for this element.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.fieldlevel
Test archive name: 8223eca698b02d238634a27eddcaebec27ee3db7
FieldLevelOverridingTest.testIgnoreAnnotations()github
Test archive name: 8223eca698b02d238634a27eddcaebec27ee3db7
FieldLevelOverridingTest.testIncludeAnnotations()github
b)

If not declared, the default value defined in the encapsulating bean element is considered.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.fieldlevel
Test archive name: ebe7c78914abffb6e252442a4c2bd7dbbd8efc8
ExcludeFieldLevelAnnotationsDueToBeanDefaultsTest.testIgnoreAnnotations()github
Test archive name: 1ea824bc49d562709d03c6e366a702647211
IncludeFieldLevelAnnotationsDueToBeanDefaultsTest.testAnnotationsIncluded()github
c)

When ignore-annotations is true, field-level Bean Validation annotations on the targeted field are ignored (including @Valid and @ConvertGroup).

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.fieldlevel
Test archive name: ebe7c78914abffb6e252442a4c2bd7dbbd8efc8
ExcludeFieldLevelAnnotationsDueToBeanDefaultsTest.testIgnoreAnnotations()github
Test archive name: 8223eca698b02d238634a27eddcaebec27ee3db7
FieldLevelOverridingTest.testIgnoreAnnotations()github
d)

Constraints declared in XML and constraints declared in annotations are added and form the list of field-level declared constraints.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.fieldlevel
Test archive name: 1ea824bc49d562709d03c6e366a702647211
IncludeFieldLevelAnnotationsDueToBeanDefaultsTest.testAnnotationsIncluded()github
Test archive name: 8223eca698b02d238634a27eddcaebec27ee3db7
FieldLevelOverridingTest.testIncludeAnnotations()github
e)

@Valid is considered unless the valid element is explicitly used.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.fieldlevel
Test archive name: 8223eca698b02d238634a27eddcaebec27ee3db7
FieldLevelOverridingTest.testCascadedConfiguration()github
f)

Group conversions declared in XML and via the @ConvertGroup annotation are added and form the list of applied conversions. Note that the rules for the declaration of group conversions as outlined in 5.4.5 apply, in particular it is not legal to declare several conversions for the same source group.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.fieldlevel
Test archive name: 7864fd3c794ecc76fa2a3c2fbc2341a418a1b3f
InvalidGroupConversionInFieldLevelOverridingTest.testGroupConversionsAreAdditiveAndExceptionIsThrownForMultipleConversionWithSameSource()github
Test archive name: 8223eca698b02d238634a27eddcaebec27ee3db7
FieldLevelOverridingTest.testGroupConversionsAreAdditive()github
g)

If the name of the field does not correspond to a field in the given bean a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.fieldlevel
Test archive name: 3b9695cb30dc9a4c89483367da3842d6d4dada6
WrongFieldNameTest.testWrongFieldNameThrowsException()github

Section 9.1.1.3 - Property-level overriding [xml-mapping-constraintdeclarationinxml-propertyleveloverriding]

a)

The name attribute corresponds to the name of the property considered as defined in 5.1.2 (for example a getter String getAge() would have <getter name="age"/> as a corresponding descriptor). If ignore-annotations is declared, Bean Validation must honor the explicit value for this element.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.propertylevel
Test archive name: e0586cf6a486bd4bb5c31c75b3319fb086d1df9
PropertyLevelOverridingTest.testIgnoreAnnotations()github
Test archive name: e0586cf6a486bd4bb5c31c75b3319fb086d1df9
PropertyLevelOverridingTest.testIncludeAnnotations()github
b)

If not declared, the default value defined in the encapsulating bean element is considered.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.propertylevel
Test archive name: e75e80ad9dec94c6ca939388d1c13453d4aff
ExcludePropertyLevelAnnotationsDueToBeanDefaultsTest.testIgnoreAnnotations()github
Test archive name: dfd4c6c5d9cf4c847928dbcd944b4383eb0ea50
IncludePropertyLevelAnnotationsDueToBeanDefaultsTest.testAnnotationsIncluded()github
c)

When ignore-annotations is true, property-level Bean Validation annotations on the targeted property are ignored (including @Valid and @ConvertGroup).

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.propertylevel
Test archive name: e75e80ad9dec94c6ca939388d1c13453d4aff
ExcludePropertyLevelAnnotationsDueToBeanDefaultsTest.testIgnoreAnnotations()github
Test archive name: e0586cf6a486bd4bb5c31c75b3319fb086d1df9
PropertyLevelOverridingTest.testIgnoreAnnotations()github
d)

Constraints declared in XML and constraints declared in annotations are added and form the list of property-level declared constraints.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.propertylevel
Test archive name: dfd4c6c5d9cf4c847928dbcd944b4383eb0ea50
IncludePropertyLevelAnnotationsDueToBeanDefaultsTest.testAnnotationsIncluded()github
Test archive name: e0586cf6a486bd4bb5c31c75b3319fb086d1df9
PropertyLevelOverridingTest.testIncludeAnnotations()github
e)

@Valid is considered unless the valid element is explicitly used.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.propertylevel
Test archive name: e0586cf6a486bd4bb5c31c75b3319fb086d1df9
PropertyLevelOverridingTest.testCascadedConfiguration()github
f)

Group conversions declared in XML and via the @ConvertGroup annotation are added and form the list of applied conversions. Note that the rules for the declaration of group conversions as outlined in 5.4.5 apply, in particular it is not legal to declare several conversions for the same source group.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.propertylevel
Test archive name: 8c1ef6d387583dd194573832225dda43d92b403a
InvalidGroupConversionInPropertyLevelOverridingTest.testGroupConversionsAreAdditiveAndExceptionIsThrownForMultipleConversionWithSameSource()github
Test archive name: e0586cf6a486bd4bb5c31c75b3319fb086d1df9
PropertyLevelOverridingTest.testGroupConversionsAreAdditive()github
g)

If the name of the property does not correspond to a property in the given bean a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.propertylevel
Test archive name: ce7c6acba46fd87236aafa4167c53e8d1f2edc7
WrongPropertyNameTest.testWrongPropertyNameThrowsException()github

Section 9.1.1.4 - Constructor-level overriding [xml-mapping-constraintdeclarationinxml-constructorleveloverriding]

a)

To identify a constructor to be configured, zero or more parameter elements are used, matching the number and types of parameters of the configured constructor. When configuring the default constructor, no parameter element is to be used. The parameter types are specified using their fully qualified name using the syntax described in the documentation of java.lang.Class.getName().

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constructorvalidation
Test archive name: cbe352b325aef7a3ecef657d9163564e8b2238c
ConstructorValidationTest.testXmlConfiguredConstructors()github
Test archive name: cbe352b325aef7a3ecef657d9163564e8b2238c
ConstructorValidationTest.testVarargsConstructorParameter()github
b)

Varargs parameters are specified using the corresponding array type, e.g. a parameter String... must be specified as "[Ljava.lang.String;".

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constructorvalidation
Test archive name: cbe352b325aef7a3ecef657d9163564e8b2238c
ConstructorValidationTest.testVarargsConstructorParameter()github
c)

If the default-package element is configured for the mapping file, any unqualified class names will be resolved using the given default package.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constructorvalidation
Test archive name: cbe352b325aef7a3ecef657d9163564e8b2238c
ConstructorValidationTest.testXmlConfiguredConstructors()github
Test archive name: cbe352b325aef7a3ecef657d9163564e8b2238c
ConstructorValidationTest.testVarargsConstructorParameter()github
Test archive name: cbe352b325aef7a3ecef657d9163564e8b2238c
ConstructorValidationTest.testConstructorCrossParameterConstraint()github
d)

If no constructor with the specified parameter types exists in the given bean a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constructorvalidation
Test archive name: 744aa2432dc18943883a8d132de898ac0b6f5c0
UnknownConstructorValidationTest.testUnknownConstructorThrowsException()github
e)

The optional return-value element is used to change the configuration of a constructor's return value if required.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constructorvalidation
Test archive name: cbe352b325aef7a3ecef657d9163564e8b2238c
ConstructorValidationTest.testXmlConfiguredConstructors()github
f)

The optional cross-parameter element is used to change the configuration of a constructor's cross-parameter constraints if required.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constructorvalidation
Test archive name: cbe352b325aef7a3ecef657d9163564e8b2238c
ConstructorValidationTest.testConstructorCrossParameterConstraint()github
g)

The constraints applying for a constructor's parameters and its return value are specified by adding constraint elements to the parameter and return-value elements respectively.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constructorvalidation
Test archive name: cbe352b325aef7a3ecef657d9163564e8b2238c
ConstructorValidationTest.testConstraintOnConstructorReturnValueAndParameter()github
h)

Whether or not to perform cascaded validation is controlled using the valid element

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constructorvalidation
Test archive name: cbe352b325aef7a3ecef657d9163564e8b2238c
ConstructorValidationTest.testCascadingOnReturnValueAndParameter()github
i)

Group conversion rules for cascaded validation are specified using the convert-group element.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constructorvalidation
Test archive name: cbe352b325aef7a3ecef657d9163564e8b2238c
ConstructorValidationTest.testGroupConversionOnReturnValueAndParameter()github
j)

The cross-parameter constraints applied on a constructor parameter list are specified by adding constraint elements to the cross-parameter element.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constructorvalidation
Test archive name: cbe352b325aef7a3ecef657d9163564e8b2238c
ConstructorValidationTest.testConstructorCrossParameterConstraint()github
k)

If ignore-annotations is declared on the parameter, cross-parameter or return-value element, Bean Validation must honor the explicit value for this element. Otherwise, if ignore-annotations is declared for the constructor element, Bean Validation must honor this value. Otherwise, the default value declared in the encapsulating bean element is considered.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constructorvalidation
Test archive name: 89ddef531c049d85a213b1616a338f46eac326
IgnoreAnnotationsInConstructorConfigurationTest.testIgnoreAnnotationsOnReturnValueParameterAndCrossParameter()github
Test archive name: e637722b1f95e2f25e34a294b7ecc766cf5621f
IgnoreAnnotationsOnConstructorTest.testIgnoreAnnotationsOnConstructorLevel()github
l)

When ignore-annotations is true, Bean Validation annotations on the targeted constructor or parameter are ignored (including @Valid and @ConvertGroup).

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constructorvalidation
Test archive name: e637722b1f95e2f25e34a294b7ecc766cf5621f
IgnoreAnnotationsOnConstructorTest.testIgnoreAnnotationsOnConstructorLevel()github
m)

Constraints declared in XML and constraints declared in annotations are added and form the list of declared parameter, cross-parameter or return value constraints respectively.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constructorvalidation
Test archive name: e637722b1f95e2f25e34a294b7ecc766cf5621f
IgnoreAnnotationsOnConstructorTest.testIgnoreAnnotationsOnConstructorLevel()github
n)

@Valid is considered unless the valid element is explicitly used.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constructorvalidation
Test archive name: b42f5022cdfad0a7c9b1bfa1e6ed4e520b9d127
CascadedValidationTest.testValidaAnnotationIsApplied()github
Test archive name: 8971b7d866b08afaa192213d5cf36419e3999d59
DisabledCascadedValidationTest.testValidAnnotationIsIgnored()github
o)

Group conversions declared in XML and via the @ConvertGroup annotation are added and form the list of applied conversions. Note that the rules for the declaration of group conversions as outlined in 5.4.5 apply, in particular it is not legal to declare several conversions for the same source group. This does not apply to cross-parameter elements as cascading does not make sense in this situation.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constructorvalidation
Test archive name: e637722b1f95e2f25e34a294b7ecc766cf5621f
IgnoreAnnotationsOnConstructorTest.testIgnoreAnnotationsOnConstructorLevel()github

Section 9.1.1.5 - Method-level overriding [xml-mapping-constraintdeclarationinxml-methodleveloverriding]

a)

To identify a method to be configured, zero or more parameter elements are used, matching the number and types of parameters of the configured method. The parameter types are specified using their fully qualified name using the syntax described in the documentation of java.lang.Class.getName().

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: 5260217bd2adefd42f462d6b2a49d5220104e1f
MethodValidationTest.testXmlMethodConfigurationApplied()github
Test archive name: 5260217bd2adefd42f462d6b2a49d5220104e1f
MethodValidationTest.testVarargsMethodParameter()github
b)

Varargs parameters are specified using the corresponding array type, e.g. a parameter String... must be specified as "[Ljava.lang.String;".

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: 5260217bd2adefd42f462d6b2a49d5220104e1f
MethodValidationTest.testVarargsMethodParameter()github
c)

If the default-package element is configured for the mapping file, any unqualified class names will be resolved using the given default package.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: 5260217bd2adefd42f462d6b2a49d5220104e1f
MethodValidationTest.testXmlMethodConfigurationApplied()github
Test archive name: 5260217bd2adefd42f462d6b2a49d5220104e1f
MethodValidationTest.testVarargsMethodParameter()github
Test archive name: 5260217bd2adefd42f462d6b2a49d5220104e1f
MethodValidationTest.testMethodCrossParameterConstraint()github
d)

A given getter method representing a JavaBeans property may either be configured using the getter or the method element, but not both. If a getter element and a method element referring to the same method are detected by the Bean Validation provider, a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: 3b36c3e984a87f36cdf78bf16c02e4a2190a283
MethodAsGetterAndMethodNodeTest.testMethodConfiguredWithMethodAndGetterNodeThrowsException()github
e)

If no method with the specified name and parameter types exists in the given bean a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: e8b0c7c33e799ede97ded4fb26b8db5528d58de2
UnknownMethodValidationTest.testUnknownConfiguredMethodThrowsException()github
f)

The optional return-value element is used to change the configuration of a method's return value if required.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: 5260217bd2adefd42f462d6b2a49d5220104e1f
MethodValidationTest.testXmlMethodConfigurationApplied()github
g)

The optional cross-parameter element is used to change the configuration of a method's cross-parameter constraints if required.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: 5260217bd2adefd42f462d6b2a49d5220104e1f
MethodValidationTest.testMethodCrossParameterConstraint()github
h)

The constraints applying for a method's parameters and its return value are specified by adding constraint elements to the parameter and return-value elements respectively.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: 5260217bd2adefd42f462d6b2a49d5220104e1f
MethodValidationTest.testConstraintOnMethodReturnValueAndParameter()github
i)

Whether or not to perform cascaded validation is controlled using the valid element.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: 5260217bd2adefd42f462d6b2a49d5220104e1f
MethodValidationTest.testCascadingOnReturnValueAndParameter()github
j)

Group conversion rules for cascaded validation are specified using the convert-group element.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: 5260217bd2adefd42f462d6b2a49d5220104e1f
MethodValidationTest.testGroupConversionOnReturnValueAndParameter()github
k)

The cross-parameter constraints applied on a method parameter list are specified by adding constraint elements to the cross-parameter element.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: 5260217bd2adefd42f462d6b2a49d5220104e1f
MethodValidationTest.testMethodCrossParameterConstraint()github
l)

If ignore-annotations is declared on the parameter, cross-parameter or return-value element, Bean Validation must honor the explicit value for this element. Otherwise, if ignore-annotations is declared for the method element, Bean Validation must honor this value. Otherwise, the default value declared in the encapsulating bean element is considered.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: 547c19ea335a31f7ef71555670b0669e09a9dda
IgnoreAnnotationsInMethodConfigurationTest.testIgnoreAnnotationsOnReturnValueParameterAndCrossParameter()github
Test archive name: 3293e5514ed1ee1a527992677f54b058edd6241a
IgnoreAnnotationsOnMethodTest.testIgnoreAnnotationsOnMethodLevel()github
m)

When ignore-annotations is true, Bean Validation annotations on the targeted method or parameter are ignored (including @Valid and @ConvertGroup).

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: 3293e5514ed1ee1a527992677f54b058edd6241a
IgnoreAnnotationsOnMethodTest.testIgnoreAnnotationsOnMethodLevel()github
n)

Constraints declared in XML and constraints declared in annotations are added and form the list of declared parameter, cross-parameter or return value constraints respectively.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: 3293e5514ed1ee1a527992677f54b058edd6241a
IgnoreAnnotationsOnMethodTest.testIgnoreAnnotationsOnMethodLevel()github
o)

@Valid is considered unless the valid element is explicitly used.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: 88e55429583c315e767a24675def6f1833315da8
CascadedValidationTest.testValidaAnnotationIsApplied()github
Test archive name: 4f5eda9c35ef345e88f41f9bb56fd2b369aadc93
DisabledCascadedValidationTest.testValidAnnotationIsIgnored()github
p)

Group conversions declared in XML and via the @ConvertGroup annotation are added and form the list of applied conversions. Note that the rules for the declaration of group conversions as outlined in 5.4.5 apply, in particular it is not legal to declare several conversions for the same source group. This does not apply to cross-parameter elements as cascading does not make sense in this situation.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.methodvalidation
Test archive name: 3293e5514ed1ee1a527992677f54b058edd6241a
IgnoreAnnotationsOnMethodTest.testIgnoreAnnotationsOnMethodLevel()github

Section 9.1.1.6 - Container-element overriding [xml-mapping-constraintdeclarationinxml-containerelementconstraints]

a)

To apply constraints to the elements of generic container types or to mark them for cascaded validation, the container-element-type element is used.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.containerelementlevel
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareContainerElementTypeConstraintsForParameterWithXmlMapping()github
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForParameterWithXmlMapping()github
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForParameterWithXmlMapping()github
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareContainerElementCascadesForParameterWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareContainerElementTypeConstraintsForFieldWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForFieldWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForFieldWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareContainerElementCascadesForFieldWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareContainerElementTypeConstraintsForReturnValueWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForReturnValueWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForReturnValueWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareContainerElementCascadesForReturnValueWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareContainerElementTypeConstraintsForGetterWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForGetterWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForGetterWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareContainerElementCascadesForGetterWithXmlMapping()github
b)

container-element-type can be used within the field, getter, parameter and return-value elements.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.containerelementlevel
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareContainerElementTypeConstraintsForParameterWithXmlMapping()github
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForParameterWithXmlMapping()github
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForParameterWithXmlMapping()github
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareContainerElementCascadesForParameterWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareContainerElementTypeConstraintsForFieldWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForFieldWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForFieldWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareContainerElementCascadesForFieldWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareContainerElementTypeConstraintsForReturnValueWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForReturnValueWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForReturnValueWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareContainerElementCascadesForReturnValueWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareContainerElementTypeConstraintsForGetterWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForGetterWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForGetterWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareContainerElementCascadesForGetterWithXmlMapping()github
c)

The type-argument-index is used to specify the index of the configured type argument.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.containerelementlevel
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareContainerElementTypeConstraintsForParameterWithXmlMapping()github
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForParameterWithXmlMapping()github
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForParameterWithXmlMapping()github
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareContainerElementCascadesForParameterWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareContainerElementTypeConstraintsForFieldWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForFieldWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForFieldWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareContainerElementCascadesForFieldWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareContainerElementTypeConstraintsForReturnValueWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForReturnValueWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForReturnValueWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareContainerElementCascadesForReturnValueWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareContainerElementTypeConstraintsForGetterWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForGetterWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForGetterWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareContainerElementCascadesForGetterWithXmlMapping()github
d)

The type-argument-index can be omitted, if the container type has exactly one type argument.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.containerelementlevel
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareContainerElementCascadesForParameterWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareContainerElementTypeConstraintsForFieldWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareContainerElementTypeConstraintsForReturnValueWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareContainerElementTypeConstraintsForGetterWithXmlMapping()github
e)

The ignore-annotations settings effectively applying to the encapsulating element (field, getter etc.) are applied to container-element-type, too.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.containerelementlevel
Test archive name: 948a25a67fd8ad445796c3e341b3fca2c11e565
ContainerElementTypeIgnoreAnnotationsMappingTest.ignoreAnnotationsOnEncapsulatingFieldAppliesToContainerElementType()github
Test archive name: 948a25a67fd8ad445796c3e341b3fca2c11e565
ContainerElementTypeIgnoreAnnotationsMappingTest.ignoreAnnotationsOnEncapsulatingGetterAppliesToContainerElementType()github
Test archive name: 948a25a67fd8ad445796c3e341b3fca2c11e565
ContainerElementTypeIgnoreAnnotationsMappingTest.ignoreAnnotationsOnEncapsulatingMethodReturnValueAppliesToContainerElementType()github
Test archive name: 948a25a67fd8ad445796c3e341b3fca2c11e565
ContainerElementTypeIgnoreAnnotationsMappingTest.ignoreAnnotationsOnEncapsulatingMethodParameterAppliesToContainerElementType()github
f)

The container-element-type element can be nested for configuring nested generic containers such as List<List<String>>.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.containerelementlevel
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForParameterWithXmlMapping()github
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForParameterWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForFieldWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForFieldWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForReturnValueWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForReturnValueWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForGetterWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForGetterWithXmlMapping()github
g)

Constraints are applied by adding constraint elements to container-element-type.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.containerelementlevel
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareContainerElementTypeConstraintsForParameterWithXmlMapping()github
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForParameterWithXmlMapping()github
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForParameterWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareContainerElementTypeConstraintsForFieldWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForFieldWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForFieldWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareContainerElementTypeConstraintsForReturnValueWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForReturnValueWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForReturnValueWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareContainerElementTypeConstraintsForGetterWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareNestedContainerElementTypeConstraintsForGetterWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareDeeplyNestedContainerElementTypeConstraintsForGetterWithXmlMapping()github
h)

Whether or not to perform cascaded validation is controlled using the valid element.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.containerelementlevel
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.canDeclareContainerElementCascadesForParameterWithXmlMapping()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.canDeclareContainerElementCascadesForFieldWithXmlMapping()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.canDeclareContainerElementCascadesForReturnValueWithXmlMapping()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.canDeclareContainerElementCascadesForGetterWithXmlMapping()github
i)

Group conversion rules for cascaded validation are specified using the convert-group element.

Coverage

org.hibernate.beanvalidation.tck.tests.validation.groupconversion.containerelement
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnField()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testSeveralGroupConversionsAppliedOnField()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnProperty()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnMethodReturnValue()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnMethodParameter()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnConstructorReturnValue()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsAppliedOnConstructorParameter()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionIsNotExecutedRecursively()github
Test archive name: d9cd5173db84e25e424ae939137ab6ca41e4b3e
AbstractContainerElementGroupConversionValidationTest.testGroupConversionWithSequenceAsTo()github
j)

The type of the surrounding element (field, getter etc.) has no type arguments.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.containerelementlevel
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.declaringContainerElementTypeConstraintOnNonGenericParameterCausesException()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.declaringContainerElementTypeConstraintOnNonGenericFieldCausesException()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.declaringContainerElementTypeConstraintOnNonGenericReturnValueCausesException()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.declaringContainerElementTypeConstraintOnNonGenericFieldCausesException()github
k)

The type of the surrounding element has no type argument with the index given via type-argument-index.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.containerelementlevel
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.declaringContainerElementTypeConstraintForNonExistingTypeArgumentIndexOnParameterCausesException()github
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.declaringContainerElementTypeConstraintForNonExistingNestedTypeArgumentIndexOnParameterCausesException()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.declaringContainerElementTypeConstraintForNonExistingTypeArgumentIndexOnFieldCausesException()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.declaringContainerElementTypeConstraintForNonExistingNestedTypeArgumentIndexOnFieldCausesException()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.declaringContainerElementTypeConstraintForNonExistingTypeArgumentIndexOnReturnValueCausesException()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.declaringContainerElementTypeConstraintForNonExistingNestedTypeArgumentIndexOnReturnValueCausesException()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.declaringContainerElementTypeConstraintForNonExistingTypeArgumentIndexOnFieldCausesException()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.declaringContainerElementTypeConstraintForNonExistingNestedTypeArgumentIndexOnFieldCausesException()github
l)

The type of the surrounding element has multiple type arguments and no index is given via type-argument-index.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.containerelementlevel
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.omittingTypeArgumentForMultiTypeArgumentTypeOnParameterCausesException()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.omittingTypeArgumentForMultiTypeArgumentTypeOnFieldCausesException()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.omittingTypeArgumentForMultiTypeArgumentTypeOnReturnValueCausesException()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.omittingTypeArgumentForMultiTypeArgumentTypeOnFieldCausesException()github
m)

The same type argument of the surrounding element is configured multiple times.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.containerelementlevel
Test archive name: bf430ace5b5c921e3ccbe69aca77bbd61b51
ContainerElementTypeConstraintsForParameterXmlMappingTest.configuringSameContainerElementTwiceCausesException()github
Test archive name: f9189753df109e3d2530e1fc6a315aa84b453a44
ContainerElementTypeConstraintsForFieldXmlMappingTest.configuringSameContainerElementTwiceCausesException()github
Test archive name: 2ce9a00cf47fff199c981d53dae4923c0795432
ContainerElementTypeConstraintsForReturnValueXmlMappingTest.configuringSameContainerElementTwiceCausesException()github
Test archive name: ddb4df1342b5ef06fc32fb3644714bcc442b9
ContainerElementTypeConstraintsForGetterXmlMappingTest.configuringSameContainerElementTwiceCausesException()github

Section 9.1.1.7 - Constraint declaration [xml-mapping-constraintdeclarationinxml-constraintdeclaration]

a)

The annotation attribute is the class name of the annotation representing the constraint. Message, groups and payload are defined respectively by the message, groups and payload elements.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
b)

The name attribute is mandatory and represents the name of the element in the constraint declaration.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration
Test archive name: 5229ca73c1ba2efbbf32fbf82ad45a88d2b1206c
MandatoryNameAttributeTest.testNameAttributeIsMandatory()github
c)

Message, groups and payload are not permitted names, use the message, groups or payload elements instead. Otherwise a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration
Test archive name: 9fe483a0d074d2b6a1e9bdea4eeadcac274cbd
ReservedElementNameTest.testGroupIsNotAllowedAsElementName()github
Test archive name: 9fe483a0d074d2b6a1e9bdea4eeadcac274cbd
ReservedElementNameTest.testMessageIsNotAllowedAsElementName()github
Test archive name: 9fe483a0d074d2b6a1e9bdea4eeadcac274cbd
ReservedElementNameTest.testPayloadIsNotAllowedAsElementName()github
d)

If the element represents a primitive type, a class or an enum, the string representation of its value is placed in the element itself.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
e)

If the element represents a primitive type array, a class array or an enum array, the string representation of each value is placed in a value element placed under the element itself.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
f)

If the element represents an annotation, the annotation element is used to represent the annotation and placed under element.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
g)

If the element represents an array of annotations, one or more annotation elements are placed under element.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
h)

Elements with default values in the annotation definition do not have to be represented in XML: the default value will be used in this case.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
i)

If an XML constraint declaration is missing mandatory elements, or if it contains elements not part of the constraint definition, a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration
Test archive name: c2d14ecf5331a30e6df1f9bd1c144f585fc20
MissingMandatoryElementTest.testMissingMandatoryElementInConstraintDeclaration()github

Section 9.1.1.8 - Declaration of group conversions [xml-mapping-constraintdeclarationinxml-groupconversions]

a)

Group conversion rules are declared by specifying one or more convert-group elements within the field, getter, parameter, return-value and container-element-type elements.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.groupconversion
Test archive name: 6f7a8a204d1f35029276345deaf6b250bdabf8
GroupConversionTest.testGroupConversionsAppliedOnMethod()github
Test archive name: 6f7a8a204d1f35029276345deaf6b250bdabf8
GroupConversionTest.testGroupConversionsAppliedOnConstructor()github
Test archive name: 6f7a8a204d1f35029276345deaf6b250bdabf8
GroupConversionTest.testGroupConversionsAppliedOnField()github
Test archive name: 6f7a8a204d1f35029276345deaf6b250bdabf8
GroupConversionTest.testGroupConversionsAppliedOnGetter()github
b)

Source and target group of a conversion rule are given by specifying their fully-qualified names within the from and to attribute respectively. If the default-package element is configured for the mapping file, any unqualified class names will be resolved using the given default package.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.groupconversion
Test archive name: 6f7a8a204d1f35029276345deaf6b250bdabf8
GroupConversionTest.testGroupConversionsAppliedOnMethod()github
Test archive name: 6f7a8a204d1f35029276345deaf6b250bdabf8
GroupConversionTest.testGroupConversionsAppliedOnConstructor()github
Test archive name: 6f7a8a204d1f35029276345deaf6b250bdabf8
GroupConversionTest.testGroupConversionsAppliedOnField()github
Test archive name: 6f7a8a204d1f35029276345deaf6b250bdabf8
GroupConversionTest.testGroupConversionsAppliedOnGetter()github

Section 9.1.2 - Overriding constraint definitions in XML [xml-mapping-constraintdefinition]

a)

A constraint definition is represented by a constraint-definition element.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testClassConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testIgnoreValidationXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testPropertyConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testFieldConstraintDefinedInXml()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testAnnotationDefinedConstraintApplies()github
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testCascadingConfiguredInXml()github
b)

If include-existing-validator is set to false, ConstraintValidator defined on the constraint annotation are ignored.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdefinition
Test archive name: 20271c993b85dff3f3c4464858ba3568193e2ba
XmlConfiguredConstraintValidatorTest.testExcludeExistingValidators()github
c)

If set to true, the list of ConstraintValidators described in XML are concatenated to the list of ConstraintValidator described on the annotation to form a new array of ConstraintValidator evaluated.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdefinition
Test archive name: 20271c993b85dff3f3c4464858ba3568193e2ba
XmlConfiguredConstraintValidatorTest.testIncludeExistingValidators()github
d)

Annotation based ConstraintValidators come before XML based ConstraintValidators in the array.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdefinition
Test archive name: 20271c993b85dff3f3c4464858ba3568193e2ba
XmlConfiguredConstraintValidatorTest.testIncludeExistingValidators()github
e)

The new list is returned by ConstraintDescriptor.getConstraintValidatorClasses().

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdefinition
Test archive name: 20271c993b85dff3f3c4464858ba3568193e2ba
XmlConfiguredConstraintValidatorTest.testExcludeExistingValidators()github
Test archive name: 20271c993b85dff3f3c4464858ba3568193e2ba
XmlConfiguredConstraintValidatorTest.testIncludeExistingValidators()github

Section 9.1.3 - Converting the string representation of a value [xml-mapping-typeconversion]

a)

Primitive types, Class and Enum are represented as strings in the XML descriptor. Elements of an array are represented by the value element.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
b)

A byte is represented according to the rules defined in Byte.parseByte(String).

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
c)

A short is represented according to the rules defined in Short.parseShort(String).

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
d)

An int is represented according to the rules defined in Integer.parseInt(String).

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
e)

A long is represented according to the rules defined in Long.parseLong(String).

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
f)

A float is represented according to the rules defined in Float.parseFloat(String).

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
g)

A double is represented according to the rules defined in Double.parseDouble(String).

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
h)

A boolean is represented according to the rules defined in Boolean.parseBoolean(String).

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
i)

A char is represented according to the following rules: the string must be of one character long the character extracted from the string is the returned char

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
j)

A Class is represented by the fully qualified class name of the class or more precisely according to the syntax described in the documentation of java.lang.Class.getName(). Note that if the raw string is unqualified, default package is taken into account.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
k)

An enum is represented by its enum.name() value.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testElementConversionInXmlConfiguredConstraint()github
l)

If any of the string representation does not match its type counterpart, a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration
Test archive name: 2d96a0ee875b6d54617d096bf159a7697fedfa8
XmlConfigurationTest.testIllegalAnnotationValueInXmlMappingCausesException()github

Section 9.1.4 - XML Schema [xml-mapping-xsd]

a)

Implementations supporting Bean Validation 2.0 must properly parse mapping descriptors of Bean Validation 1.0, 1.1 and 2.0.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.versioning
Test archive name: 8f43ff2ac4fbe82a7c270bf73894d4f4dcd1b1a
Version20InMappingXmlTest.testValidBeanValidation20Mapping()github
Test archive name: 844adecd9d4706de44bb2bb078f73eef7ba984
Version10InMappingXmlTest.testValidBeanValidation10Mapping()github
Test archive name: a6e4d4cbf548578fce6f5dffffde567941f8dc9
Version11InMappingXmlTest.testValidBeanValidation11Mapping()github
b)

If the version attribute attribute is not given, schema version 1.0 is to be assumed by the Bean Validation provider.

c)

In case an unknown version is given (e.g. if a mapping descriptor adhering to a future schema version is parsed by a Bean Validation 2.0 provider) a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.versioning
Test archive name: a533c028c254c4efccfdfec449d339434be688
UnknownVersionInMappingXmlTest.testConstraintMappingWithUnknownSchemaVersion()github

Section 9.2 - Configuration schema [xml-config-xsd]

a)

Implementations supporting Bean Validation 2.0 must properly parse configuration descriptors of Bean Validation 1.0, 1.1 and 2.0.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.versioning
Test archive name: 4f3de2f4b0fadb158e2bf6a0e2b2ebf7e3436497
Version11InValidationXmlTest.testValidationXmlVersion11()github
Test archive name: 17bceb9b1c5668407221bd95c541c7e514523d2
Version20InValidationXmlTest.testValidationXmlVersion20()github
Test archive name: 132848a543708ece58269f79147bb71e56c587c8
Version10InValidationXmlTest.testValidationXmlVersion10()github
b)

If the version attribute attribute is not given, schema version 1.0 is to be assumed by the Bean Validation Provider.

c)

In case an unknown version is given a ValidationException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.xmlconfiguration.versioning
Test archive name: 63d0b759bb147352ef44fca682712efc82cc46
UnknownVersionInValidationXmlTest.testValidationXmlWithUnknownSchemaVersion()github

Section 10 - Exception model [exception]

a)

Every (runtime) exception raised either at initialization time or execution time by any of the extension interfaces (ConstraintValidator, ConstraintValidatorFactory, MessageInterpolator, TraversableResolver, ValidationProviderResolver, ParameterNameProvider, ClockProvider, ValueExtractor) is wrapped in a ValidationException.

Coverage

org.hibernate.beanvalidation.tck.tests.bootstrap.customprovider
Test archive name: ae1f657d183154ca86ef43c77982f26f255e3
BootstrapNonAvailableValidationProviderTest.testUnknownProviderConfiguredInValidationXml()github
Test archive name: ae1f657d183154ca86ef43c77982f26f255e3
BootstrapNonAvailableValidationProviderTest.testConfiguredValidationProviderIsNotLoadable()github
org.hibernate.beanvalidation.tck.tests.time
Test archive name: 61774ad4505d8a2bc4f9e44f96f7e9e89511ee7
ClockProviderTest.testClockProviderExceptionsGetWrappedInValidationException()github
org.hibernate.beanvalidation.tck.tests.valueextraction.runtime
Test archive name: 744bbb7877157b360c5b96a4a219d64212ced25
ValueExtractorExceptionWrapping.exception_in_value_extractor_is_wrapped()github

Section 10.2 - Constraint definition: ConstraintDefinitionException [exception-constraintdefinition]

a)

If a constraint definition does not respect the Bean Validation rules or is inconsistent, a ConstraintDefinitionException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.invalidconstraintdefinitions
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithParameterStartingWithValid()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithoutMessageParameter()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithoutGroupParameter()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithoutPayloadParameter()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongDefaultGroupValue()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongDefaultPayloadValue()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongPayloadClass()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongMessageType()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongGroupType()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testGenericAndCrossParameterConstraintWithoutValidationAppliesToCausesException()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testGenericConstraintWithValidationAppliesToCausesException()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testCrossParameterConstraintWithValidationAppliesToCausesException()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongValidationAppliesToType()github
Test archive name: c7ebb184c707b12a74e6561e614ea8790ac9c30
InvalidConstraintDefinitionsTest.testConstraintDefinitionWithWrongDefaultValidationAppliesTo()github

Section 10.3 - Constraint declaration: ConstraintDeclarationException and UnexpectedTypeException [exception-constraintdeclaration]

a)

When a constraint declaration is illegal, ConstraintDeclarationException is raised.

b)

When the return type of a property cannot be processed for a given constraint, an UnexpectedTypeException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.validatorresolution
Test archive name: e21fd743aaac2071bbdbd2884b8c27b0431266de
ValidatorResolutionTest.testAmbiguousValidatorResolution()github

Section 10.4 - Group definition: GroupDefinitionException [exception-groupdefinition]

a)

When a group definition is illegal, a GroupDefinitionException is raised.

Coverage

org.hibernate.beanvalidation.tck.tests.constraints.groups
Test archive name: b2b43af61c76fd2859324fdb4fa6ecfb9e22532
GroupTest.testCyclicGroupSequence()github
org.hibernate.beanvalidation.tck.tests.constraints.groups.groupsequence
Test archive name: 1d279a93f5a9e2b7ca5d335781b69bda83c39b
SequenceResolutionTest.testInvalidDefinitionOfDefaultSequenceInEntity()github

Section 10.5 - Value extractor definition: ValueExtractorDefinitionException [exception-valueextractordefinition]

a)

When detecting an illegal value extractor definition, a ValueExtractorDefinitionException will be raised.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.definition
Test archive name: 61499743c7a63eb856395f1d4dbd99f469f0ec
InvalidValueExtractorTest.severalExtractedValuesThrowException()github
Test archive name: 61499743c7a63eb856395f1d4dbd99f469f0ec
InvalidValueExtractorTest.noExtractedValueThrowsException()github

Section 10.6 - Value extractor declaration: ValueExtractorDeclarationException [exception-valueextractordeclaration]

a)

When detecting an illegal configuration of value extractors, a ValueExtractorDeclarationException will be raised.

Coverage

org.hibernate.beanvalidation.tck.tests.valueextraction.declaration
Test archive name: 2767ffa78e6a271fe8b679fde1a3fb421a85fafe
MultipleValueExtractorsInValidationXmlForSameTypeAndTypeArgumentTest.configuringMultipleExtractorsForSameTypeAndTypeUseInValidationXmlCausesException()github

Section 10.7 - No Bean Validation Provider detected: NoProviderFoundException [exception-noprovider]

a)

When trying to bootstrap Bean Validation via Validation.buildDefaultValidatorFactory() or Validation.byDefaultProvider().configure() and no Bean Validation provider could be found, a NoProviderFoundException is raised.

Section 11.1.1 - Objects lifecycle [integration-general-objectslifecycle]

a)

Build and bootstrap the ValidatorFactory instance for an application.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.defaultinjection
Test archive name: 1fc5eedb9856edde79bd91247f566e95e4bfe6ee
DefaultInjectionTest.testDefaultValidatorFactoryGetsInjected()github
Test archive name: 1fc5eedb9856edde79bd91247f566e95e4bfe6ee
DefaultInjectionTest.testQualifiedDefaultValidatorFactoryGetsInjected()github
Test archive name: 1fc5eedb9856edde79bd91247f566e95e4bfe6ee
DefaultInjectionTest.testDefaultValidatorGetsInjected()github
Test archive name: 1fc5eedb9856edde79bd91247f566e95e4bfe6ee
DefaultInjectionTest.testQualifiedDefaultValidatorGetsInjected()github
b)

Provide access to the ValidatorFactory instance as well as Validator instances in their default configuration using the paradigm of the container: for example, such instances would be injectable in other objects via a dependency injection framework.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.defaultinjection
Test archive name: 1fc5eedb9856edde79bd91247f566e95e4bfe6ee
DefaultInjectionTest.testDefaultValidatorFactoryGetsInjected()github
Test archive name: 1fc5eedb9856edde79bd91247f566e95e4bfe6ee
DefaultInjectionTest.testQualifiedDefaultValidatorFactoryGetsInjected()github
Test archive name: 1fc5eedb9856edde79bd91247f566e95e4bfe6ee
DefaultInjectionTest.testDefaultValidatorGetsInjected()github
Test archive name: 1fc5eedb9856edde79bd91247f566e95e4bfe6ee
DefaultInjectionTest.testQualifiedDefaultValidatorGetsInjected()github
c)

Configure ValidatorFactory with a custom ConstraintValidatorFactory instance that returns managed ConstraintValidator instances, unless a custom ConstraintValidatorFactory is requested by the user. The scope of ConstraintValidator instances is still fully controlled by the Bean Validation provider as described in 3.5, but as managed beans they can receive expected services like injection of other objects.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.factory
Test archive name: 182ca962d5b396944ba1ca59673bda64313ba0
ConstraintValidatorInjectionTest.testDependencyInjectionIntoConstraintValidator()github
d)

Configure ValidatorFactory with managed instances of ConstraintValidatorFactory, MessageInterpolator, ParameterNameProvider, ClockProvider and TraversableResolver, if such instances are defined in the XML deployment descriptor. Services provided by the container (like dependency injection) should thus be available to these instances.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.managedobjects
Test archive name: 87579bd8af3dbc7746cb07fcb99ea93334b8fa
ManagedValueExtractorsTest.testValueExtractorsAreSubjectToDependencyInjection()github
Test archive name: a8ccde56a1a87ac0572c0c66eed454446b8885
ManagedObjectsTest.testMessageInterpolatorIsSubjectToDependencyInjection()github
Test archive name: a8ccde56a1a87ac0572c0c66eed454446b8885
ManagedObjectsTest.testTraversableResolverIsSubjectToDependencyInjection()github
Test archive name: a8ccde56a1a87ac0572c0c66eed454446b8885
ManagedObjectsTest.testConstraintValidatorFactoryIsSubjectToDependencyInjection()github
Test archive name: a8ccde56a1a87ac0572c0c66eed454446b8885
ManagedObjectsTest.testParameterNameProviderIsSubjectToDependencyInjection()github
Test archive name: a8ccde56a1a87ac0572c0c66eed454446b8885
ManagedObjectsTest.testClockProviderIsSubjectToDependencyInjection()github
e)

Invoke ValidatorFactory.close() when the ValidatorFactory instance is no longer needed.

f)

Dispose of managed instances provided to the Bean Validation bootstrap process after ValidatorFactory.close() has been invoked.

Section 11.1.2 - Method and constructor validation [integration-general-executable]

a)

Method interception frameworks (such as AOP or interceptor frameworks) enable interception of constrained methods following the steps defined in 6.4.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testParameterValidationOfConstrainedMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testReturnValueValidationOfConstrainedMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testCascadedReturnValueValidationOfConstrainedMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testGettersAreNotValidatedByDefault()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testParameterValidationOfConstrainedConstructor()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testReturnValueValidationOfConstrainedConstructor()github
b)

Method validation execution is implicit for any method or constructor annotated with constraints.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testParameterValidationOfConstrainedMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testReturnValueValidationOfConstrainedMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testCascadedReturnValueValidationOfConstrainedMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testGettersAreNotValidatedByDefault()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testParameterValidationOfConstrainedConstructor()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testReturnValueValidationOfConstrainedConstructor()github
c)

By default, method validation is applied to all constrained methods or constructors provided the integration technology can intercept the call. By default, getters (as defined in 5.1) are not considered constrained methods.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testParameterValidationOfConstrainedMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testReturnValueValidationOfConstrainedMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testCascadedReturnValueValidationOfConstrainedMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testGettersAreNotValidatedByDefault()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testParameterValidationOfConstrainedConstructor()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testReturnValueValidationOfConstrainedConstructor()github
d)

Static methods are ignored by validation. Putting constraints on a static method is not portable.

e)Needs update

The executable is validated if it is annotated with @ValidateOnExecution and the type attribute contains the executable type or IMPLICIT. If the type attribute does neither contain the executable type nor IMPLICIT, the executable is not validated.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testValidationOfConstrainedMethodAnnotatedWithValidateOnExecutionContainingExecutableType()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testValidationOfConstrainedMethodAnnotatedWithValidateOnExecutionNotContainingExecutableType()github
f)

Otherwise the executable is validated if the type (class, interface) on which it is declared is annotated with @ValidateOnExecution and the type attribute contains the executable type. If the type attribute contains IMPLICIT, then this rule is ignored and the behavior is equivalent to @ValidateOnExecution not being present. If the type attribute does not contain the executable type, the executable is not validated.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testValidationOfConstrainedMethodOnClassAnnotatedWithValidateOnExecutionContainingExecutableType()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testValidationOfConstrainedMethodOnClassAnnotatedWithValidateOnExecutionNotContainingExecutableType()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testValidationOfConstrainedMethodOnInterfaceAnnotatedWithValidateOnExecutionContainingExecutableType()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testValidationOfConstrainedMethodOnInterfaceAnnotatedWithValidateOnExecutionNotContainingExecutableType()github
g)

Otherwise the executable is validated if the global executable validation setting contains the executable type. If the global setting does not contain the executable type, the executable is not validated.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.global
Test archive name: 54d0d635789723fddd9df84b187a3614c43a046
ExecutableValidationBasedOnGlobalConfigurationTest.testValidationOfConstrainedMethodOnTypeAnnotatedWithValidateOnExecutionNotContainingExecutableType()github
Test archive name: 54d0d635789723fddd9df84b187a3614c43a046
ExecutableValidationBasedOnGlobalConfigurationTest.testValidationOfConstrainedMethodOnTypeAnnotatedWithValidateOnExecutionContainingExecutableType()github
h)

The rules above do not apply to methods overriding a superclass method or implementing an interface method. In this case, the method inherits the behavior of the method it overrides / implements. Out of the box, a conforming integration implementation raises a ValidationException if the overriding / implementing method hosts the @ValidateOnExecution annotation.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testExecutableValidationUsesDefaultSettingSinceValidatedMethodImplementsAnInterfaceMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testExecutableValidationUsesSettingFromSuperTypeMethodIfValidatedMethodImplementsAnInterfaceMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testExecutableValidationUsesSettingFromSuperTypeIfValidatedMethodImplementsAnInterfaceMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testExecutableValidationUsesDefaultSettingIfValidatedMethodOverridesASuperTypeMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testExecutableValidationUsesSettingFromSuperTypeMethodIfValidatedMethodOverridesASuperTypeMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testExecutableValidationUsesSettingFromSuperTypeIfValidatedMethodOverridesASuperTypeMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testExecutableValidationUsesSettingFromHighestMethodInHierarchyIfValidatedMethodImplementsAnInterfaceMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testExecutableValidationUsesSettingFromSuperTypeForOverriddenMethodsAndLocalSettingForNonOverriddenMethod()github
i)

NONE: parameters and return values are not validated upon execution. This option is equivalent to an empty list of executable types and is present to improve readability. A list containing NONE and other types of executables is equivalent to a list containing the types of executables without NONE.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.types
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedMethodWithExecutableTypeNONE()github
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedMethodWithEmptyExecutableTypes()github
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedMethodWithExecutableTypeNONEAndOther()github
j)

CONSTRUCTORS: parameters and return values are validated provided the executable is a constructor.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.types
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedConstructorParametersWithExecutableTypeCONSTRUCTORS()github
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedConstructorReturnValueWithExecutableTypeCONSTRUCTORS()github
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedConstructorWithoutExecutableTypeCONSTRUCTORS()github
k)

NONGETTERMETHODS: parameters and return values are validated provided the executable is a method but not a getter.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.types
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedMethodParametersWithExecutableTypeNON_GETTER_METHODS()github
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedMethodReturnValueWithExecutableTypeNON_GETTER_METHODS()github
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedGetterWithExecutableTypeNON_GETTER_METHODS()github
l)

GETTER_METHODS: return values are validated provided the executable is a getter method.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.types
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedGetterReturnValueWithExecutableTypeGETTER_METHODS()github
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedMethodWithExecutableTypeGETTER_METHODS()github
m)

ALL: parameters and return values are validated for all executables (getters, non getters and constructors). This option is equivalent to a list of all executable types and is present to improve readability. A list containing ALL and other types of executables is equivalent to a list containing only ALL.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.types
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedMethodWithExecutableTypeALL()github
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedGetterWithExecutableTypeALL()github
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedConstructorWithExecutableTypeALL()github
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedMethodWithExecutableTypesALLAndNONE()github
n)

IMPLICIT: if @ValidateOnExecution is on a type (class or interface), then it is equivalent to @ValidateOnExecution not being present; if @ValidateOnExecution is on a an executable, the following applies

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.types
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedMethodWithExecutableTypeIMPLICIT()github
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedGetterWithExecutableTypeIMPLICIT()github
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedGetterWithExecutableTypeIMPLICITOnTypeLevel()github
Test archive name: 5ce40924f84d6219c3b17d8efd9242930a9785b
ExecutableTypesTest.testValidationOfConstrainedConstructorWithExecutableTypeIMPLICIT()github
o)

Mixing IMPLICIT and other executable types is illegal.

p)

If a sub type overrides/implements a method originally defined in several parallel types of the hierarchy (e.g. two interfaces not extending each other, or a class and an interface not implemented by said class), @ValidateOnExecution cannot be placed in the parallel types of the hierarchy.

q)

You can globally disable executable validation by using <executable-validation enabled="false"/>, in this case, <default-validated-executable-types/> and @ValidateOnExecution are ignored.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.globallydisabled
Test archive name: 1144cb23bef6951a01f7bbaa058469b889fa476
ExecutableValidationGloballyDisabledTest.testExecutableValidationGloballyTurnedOff()github

Section 11.2 - Java EE [integration-javaee]

a)

Java EE must obey the rules defined above and make the following instances available under JNDI: ValidatorFactory under java:comp/ValidatorFactory Validator under java:comp/Validator

Coverage

org.hibernate.beanvalidation.tck.tests.integration.ee
Test archive name: 79e31b7456f87d6c1460e3407b718bb9ceed9245
JndiRetrievalTest.testDefaultValidatorFactoryCanBeRetrievedFromJndi()github
Test archive name: 79e31b7456f87d6c1460e3407b718bb9ceed9245
JndiRetrievalTest.testDefaultValidatorCanBeRetrievedFromJndi()github
b)

Instead of looking the instances up via JNDI, the user can request them to be injected via the Resource annotation

Coverage

org.hibernate.beanvalidation.tck.tests.integration.ee
Test archive name: 36bc642966512c2e2ba18ae75f4b6944882f534c
DefaultInjectionTest.testDefaultValidatorFactoryGetsInjectedAtResource()github
Test archive name: 36bc642966512c2e2ba18ae75f4b6944882f534c
DefaultInjectionTest.testDefaultValidatorGetsInjectedWithAtResource()github
c)

When the application is CDI enabled, the ValidatorFactory and Validator instances returned by JNDI or @Resource injection are CDI enhanced as defined in 11.3.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.ee.cdi
Test archive name: 859550fa1f0acbfb2b4da3c1c3da72c9ddec790
ConstraintValidatorInjectionTest.testJndiBoundValidatorFactoryIsCdiEnabled()github

Section 11.3 - Context and Dependency Injection (CDI) integration [integration-cdi]

a)

Bean Validation provider must integrate with CDI.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.defaultinjection
Test archive name: 1fc5eedb9856edde79bd91247f566e95e4bfe6ee
DefaultInjectionTest.testDefaultValidatorFactoryGetsInjected()github
Test archive name: 1fc5eedb9856edde79bd91247f566e95e4bfe6ee
DefaultInjectionTest.testDefaultValidatorGetsInjected()github
org.hibernate.beanvalidation.tck.tests.integration.cdi.executable
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testParameterValidationOfConstrainedMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testReturnValueValidationOfConstrainedMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testCascadedReturnValueValidationOfConstrainedMethod()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testGettersAreNotValidatedByDefault()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testParameterValidationOfConstrainedConstructor()github
Test archive name: c0ca40b8fa44ccaae7fc95403cd9a23bf4b732ee
ExecutableValidationTest.testReturnValueValidationOfConstrainedConstructor()github
org.hibernate.beanvalidation.tck.tests.integration.cdi.managedobjects
Test archive name: 87579bd8af3dbc7746cb07fcb99ea93334b8fa
ManagedValueExtractorsTest.testValueExtractorsAreSubjectToDependencyInjection()github
Test archive name: a8ccde56a1a87ac0572c0c66eed454446b8885
ManagedObjectsTest.testMessageInterpolatorIsSubjectToDependencyInjection()github
Test archive name: a8ccde56a1a87ac0572c0c66eed454446b8885
ManagedObjectsTest.testTraversableResolverIsSubjectToDependencyInjection()github
Test archive name: a8ccde56a1a87ac0572c0c66eed454446b8885
ManagedObjectsTest.testConstraintValidatorFactoryIsSubjectToDependencyInjection()github
Test archive name: a8ccde56a1a87ac0572c0c66eed454446b8885
ManagedObjectsTest.testParameterNameProviderIsSubjectToDependencyInjection()github
Test archive name: a8ccde56a1a87ac0572c0c66eed454446b8885
ManagedObjectsTest.testClockProviderIsSubjectToDependencyInjection()github
org.hibernate.beanvalidation.tck.tests.integration.cdi.factory
Test archive name: 182ca962d5b396944ba1ca59673bda64313ba0
ConstraintValidatorInjectionTest.testDependencyInjectionIntoConstraintValidator()github
org.hibernate.beanvalidation.tck.tests.integration.ee.cdi
Test archive name: 859550fa1f0acbfb2b4da3c1c3da72c9ddec790
ConstraintValidatorInjectionTest.testJndiBoundValidatorFactoryIsCdiEnabled()github

Section 11.3.1 - ValidatorFactory and Validator [integration-cdi-validatorfactory]

a)

Similar to the Java EE integration via @Resource (see 11.2), a CDI container must support injection of built-in default ValidatorFactory and Validator beans via @Inject. These default beans are injectable via the @Default qualifier.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.defaultinjection
Test archive name: 1fc5eedb9856edde79bd91247f566e95e4bfe6ee
DefaultInjectionTest.testDefaultValidatorFactoryGetsInjected()github
Test archive name: 1fc5eedb9856edde79bd91247f566e95e4bfe6ee
DefaultInjectionTest.testQualifiedDefaultValidatorFactoryGetsInjected()github
Test archive name: 1fc5eedb9856edde79bd91247f566e95e4bfe6ee
DefaultInjectionTest.testDefaultValidatorGetsInjected()github
Test archive name: 1fc5eedb9856edde79bd91247f566e95e4bfe6ee
DefaultInjectionTest.testQualifiedDefaultValidatorGetsInjected()github

Section 11.3.2 - ConstraintValidatorFactory, MessageInterpolator, ParameterNameProvider, ClockProvider, TraversableResolver and ValueExtractor [integration-cdi-customconfiguration]

a)

If custom ConstraintValidatorFactory, MessageInterpolator, ParameterNameProvider, ClockProvider, TraversableResolver or ValueExtractor classes are defined in the XML deployment descriptor (see 6.5.6), the ValidatorFactory must be configured with CDI managed beans representing the requested classes. Services like dependency injection, interception and decoration must thus be made available to these instances by the container.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.managedobjects
Test archive name: 87579bd8af3dbc7746cb07fcb99ea93334b8fa
ManagedValueExtractorsTest.testValueExtractorsAreSubjectToDependencyInjection()github
Test archive name: a8ccde56a1a87ac0572c0c66eed454446b8885
ManagedObjectsTest.testMessageInterpolatorIsSubjectToDependencyInjection()github
Test archive name: a8ccde56a1a87ac0572c0c66eed454446b8885
ManagedObjectsTest.testTraversableResolverIsSubjectToDependencyInjection()github
Test archive name: a8ccde56a1a87ac0572c0c66eed454446b8885
ManagedObjectsTest.testConstraintValidatorFactoryIsSubjectToDependencyInjection()github
Test archive name: a8ccde56a1a87ac0572c0c66eed454446b8885
ManagedObjectsTest.testParameterNameProviderIsSubjectToDependencyInjection()github
Test archive name: a8ccde56a1a87ac0572c0c66eed454446b8885
ManagedObjectsTest.testClockProviderIsSubjectToDependencyInjection()github
b)

The same applies to value extractors discovered through the service loader mechanism (see 5.7.5.1).

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.managedobjects
Test archive name: 768197edcceac25824dd80b94336f7bea5d6a138
ManagedServiceLoaderValueExtractorsTest.testServiceLoaderValueExtractorsAreSubjectToDependencyInjection()github
Test archive name: d3c758349abcc948081654b51cccc5b50545f
ManagedXmlAndServiceLoaderValueExtractorsTest.testValueExtractorsAreSubjectToDependencyInjection()github
c)

If no custom ConstraintValidatorFactory is requested by the user, the ValidatorFactory must be configured with a custom ConstraintValidatorFactory instance that returns CDI managed beans representing the requested ConstraintValidator types. The factory creates non-contextual ConstraintValidator instances for each ConstraintValidatorFactory.getInstance() call. To inject dependencies into the ConstraintValidator instance, the CDI InjectionTarget API should be used. Before returning the instance the following calls should be made: InjectionTarget.produce(), InjectionTarget.inject() and InjectionTarget.postConstruct(). calls InjectionTarget.preDestroy() and InjectionTarget.dispose() upon ConstraintValidatorFactory.releaseInstance (see also 3.5 for more information about the lifecycle of a ConstraintValidator).

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.factory
Test archive name: 182ca962d5b396944ba1ca59673bda64313ba0
ConstraintValidatorInjectionTest.testDependencyInjectionIntoConstraintValidator()github
d)

Using directly or indirectly a JPA EntityManager that might call back Bean Validation for validation is not allowed in the Bean Validation extension points and in ConstraintValidator instances. This would lead to infinite flush or unexpected behavior.

Section 11.3.3 - Method and constructor validation [integration-cdi-methodconstructorvalidation]

a)

Bean Validation requires that CDI beans support constructor and method validation as defined in 11.1.2. Validation must happen at the equivalent time an interceptor occurs when having priority Interceptor.Priority.PLATFORM_AFTER+800, in other words priority of 4800.

Coverage

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.priority
Test archive name: a5e84f7435141c1a1e564a9327862128ac9d0c2
ValidationInterceptorPriorityTest.testValidationInterceptorHasPriority4800()github
b)

For maximum portability, it is recommended to mark CDI bean interfaces and classes involved in executable validation with @ValidateOnExecution (defaults to IMPLICIT). This helps some implementations to bind the method validation interceptor. Most CDI - Bean Validation integration implementations do not need such marker. In particular this marker should not be needed on validated beans annotated with constraint annotations, @Valid or @ValidateOnExecution anywhere in the class. Such limitation will be removed in a future version of this specification.