Exemple #1
0
            /// <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);
            }
Exemple #2
0
            /// <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);
            }