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,NullConstraintTest,PastConstraintTest,PatternConstraintTest,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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractConstraintTest.Constraint
-
Field Summary
Fields Modifier and Type Field Description protected ConstraintDaoconstraintDaoprotected FlexibleSearchServiceflexibleSearchServiceprotected I18NServicei18nServiceprotected ModelServicemodelServiceprotected TypeServicetypeServiceprotected ValidationServicevalidationService-
Fields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importService
-
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession
-
-
Constructor Summary
Constructors Constructor Description AbstractConstraintTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassertModelSavingExceptionWithEvaluatedMessage(java.lang.Exception msEx, java.lang.String expectedMessageKey, java.lang.String expectedPropertyType)Assert for an expected exception, expected evaluated for current locale message , expected Property/Typeprotected voidassertModelSavingExceptionWithEvaluatedMessage(java.lang.Exception msEx, java.util.Map<java.lang.String,java.lang.String> expectedConstraintViolations)protected voidassertModelSavingExceptionWithMessageKey(java.lang.Exception msEx, java.lang.String expectedMessageKey, java.lang.String expectedPropertyType)Assert for an expected exception, expected message key , expected Property/Typeprotected voidassertModelSavingExceptionWithMessageKey(java.lang.Exception msEx, java.util.Map<java.lang.String,java.lang.String> expectedConstraintViolations)protected voidassertTrimmedException(java.lang.Exception msEx, java.lang.String key)protected doublecalculateFractionPrecision(double adjust)protected voidcheckException(java.lang.Throwable exception, java.lang.Class mainException, java.lang.Class interceptor)protected voidcheckException(java.lang.Throwable exception, java.lang.Class mainException, java.lang.Class innerException, java.lang.Class interceptor)protected voidcheckException(java.lang.Throwable exception, java.lang.Class mainException, java.lang.Class innerException, java.lang.Class interceptor, boolean checkExactInnerException)protected java.lang.StringgetDefaultMessage(java.lang.String key)voidresetConstraints()voidunloadEngine()-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNone
-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSession
-
Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
-
-
-
Field Detail
-
modelService
protected ModelService modelService
-
validationService
protected ValidationService validationService
-
constraintDao
protected ConstraintDao constraintDao
-
typeService
protected TypeService typeService
-
flexibleSearchService
protected FlexibleSearchService flexibleSearchService
-
i18nService
protected I18NService i18nService
-
-
Method Detail
-
resetConstraints
public void resetConstraints()
-
calculateFractionPrecision
protected double calculateFractionPrecision(double adjust)
-
checkException
protected void checkException(java.lang.Throwable exception, java.lang.Class mainException, java.lang.Class interceptor)
-
checkException
protected void checkException(java.lang.Throwable exception, java.lang.Class mainException, java.lang.Class innerException, java.lang.Class interceptor)
-
checkException
protected void checkException(java.lang.Throwable exception, java.lang.Class mainException, java.lang.Class innerException, java.lang.Class interceptor, boolean checkExactInnerException)
-
getDefaultMessage
protected java.lang.String getDefaultMessage(java.lang.String key)
-
assertModelSavingExceptionWithMessageKey
protected void assertModelSavingExceptionWithMessageKey(java.lang.Exception msEx, java.util.Map<java.lang.String,java.lang.String> expectedConstraintViolations)
-
assertModelSavingExceptionWithEvaluatedMessage
protected void assertModelSavingExceptionWithEvaluatedMessage(java.lang.Exception msEx, java.util.Map<java.lang.String,java.lang.String> expectedConstraintViolations)
-
assertModelSavingExceptionWithEvaluatedMessage
protected void assertModelSavingExceptionWithEvaluatedMessage(java.lang.Exception msEx, java.lang.String expectedMessageKey, java.lang.String expectedPropertyType)Assert for an expected exception, expected evaluated for current locale message , expected Property/Type
-
assertModelSavingExceptionWithMessageKey
protected void assertModelSavingExceptionWithMessageKey(java.lang.Exception msEx, java.lang.String expectedMessageKey, java.lang.String expectedPropertyType)Assert for an expected exception, expected message key , expected Property/Type
-
assertTrimmedException
protected void assertTrimmedException(java.lang.Exception msEx, java.lang.String key)
-
unloadEngine
public void unloadEngine()
-
-