@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, validationServicedefaultLanguage, jaloSession| Constructor and Description |
|---|
CustomMessageValidationTest() |
| Modifier and Type | Method and Description |
|---|---|
protected <T> void |
checkViolations(String expectedMessage,
Set<HybrisConstraintViolation> constraintViolations) |
protected <T> boolean |
doesMessageExist(String expectedMessage,
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, importStream, importStream, isPrefetchModeNoneautowireProperties, getBeanName, prepareApplicationContextAndSessionfinish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivatedpublic 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(String expectedMessage, Set<HybrisConstraintViolation> constraintViolations)
protected <T> boolean doesMessageExist(String expectedMessage, Set<HybrisConstraintViolation> constraintViolations)
Copyright © 2017 SAP SE. All Rights Reserved.