public void TestValidationErrorsAreCollected()
        {
            IList persons = new ArrayList();

            persons.Add(new TestObject(null, 24));
            persons.Add(new TestObject("Goran Milosavljevic", 24));
            persons.Add(new TestObject("Ivan Cikic", 28));
            persons.Add(new TestObject(null, 20));

            RequiredValidator req = new RequiredValidator("Name", "true");

            req.Actions.Add(new ErrorMessageAction("1", new string[] { "firstProvider", "secondProvider" }));

            CollectionValidator validator = new CollectionValidator(true, true);

            validator.Validators.Add(req);

            IValidationErrors ve = new ValidationErrors();

            Assert.IsFalse(validator.Validate(persons, ve));
            Assert.IsFalse(ve.IsEmpty);
        }