Class AbstractConstraintTest

All Implemented Interfaces:
JaloSessionHolder
Direct Known Subclasses:
AbstractBundleValidationTest, AssertFalseConstraintTest, AssertTrueConstraintTest, AttributeConstraintConfigurationTest, AttributeConstraintTest, BeanShellConstraintValidationTest, CommonIntegrationValidationTest, ConstraintGroupModelTest, ConstraintServiceTest, ConstraintsIntegrationTest, CustomMessageValidationTest, DecimalMaxConstraintTest, DecimalMinConstraintTest, DigitsConstraintTest, DuplicatedConstraintsValidationTest, DynamicConstraintTest, FutureConstraintTest, GenericConstraintsTest, GenericConstraintsValidationTest, HybrisDecimalMaxConstraintTest, HybrisDecimalMinConstraintTest, HybrisEnumValueCodeConstraintTest, LocalizationAwareValidationServiceTest, MaxConstraintTest, MessageLocalizationTest, MinConstraintPojoTest, MinConstraintTest, NotNullConstraintTest, NullAndNoNullConstraintOnReferenceTypeTest, NullConstraintTest, PastConstraintTest, PatternConstraintTest, SharedSecretValidationTest, SizeConstraintTest, TypeConstraintTest, ValidationInterceptorTest, ValidationServiceIntegrationTest, XorNullReferenceConstraintTest

public abstract class AbstractConstraintTest extends ServicelayerTransactionalTest
Basis class for the single constraint (JSR 303) test. The needed services are provided and (IMPORTANT!!!) the validation engine is NOT! reloaded before each test.
  • Field Details

  • Constructor Details

    • AbstractConstraintTest

      public AbstractConstraintTest()
  • Method Details

    • resetConstraints

      public void resetConstraints()
    • calculateFractionPrecision

      protected double calculateFractionPrecision(double adjust)
    • checkException

      protected void checkException(Throwable exception, Class mainException, Class interceptor)
    • checkException

      protected void checkException(Throwable exception, Class mainException, Class innerException, Class interceptor)
    • checkException

      protected void checkException(Throwable exception, Class mainException, Class innerException, Class interceptor, boolean checkExactInnerException)
    • getDefaultMessage

      protected String getDefaultMessage(String key)
    • assertModelSavingExceptionWithMessageKey

      protected void assertModelSavingExceptionWithMessageKey(Exception msEx, Map<String,String> expectedConstraintViolations)
    • assertModelSavingExceptionWithEvaluatedMessage

      protected void assertModelSavingExceptionWithEvaluatedMessage(Exception msEx, Map<String,String> expectedConstraintViolations)
    • assertModelSavingExceptionWithEvaluatedMessage

      protected void assertModelSavingExceptionWithEvaluatedMessage(Exception msEx, String expectedMessageKey, String expectedPropertyType)
      Assert for an expected exception, expected evaluated for current locale message , expected Property/Type
    • assertModelSavingExceptionWithMessageKey

      protected void assertModelSavingExceptionWithMessageKey(Exception msEx, String expectedMessageKey, String expectedPropertyType)
      Assert for an expected exception, expected message key , expected Property/Type
    • assertTrimmedException

      protected void assertTrimmedException(Exception msEx, String key)
    • unloadEngine

      public void unloadEngine()