Example #1
0
        public void FontOptionsValidatorShouldBeSuccess_WhenCorrectInput()
        {
            options.FontColor  = "argb(1,0,0,0)";
            options.FontFamily = "Arial";
            var result = OptionsValidator.ValidateFontOptions(options);

            result.IsSuccess.Should().BeTrue();
        }
Example #2
0
        public void FontOptionsValidatorShouldntBeSuccess_WhenIncorrectFamily()
        {
            options.FontColor  = "argb(1,0,0,0)";
            options.FontFamily = "NotAFamily";
            var result = OptionsValidator.ValidateFontOptions(options);

            result.IsSuccess.Should().BeFalse();
            result.Error.Should().Be($"Font family {options.FontFamily} doesn't exist.");
        }
Example #3
0
        public void FontOptionsValidatorShouldntBeSuccess_WhenIncorrectColor(string color)
        {
            options.FontColor  = color;
            options.FontFamily = "Arial";
            var result = OptionsValidator.ValidateFontOptions(options);

            result.IsSuccess.Should().BeFalse();
            result.Error.Should().Be("Incorrect font color.");
        }