public void ValidateObject_Collects_Errors_From_All_Validators() { // Arrange var validator = new Validator(); object target = new object(); SetupValidators(validator, target, ValidationResult.Successful, FailedResult, AnotherFailedResult, ValidationResult.Successful); // Act ValidationResult result = validator.ValidateObject(target); // Assert Assert.IsFalse(result.IsValid); Assert.AreEqual(2, result.Errors.Count()); EnumerableAssert.ElementsMatch(new[] { FailedResult, AnotherFailedResult }, result.Errors, (e, a) => ReferenceEquals(e.Errors.First(), a)); }