use of org.kie.workbench.common.screens.datamodeller.model.persistence.Property in project kie-wb-common by kiegroup.
the class PersistenceDescriptorValidatorTest method testValidatePropertyWithMissingValue.
@Test
public void testValidatePropertyWithMissingValue() {
// add a property with no name
descriptor.getPersistenceUnit().addProperty(new Property("someName", null));
List<ValidationMessage> result = validator.validate(path, descriptor);
ValidationMessage expectedMessage;
// validation for the property with missing value should fail.
expectedMessage = PersistenceDescriptorValidationMessages.newWarningMessage(PersistenceDescriptorValidationMessages.PROPERTY_VALUE_EMPTY_ID, MessageFormat.format(PersistenceDescriptorValidationMessages.PROPERTY_VALUE_EMPTY, "someName"), "someName");
assertTrue(result.contains(expectedMessage));
}
Aggregations