@IntegrationTest public class CustomMessageValidationTest extends AbstractConstraintTest
| Modifier and Type | Class and Description |
|---|---|
protected class |
CustomMessageValidationTest.PojoNonPrimitive |
protected class |
CustomMessageValidationTest.PojoPrimitive |
AbstractConstraintTest.ConstraintconstraintDao, flexibleSearchService, i18nService, modelService, typeService, validationServiceimportServicejaloSession| Constructor and Description |
|---|
CustomMessageValidationTest() |
| Modifier and Type | Method and Description |
|---|---|
protected <T> void |
checkViolations(java.lang.String expectedMessage,
java.util.Set<HybrisConstraintViolation> constraintViolations) |
protected <T> boolean |
doesMessageExist(java.lang.String expectedMessage,
java.util.Set<HybrisConstraintViolation> constraintViolations) |
void |
prepareConstraints() |
void |
testNonPrimitivePojo() |
void |
testPrimitivePojo() |
void |
validateCategoryModel() |
void |
validateProductModel()
Tests both constraint for
ProductModel not null for the ProductModel.CODE ,size constrain for a
ProductModel.NAME ( warn name must be not null ) |
void |
validateUnitModel()
Tests both constraint for
UnitModel not null for the UnitModel.CODE ,size constrain for a
UnitModel.NAME ( warn name must be not null ) |
assertModelSavingExceptionWithEvaluatedMessage, assertModelSavingExceptionWithEvaluatedMessage, assertModelSavingExceptionWithMessageKey, assertModelSavingExceptionWithMessageKey, assertTrimmedException, calculateFractionPrecision, checkException, checkException, getDefaultMessage, resetConstraints, unloadEnginecreateCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNoneautowireProperties, getBeanName, prepareApplicationContextAndSessionestablishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSessionpublic void prepareConstraints()
public void validateProductModel()
ProductModel not null for the ProductModel.CODE ,size constrain for a
ProductModel.NAME ( warn name must be not null )public void validateUnitModel()
UnitModel not null for the UnitModel.CODE ,size constrain for a
UnitModel.NAME ( warn name must be not null )public void validateCategoryModel()
public void testNonPrimitivePojo()
public void testPrimitivePojo()
protected <T> void checkViolations(java.lang.String expectedMessage,
java.util.Set<HybrisConstraintViolation> constraintViolations)
protected <T> boolean doesMessageExist(java.lang.String expectedMessage,
java.util.Set<HybrisConstraintViolation> constraintViolations)
Copyright © 2018 SAP SE. All Rights Reserved.