public void Should_not_have_error_when_pageSizeOptions_has_not_duplicate_items()
        {
            var model = new CategoryModel();

            model.PageSizeOptions = "1, 2, 3, 5, 9";
            _validator.ShouldNotHaveValidationErrorFor(x => x.PageSizeOptions, model);
        }
Example #2
0
        public void ShouldNotHaveErrorWhenPageSizeOptionsHasNotDuplicateItems()
        {
            var model = new CategoryModel
            {
                PageSizeOptions = "1, 2, 3, 5, 9"
            };

            _validator.ShouldNotHaveValidationErrorFor(x => x.PageSizeOptions, model);
        }
Example #3
0
 public void CategoryNameIsInAllowedRange_ShouldNotHaveError(int stringLength)
 {
     _validator.ShouldNotHaveValidationErrorFor(category => category.CategoryName, new string('a', stringLength));
 }