use of org.openmrs.LocationAttributeType in project openmrs-core by openmrs.
the class LocationAttributeTypeValidatorTest method validate_shouldPassValidationIfAllRequiredFieldsHaveProperValues.
/**
* @see LocationAttributeTypeValidator#validate(Object,Errors)
*/
@Test
public void validate_shouldPassValidationIfAllRequiredFieldsHaveProperValues() {
LocationAttributeType type = new LocationAttributeType();
type.setName("name");
type.setDatatypeClassname("org.openmrs.customdatatype.datatype.FreeTextDatatype");
Errors errors = new BindException(type, "type");
new LocationAttributeTypeValidator().validate(type, errors);
Assert.assertFalse(errors.hasErrors());
}
Aggregations