@Test public void hasErrorsTest() { ValidationResult errors = ValidationResult.errors(ERROR_MESSAGE_1); ValidationResult emptyErrors = ValidationResult.success(); assertTrue(errors.hasErrors()); assertFalse(emptyErrors.hasErrors()); }
public boolean hasErrors() { return !errors.isEmpty(); }
ValidationResult { public boolean hasErrors() { return !errors.isEmpty(); } }
ValidationResult { public boolean hasErrors() { return !errors.isEmpty(); } private  ValidationResult(); private  ValidationResult(Collection<String> errors, Collection<String> warnings); }
ValidationResult { public boolean hasErrors() { return !errors.isEmpty(); } private  ValidationResult(); private  ValidationResult(Collection<String> errors, Collection<String> warnings); static ValidationResult success(); static ValidationResult errors(Collection<String> errors); static ValidationResult errors(String... errors); static ValidationResult warnings(Collection<String> warnings); static ValidationResult warnings(String... warnings); static ValidationResult of(ValidationResult... validationResults); Collection<String> getErrors(); Collection<String> getWarnings(); boolean hasErrors(); boolean hasWarnings(); String combineErrorMessages(); String combineWarningMessages(); }
ValidationResult { public boolean hasErrors() { return !errors.isEmpty(); } private  ValidationResult(); private  ValidationResult(Collection<String> errors, Collection<String> warnings); static ValidationResult success(); static ValidationResult errors(Collection<String> errors); static ValidationResult errors(String... errors); static ValidationResult warnings(Collection<String> warnings); static ValidationResult warnings(String... warnings); static ValidationResult of(ValidationResult... validationResults); Collection<String> getErrors(); Collection<String> getWarnings(); boolean hasErrors(); boolean hasWarnings(); String combineErrorMessages(); String combineWarningMessages();  }