Class AttributeConstraintInterceptorTest


  • @UnitTest
    public class AttributeConstraintInterceptorTest
    extends java.lang.Object
    This test tests the AttributeConstraint preparer and validator.
    • Constructor Detail

      • AttributeConstraintInterceptorTest

        public AttributeConstraintInterceptorTest()
    • Method Detail

      • init

        public void init()
        creating some dummy data.
      • testPreparerWithEmptyConstraint

        public void testPreparerWithEmptyConstraint()
                                             throws InterceptorException
        Testing Preparer with empty constraint. Expect: nothing changes.
        Throws:
        InterceptorException
      • testPreparerWithAttributeDescriptorOnly

        public void testPreparerWithAttributeDescriptorOnly()
                                                     throws InterceptorException
        Testing preparer, descriptor is set, other attributes filled with dummy data. Expect: descriptor overwrites all other fields.
        Throws:
        InterceptorException
      • testValidatorWithNullAnnotation

        public void testValidatorWithNullAnnotation()
        Testing validator with empty constraint. Expect: exception, annotation is not set.
      • testValidatorPojoFail2

        public void testValidatorPojoFail2()
                                    throws InterceptorException
        Test validator. Pojo is ok, attribute qualifier exists, but it is all lower case. Expect: exception.
        Throws:
        InterceptorException