Class AbstractConstraintTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.ServicelayerTest
de.hybris.platform.servicelayer.ServicelayerTransactionalTest
de.hybris.platform.validation.model.constraints.jsr303.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
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.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConstraintDaoprotected FlexibleSearchServiceprotected I18NServiceprotected ModelServiceprotected TypeServiceprotected ValidationServiceFields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importServiceFields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassertModelSavingExceptionWithEvaluatedMessage(Exception msEx, String expectedMessageKey, String expectedPropertyType) Assert for an expected exception, expected evaluated for current locale message , expected Property/Typeprotected voidassertModelSavingExceptionWithEvaluatedMessage(Exception msEx, Map<String, String> expectedConstraintViolations) protected voidassertModelSavingExceptionWithMessageKey(Exception msEx, String expectedMessageKey, String expectedPropertyType) Assert for an expected exception, expected message key , expected Property/Typeprotected voidassertModelSavingExceptionWithMessageKey(Exception msEx, Map<String, String> expectedConstraintViolations) protected voidassertTrimmedException(Exception msEx, String key) protected doublecalculateFractionPrecision(double adjust) protected voidcheckException(Throwable exception, Class mainException, Class interceptor) protected voidcheckException(Throwable exception, Class mainException, Class innerException, Class interceptor) protected voidcheckException(Throwable exception, Class mainException, Class innerException, Class interceptor, boolean checkExactInnerException) protected StringgetDefaultMessage(String key) voidvoidMethods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNoneMethods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSessionMethods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
Field Details
-
modelService
-
validationService
-
constraintDao
-
typeService
-
flexibleSearchService
-
i18nService
-
-
Constructor Details
-
AbstractConstraintTest
public AbstractConstraintTest()
-
-
Method Details
-
resetConstraints
public void resetConstraints() -
calculateFractionPrecision
protected double calculateFractionPrecision(double adjust) -
checkException
-
checkException
-
checkException
-
getDefaultMessage
-
assertModelSavingExceptionWithMessageKey
-
assertModelSavingExceptionWithEvaluatedMessage
-
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
-
unloadEngine
public void unloadEngine()
-