Class BeanShellConstraintValidationTest
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
de.hybris.platform.validation.services.integration.BeanShellConstraintValidationTest
- All Implemented Interfaces:
JaloSessionHolder
Test covering common cases of beanshell based validator.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.validation.model.constraints.jsr303.AbstractConstraintTest
AbstractConstraintTest.Constraint -
Field Summary
Fields inherited from class de.hybris.platform.validation.model.constraints.jsr303.AbstractConstraintTest
constraintDao, flexibleSearchService, i18nService, modelService, typeService, 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 TypeMethodDescriptionvoidvalidates customer instance if it suits such scriptvoidvalidates customer instance if it suits such scriptvoidvoidvoidthis case in future should be replaced with checking script validity after saving such constraint , so misspelled BSH scripts throwingEvalErrorwon't be savablevoidtests bindable application ctx objectMethods inherited from class de.hybris.platform.validation.model.constraints.jsr303.AbstractConstraintTest
assertModelSavingExceptionWithEvaluatedMessage, assertModelSavingExceptionWithEvaluatedMessage, assertModelSavingExceptionWithMessageKey, assertModelSavingExceptionWithMessageKey, assertTrimmedException, calculateFractionPrecision, checkException, checkException, checkException, getDefaultMessage, resetConstraints, unloadEngineMethods 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
-
Constructor Details
-
BeanShellConstraintValidationTest
public BeanShellConstraintValidationTest()
-
-
Method Details
-
testSimplePrintln
public void testSimplePrintln() -
testSimpleSlayerFetch
public void testSimpleSlayerFetch()tests bindable application ctx object -
testSimplePrintlnInvalidScript
public void testSimplePrintlnInvalidScript()this case in future should be replaced with checking script validity after saving such constraint , so misspelled BSH scripts throwingEvalErrorwon't be savable -
testSimpleCustomerNameCheck
public void testSimpleCustomerNameCheck()validates customer instance if it suits such scriptreturn (this.name != this.customerID);
-
testSimpleCustomerDateCheck
public void testSimpleCustomerDateCheck()validates customer instance if it suits such scriptreturn (this.creationDate.after(new Date());
-
testSimplePojoFieldCheck
public void testSimplePojoFieldCheck()
-