use of com.enonic.xp.schema.content.validator.ContentTypeValidationResult in project xp by enonic.
the class SuperTypeValidatorTest method validationResult.
@Test
public void validationResult() {
ContentTypeValidationResult validationResult1 = ContentTypeValidationResult.from(new ContentTypeValidationError("superType not found: superTypeName", ContentTypeName.media()));
ContentTypeValidationResult validationResult2 = ContentTypeValidationResult.from(Collections.singleton(new ContentTypeValidationError("superType not found: superTypeName", ContentTypeName.media())));
ContentTypeValidationResult validationResult3 = ContentTypeValidationResult.empty();
assertNotEquals(validationResult1, validationResult2);
assertNotEquals(validationResult1.hashCode(), validationResult2.hashCode());
assertFalse(validationResult3.hasErrors());
assertNotEquals(validationResult2.hashCode(), validationResult3.hashCode());
assertNotEquals(validationResult2.toString(), validationResult3.toString());
}
Aggregations