コード例 #1
0
        public void ShouldFailValidationOnNullModel()
        {
            var         validator = new SourceModelValidator();
            SourceModel model     = null;
            var         result    = validator.Validate(model);

            result.ShouldBeFalse();
        }
コード例 #2
0
        public void ShouldPassValidationOnNullModel()
        {
            var validator = new SourceModelValidator();
            var model     = new SourceModel {
                Items = new[] { "One", "Two" }
            };
            var result = validator.Validate(model);

            result.ShouldBeTrue();
        }