Example #1
0
        public void Validate_RequiredCustomArrayFieldIsNull_ExceptionThrown()
        {
            // Assign
            var model = new TestModelRequiredCustomArray();

            // Act & Assert
            Assert.Throws <ModelValidationException>(() => _validator.Validate(model));
        }
Example #2
0
        public void Validate_RequiredCustomArrayFieldIsNotNull_NoExceptions()
        {
            // Assign
            var model = new TestModelRequiredCustomArray {
                Prop1 = new TestModelEMail[1] {
                    null
                }
            };

            // Act & Assert
            _validator.Validate(model);
        }