Beispiel #1
0
        public void ImageOptionsValidatorShouldBeSuccess_WhenCorrectInput()
        {
            options.Width  = "500";
            options.Height = "500";
            var result = OptionsValidator.ValidateImageOptions(options);

            result.IsSuccess.Should().BeTrue();
        }
Beispiel #2
0
        public void ImageOptionsValidatorShouldntBeSuccess_WhenNonIntegerImageSize(string width, string height)
        {
            options.Width  = width;
            options.Height = height;
            var result = OptionsValidator.ValidateImageOptions(options);

            result.IsSuccess.Should().BeFalse();
            result.Error.Should().Be("Incorrect image size.");
        }