Пример #1
0
        public void GetValidationResult_Should_ReturnValid()
        {
            var attribute = new SlugAttribute();

            var result = attribute.GetValidationResult("test-slug-10", new ValidationContext(this));

            result.Should().BeNull();
        }
Пример #2
0
        public void GetValidationResult_Should_ReturnInvalid_ForStringWithInvalidChar()
        {
            var attribute = new SlugAttribute();

            var result = attribute.GetValidationResult("test:slug", new ValidationContext(this));

            result.ErrorMessage.Should().NotBeNull();
        }