@Test public void should_return_reports_in_order_of_addition() { ValidationResult[] input = new ValidationResult[]{ new SuccessfulValidationResult("dummyEl", null) , new SuccessfulValidationResult("dummyEl", 1) , new FailedValidationResult(null) , new FailedValidationResult(null) }; for (ValidationResult result : input) { multipleValidationResults.add(result); } assertThat(multipleValidationResults, contains(input)); }
public void add(MultipleValidationResults multipleResults) { addAll(multipleResults.results); }
MultipleValidationResults extends ValidationResult implements Iterable<ValidationResult> { public void add(MultipleValidationResults multipleResults) { addAll(multipleResults.results); } }
MultipleValidationResults extends ValidationResult implements Iterable<ValidationResult> { public void add(MultipleValidationResults multipleResults) { addAll(multipleResults.results); }  }
MultipleValidationResults extends ValidationResult implements Iterable<ValidationResult> { public void add(MultipleValidationResults multipleResults) { addAll(multipleResults.results); }  @Override boolean hasErrors(); void add(MultipleValidationResults multipleResults); void add(ValidationResult singleResult); void addAll(Collection<ValidationResult> allResults); Iterator<ValidationResult> iterator(); ResultsIterable<SuccessfulValidationResult> goodResults(); ResultsIterable<FailedValidationResult> failures(); ResultsIterable<ExpressionRejectedByFilterResult> excluded(); @Override String toString(); }
MultipleValidationResults extends ValidationResult implements Iterable<ValidationResult> { public void add(MultipleValidationResults multipleResults) { addAll(multipleResults.results); }  @Override boolean hasErrors(); void add(MultipleValidationResults multipleResults); void add(ValidationResult singleResult); void addAll(Collection<ValidationResult> allResults); Iterator<ValidationResult> iterator(); ResultsIterable<SuccessfulValidationResult> goodResults(); ResultsIterable<FailedValidationResult> failures(); ResultsIterable<ExpressionRejectedByFilterResult> excluded(); @Override String toString();  }