public void GetValidationResult_Should_ReturnValid() { var attribute = new SlugAttribute(); var result = attribute.GetValidationResult("test-slug-10", new ValidationContext(this)); result.Should().BeNull(); }
public void GetValidationResult_Should_ReturnInvalid_ForStringWithInvalidChar() { var attribute = new SlugAttribute(); var result = attribute.GetValidationResult("test:slug", new ValidationContext(this)); result.ErrorMessage.Should().NotBeNull(); }