From c061df958422b527edb5de248ad26fdb73f33e6f Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sun, 30 Aug 2020 13:04:03 +0200 Subject: [PATCH] Added unit tests for bokeh blur constructor --- .../Processors/Convolution/BokehBlurTest.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/ImageSharp.Tests/Processing/Processors/Convolution/BokehBlurTest.cs b/tests/ImageSharp.Tests/Processing/Processors/Convolution/BokehBlurTest.cs index 490a6ea493..50b8782e47 100644 --- a/tests/ImageSharp.Tests/Processing/Processors/Convolution/BokehBlurTest.cs +++ b/tests/ImageSharp.Tests/Processing/Processors/Convolution/BokehBlurTest.cs @@ -35,6 +35,19 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Convolution 0.02565295+0.01611732j 0.0153483+0.01605112j 0.00698622+0.01370844j 0.00135338+0.00998296j -0.00152245+0.00604545j -0.00227282+0.002851j ]]"; + [Theory] + [InlineData(-10, 2, 3f)] + [InlineData(-1, 2, 3f)] + [InlineData(0, 2, 3f)] + [InlineData(20, -1, 3f)] + [InlineData(20, -0, 3f)] + [InlineData(20, 4, -10f)] + [InlineData(20, 4, 0f)] + public void VerifyBokehBlurProcessorArguments_Fail(int radius, int components, float gamma) + { + Assert.Throws(() => new BokehBlurProcessor(radius, components, gamma)); + } + [Fact] public void VerifyComplexComponents() {