/// <summary> /// Executes the code to be tested. /// </summary> protected override void Act() { var testObject = new RequiredCollectionTestObject { TestCollection = null }; var validator = new DataAnnotationsEntityValidator(); _actualResults = validator.ValidateObject(testObject); }
/// <summary> /// Executes the code to be tested. /// </summary> protected override void Act() { var testObject = new RequiredCollectionTestObject { TestCollection = new List <CollectionTestObject>() }; testObject.TestCollection.Add(new CollectionTestObject()); var validator = new DataAnnotationsEntityValidator(); _actualResults = validator.ValidateObject(testObject); }