diff --git a/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests.cs b/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests.cs deleted file mode 100644 index 645b7b1794..0000000000 --- a/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests.cs +++ /dev/null @@ -1,339 +0,0 @@ -// Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET. -// Licensed under the Apache License, Version 2.0. - -using System; -using ImageMagick; -using Xunit; - -namespace Magick.NET.Tests; - -public class ConvolveMatrixTests -{ - [Fact] - public void Constructor_OrderIsTooLow_ThrowsException() - { - Assert.Throws("order", () => - { - new ConvolveMatrix(0); - }); - } - - [Fact] - public void Constructor_OrderIsNotAnOddNumber_ThrowsException() - { - Assert.Throws("order", () => - { - new ConvolveMatrix(2); - }); - } - - [Fact] - public void Constructor_NotEnoughValues_ThrowsException() - { - Assert.Throws("values", () => - { - new ConvolveMatrix(3, 1.0); - }); - } - - [Fact] - public void Constructor_ValidOrder_PropertiesAreSet() - { - var matrix = new ConvolveMatrix(3, 0.0, 1.0, 2.0, 0.1, 1.1, 2.1, 0.2, 1.2, 2.2); - - Assert.Equal(3, matrix.Order); - Assert.Equal(0.0, matrix.GetValue(0, 0)); - Assert.Equal(1.0, matrix.GetValue(1, 0)); - Assert.Equal(2.0, matrix.GetValue(2, 0)); - Assert.Equal(0.1, matrix.GetValue(0, 1)); - Assert.Equal(1.1, matrix.GetValue(1, 1)); - Assert.Equal(2.1, matrix.GetValue(2, 1)); - Assert.Equal(0.2, matrix.GetValue(0, 2)); - Assert.Equal(1.2, matrix.GetValue(1, 2)); - Assert.Equal(2.2, matrix.GetValue(2, 2)); - } - - [Fact] - public void ConstructorWithValues_OrderIsTooLow_ThrowsException() - { - Assert.Throws("order", () => - { - new ConvolveMatrix(0, 1); - }); - } - - [Fact] - public void ConstructorWithValues_OrderIsNotAnOddNumber_ThrowsException() - { - Assert.Throws("order", () => - { - new ConvolveMatrix(2, 1, 2, 3, 4); - }); - } - - [Fact] - public void Indexer_XTooLow_ThrowsException() - { - Indexer_InvalidIndex_ThrowsException("x", -1, 0); - } - - [Fact] - public void Indexer_XTooHigh_ThrowsException() - { - Indexer_InvalidIndex_ThrowsException("x", 1, 0); - } - - [Fact] - public void Indexer_YTooLow_ThrowsException() - { - Indexer_InvalidIndex_ThrowsException("y", 0, -1); - } - - [Fact] - public void Indexer_YTooHigh_ThrowsException() - { - Indexer_InvalidIndex_ThrowsException("y", 0, 1); - } - - [Fact] - public void Indexer_ValidIndex_ReturnValue() - { - var matrix = new ConvolveMatrix(1, 8); - - Assert.Equal(8, matrix[0, 0]); - } - - [Fact] - public void GetValue_XTooLow_ThrowsException() - { - GetValue_InvalidIndex_ThrowsException("x", -1, 0); - } - - [Fact] - public void GetValue_XTooHigh_ThrowsException() - { - GetValue_InvalidIndex_ThrowsException("x", 1, 0); - } - - [Fact] - public void GetValue_YTooLow_ThrowsException() - { - GetValue_InvalidIndex_ThrowsException("y", 0, -1); - } - - [Fact] - public void GetValue_YTooHigh_ThrowsException() - { - GetValue_InvalidIndex_ThrowsException("y", 0, 1); - } - - [Fact] - public void GetValue_ValidIndex_ReturnValue() - { - var matrix = new ConvolveMatrix(1, 4); - - Assert.Equal(4, matrix.GetValue(0, 0)); - } - - [Fact] - public void SetColumn_YTooLow_ThrowsException() - { - SetColumn_InvalidColumn_ThrowsException(-1); - } - - [Fact] - public void SetColumn_YTooHigh_ThrowsException() - { - SetColumn_InvalidColumn_ThrowsException(2); - } - - [Fact] - public void SetColumn_ValuesIsNull_ThrowsException() - { - var matrix = new ConvolveMatrix(1); - - Assert.Throws("values", () => - { - matrix.SetColumn(0, null); - }); - } - - [Fact] - public void SetColumn_InvalidNumberOfValues_ThrowsException() - { - var matrix = new ConvolveMatrix(1); - - Assert.Throws("values", () => - { - matrix.SetColumn(0, 1, 2, 3); - }); - } - - [Fact] - public void SetColumn_CorrectNumberOfValues_SetsColumn() - { - var matrix = new ConvolveMatrix(3); - - matrix.SetColumn(1, 6, 8, 10); - Assert.Equal(0, matrix.GetValue(0, 0)); - Assert.Equal(0, matrix.GetValue(0, 1)); - Assert.Equal(0, matrix.GetValue(0, 2)); - Assert.Equal(6, matrix.GetValue(1, 0)); - Assert.Equal(8, matrix.GetValue(1, 1)); - Assert.Equal(10, matrix.GetValue(1, 2)); - Assert.Equal(0, matrix.GetValue(2, 0)); - Assert.Equal(0, matrix.GetValue(2, 1)); - Assert.Equal(0, matrix.GetValue(2, 2)); - } - - [Fact] - public void SetRow_XTooLow_ThrowsException() - { - SetRow_InvalidRow_ThrowsException(-1); - } - - [Fact] - public void SetRow_XTooHigh_ThrowsException() - { - SetRow_InvalidRow_ThrowsException(2); - } - - [Fact] - public void SetRowValuesIsNull_ThrowsException() - { - var matrix = new ConvolveMatrix(1); - - Assert.Throws("values", () => - { - matrix.SetRow(0, null); - }); - } - - [Fact] - public void SetRow_InvalidNumberOfValues_ThrowsException() - { - var matrix = new ConvolveMatrix(1); - - Assert.Throws("values", () => - { - matrix.SetRow(0, 1, 2, 3); - }); - } - - [Fact] - public void SetRow_CorrectNumberOfValues_SetsColumn() - { - var matrix = new ConvolveMatrix(3); - - matrix.SetRow(1, 6, 8, 10); - Assert.Equal(0, matrix.GetValue(0, 0)); - Assert.Equal(6, matrix.GetValue(0, 1)); - Assert.Equal(0, matrix.GetValue(0, 2)); - Assert.Equal(0, matrix.GetValue(1, 0)); - Assert.Equal(8, matrix.GetValue(1, 1)); - Assert.Equal(0, matrix.GetValue(1, 2)); - Assert.Equal(0, matrix.GetValue(2, 0)); - Assert.Equal(10, matrix.GetValue(2, 1)); - Assert.Equal(0, matrix.GetValue(2, 2)); - } - - [Fact] - public void SetValue_XTooLow_ThrowsException() - { - SetValue_InvalidIndex_ThrowsException("x", -1, 0); - } - - [Fact] - public void SetValue_XTooHigh_ThrowsException() - { - SetValue_InvalidIndex_ThrowsException("x", 1, 0); - } - - [Fact] - public void SetValue_YTooLow_ThrowsException() - { - SetValue_InvalidIndex_ThrowsException("y", 0, -1); - } - - [Fact] - public void SetValue_YTooHigh_ThrowsException() - { - SetValue_InvalidIndex_ThrowsException("y", 0, 1); - } - - [Fact] - public void SetValue_ValidIndex_SetsValue() - { - var matrix = new ConvolveMatrix(3); - - matrix.SetValue(1, 2, 1.5); - - Assert.Equal(0.0, matrix.GetValue(0, 0)); - Assert.Equal(0.0, matrix.GetValue(0, 1)); - Assert.Equal(0.0, matrix.GetValue(0, 2)); - Assert.Equal(0.0, matrix.GetValue(1, 0)); - Assert.Equal(0.0, matrix.GetValue(1, 1)); - Assert.Equal(1.5, matrix.GetValue(1, 2)); - Assert.Equal(0.0, matrix.GetValue(2, 0)); - Assert.Equal(0.0, matrix.GetValue(2, 1)); - Assert.Equal(0.0, matrix.GetValue(2, 2)); - } - - [Fact] - public void ToArray_ReturnsArray() - { - var matrix = new ConvolveMatrix(1, 6); - - Assert.Equal(new double[] { 6 }, matrix.ToArray()); - } - - private static void Indexer_InvalidIndex_ThrowsException(string paramName, int x, int y) - { - var matrix = new ConvolveMatrix(1); - - Assert.Throws(paramName, () => - { - var foo = matrix[x, y]; - }); - } - - private static void GetValue_InvalidIndex_ThrowsException(string paramName, int x, int y) - { - var matrix = new ConvolveMatrix(1); - - Assert.Throws(paramName, () => - { - matrix.GetValue(x, y); - }); - } - - private static void SetColumn_InvalidColumn_ThrowsException(int x) - { - var matrix = new ConvolveMatrix(1); - - Assert.Throws("x", () => - { - matrix.SetColumn(x, 1.0, 2.0); - }); - } - - private static void SetRow_InvalidRow_ThrowsException(int y) - { - var matrix = new ConvolveMatrix(1); - - Assert.Throws("y", () => - { - matrix.SetRow(y, 1.0, 2.0); - }); - } - - private static void SetValue_InvalidIndex_ThrowsException(string paramName, int x, int y) - { - var matrix = new ConvolveMatrix(1); - - Assert.Throws(paramName, () => - { - matrix.SetValue(x, y, 1); - }); - } -} diff --git a/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheConstructor.cs b/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheConstructor.cs new file mode 100644 index 0000000000..b6e5f33c33 --- /dev/null +++ b/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheConstructor.cs @@ -0,0 +1,76 @@ +// Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET. +// Licensed under the Apache License, Version 2.0. + +using System; +using ImageMagick; +using Xunit; + +namespace Magick.NET.Tests; + +public partial class ConvolveMatrixTests +{ + public class TheConstructor + { + [Fact] + public void ShouldThrowExceptionWhenOrderIsTooLow() + { + Assert.Throws("order", () => + { + new ConvolveMatrix(0); + }); + } + + [Fact] + public void ShouldThrowExceptionWhenOrderIsNotAnOddNumber() + { + Assert.Throws("order", () => + { + new ConvolveMatrix(2); + }); + } + + [Fact] + public void ShouldThrowExceptionWhenNotEnoughValuesAreProvided() + { + Assert.Throws("values", () => + { + new ConvolveMatrix(3, 1.0); + }); + } + + [Fact] + public void ShouldSetTheProperties() + { + var matrix = new ConvolveMatrix(3, 0.0, 1.0, 2.0, 0.1, 1.1, 2.1, 0.2, 1.2, 2.2); + + Assert.Equal(3, matrix.Order); + Assert.Equal(0.0, matrix.GetValue(0, 0)); + Assert.Equal(1.0, matrix.GetValue(1, 0)); + Assert.Equal(2.0, matrix.GetValue(2, 0)); + Assert.Equal(0.1, matrix.GetValue(0, 1)); + Assert.Equal(1.1, matrix.GetValue(1, 1)); + Assert.Equal(2.1, matrix.GetValue(2, 1)); + Assert.Equal(0.2, matrix.GetValue(0, 2)); + Assert.Equal(1.2, matrix.GetValue(1, 2)); + Assert.Equal(2.2, matrix.GetValue(2, 2)); + } + + [Fact] + public void ShouldThrowExceptionWhenOrderIsTooLowAndValuesAreProvided() + { + Assert.Throws("order", () => + { + new ConvolveMatrix(0, 1); + }); + } + + [Fact] + public void ShouldThrowExceptionWhenOrderIsNotAnOddNumberAndValuesAreProvided() + { + Assert.Throws("order", () => + { + new ConvolveMatrix(2, 1, 2, 3, 4); + }); + } + } +} diff --git a/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheGetValueMethod.cs b/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheGetValueMethod.cs new file mode 100644 index 0000000000..7fe115a9da --- /dev/null +++ b/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheGetValueMethod.cs @@ -0,0 +1,48 @@ +// Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET. +// Licensed under the Apache License, Version 2.0. + +using System; +using ImageMagick; +using Xunit; + +namespace Magick.NET.Tests; + +public partial class ConvolveMatrixTests +{ + public class TheGetValueMethod + { + [Fact] + public void ShouldThrowExceptionWhenXTooLow() + => TestThrowsException("x", -1, 0); + + [Fact] + public void ShouldThrowExceptionWhenXTooHigh() + => TestThrowsException("x", 1, 0); + + [Fact] + public void ShouldThrowExceptionWhenYTooLow() + => TestThrowsException("y", 0, -1); + + [Fact] + public void ShouldThrowExceptionWhenYTooHigh() + => TestThrowsException("y", 0, 1); + + [Fact] + public void ShouldReturnValueForValidIndexes() + { + var matrix = new ConvolveMatrix(1, 4); + + Assert.Equal(4, matrix.GetValue(0, 0)); + } + + private static void TestThrowsException(string paramName, int x, int y) + { + var matrix = new ConvolveMatrix(1); + + Assert.Throws(paramName, () => + { + matrix.GetValue(x, y); + }); + } + } +} diff --git a/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheIndexer.cs b/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheIndexer.cs new file mode 100644 index 0000000000..7e7dbb7539 --- /dev/null +++ b/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheIndexer.cs @@ -0,0 +1,48 @@ +// Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET. +// Licensed under the Apache License, Version 2.0. + +using System; +using ImageMagick; +using Xunit; + +namespace Magick.NET.Tests; + +public partial class ConvolveMatrixTests +{ + public class TheIndexer + { + [Fact] + public void ShouldThrowExceptionWhenXTooLow() + => TestThrowsException("x", -1, 0); + + [Fact] + public void ShouldThrowExceptionWhenXTooHigh() + => TestThrowsException("x", 1, 0); + + [Fact] + public void ShouldThrowExceptionWhenYTooLow() + => TestThrowsException("y", 0, -1); + + [Fact] + public void ShouldThrowExceptionWhenYTooHigh() + => TestThrowsException("y", 0, 1); + + [Fact] + public void ShouldReturnValueForValidIndexes() + { + var matrix = new ConvolveMatrix(1, 8); + + Assert.Equal(8, matrix[0, 0]); + } + + private static void TestThrowsException(string paramName, int x, int y) + { + var matrix = new ConvolveMatrix(1); + + Assert.Throws(paramName, () => + { + var foo = matrix[x, y]; + }); + } + } +} diff --git a/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheSetColumnMethod.cs b/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheSetColumnMethod.cs new file mode 100644 index 0000000000..0e2dbba246 --- /dev/null +++ b/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheSetColumnMethod.cs @@ -0,0 +1,65 @@ +// Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET. +// Licensed under the Apache License, Version 2.0. + +using System; +using ImageMagick; +using Xunit; + +namespace Magick.NET.Tests; + +public partial class ConvolveMatrixTests +{ + public class TheSetColumnMethod + { + [Fact] + public void ShouldThrowExceptionWhenXTooLow() + => TestThrowsException(-1); + + [Fact] + public void ShouldThrowExceptionWhenXTooHigh() + => TestThrowsException(2); + + [Fact] + public void ShouldThrowExceptionWhenValuesIsNull() + { + var matrix = new ConvolveMatrix(1); + + Assert.Throws("values", () => + { + matrix.SetColumn(0, null); + }); + } + + [Fact] + public void ShouldSetColumnForCorrectNumberOfValues() + { + var matrix = new ConvolveMatrix(3); + + matrix.SetColumn(1, 6, 8, 10); + Assert.Equal(0, matrix.GetValue(0, 0)); + Assert.Equal(0, matrix.GetValue(0, 1)); + Assert.Equal(0, matrix.GetValue(0, 2)); + Assert.Equal(6, matrix.GetValue(1, 0)); + Assert.Equal(8, matrix.GetValue(1, 1)); + Assert.Equal(10, matrix.GetValue(1, 2)); + Assert.Equal(0, matrix.GetValue(2, 0)); + Assert.Equal(0, matrix.GetValue(2, 1)); + Assert.Equal(0, matrix.GetValue(2, 2)); + } + + [Fact] + public void ShouldThrowExceptionForInvalidNumberOfValues() + { + var matrix = new ConvolveMatrix(1); + + Assert.Throws("values", () => { matrix.SetColumn(0, 1, 2, 3); }); + } + + private static void TestThrowsException(int x) + { + var matrix = new ConvolveMatrix(1); + + Assert.Throws("x", () => { matrix.SetColumn(x, 1.0, 2.0); }); + } + } +} diff --git a/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheSetRowMethod.cs b/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheSetRowMethod.cs new file mode 100644 index 0000000000..91be1a8714 --- /dev/null +++ b/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheSetRowMethod.cs @@ -0,0 +1,62 @@ +// Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET. +// Licensed under the Apache License, Version 2.0. + +using System; +using ImageMagick; +using Xunit; + +namespace Magick.NET.Tests; + +public partial class ConvolveMatrixTests +{ + public class TheSetRowMethod + { + [Fact] + public void ShouldThrowExceptionWhenYTooLow() + => TestThrowsException(-1); + + [Fact] + public void ShouldThrowExceptionWhenYTooHigh() + => TestThrowsException(2); + + [Fact] + public void ShouldThrowExceptionWhenValuesIsNull() + { + var matrix = new ConvolveMatrix(1); + + Assert.Throws("values", () => { matrix.SetRow(0, null); }); + } + + [Fact] + public void ShouldSetRowForCorrectNumberOfValues() + { + var matrix = new ConvolveMatrix(3); + + matrix.SetRow(1, 6, 8, 10); + Assert.Equal(0, matrix.GetValue(0, 0)); + Assert.Equal(6, matrix.GetValue(0, 1)); + Assert.Equal(0, matrix.GetValue(0, 2)); + Assert.Equal(0, matrix.GetValue(1, 0)); + Assert.Equal(8, matrix.GetValue(1, 1)); + Assert.Equal(0, matrix.GetValue(1, 2)); + Assert.Equal(0, matrix.GetValue(2, 0)); + Assert.Equal(10, matrix.GetValue(2, 1)); + Assert.Equal(0, matrix.GetValue(2, 2)); + } + + [Fact] + public void ShouldThrowExceptionForInvalidNumberOfValues() + { + var matrix = new ConvolveMatrix(1); + + Assert.Throws("values", () => { matrix.SetRow(0, 1, 2, 3); }); + } + + private static void TestThrowsException(int y) + { + var matrix = new ConvolveMatrix(1); + + Assert.Throws("y", () => { matrix.SetRow(y, 1.0, 2.0); }); + } + } +} diff --git a/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheSetValueMethod.cs b/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheSetValueMethod.cs new file mode 100644 index 0000000000..37869e13a9 --- /dev/null +++ b/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheSetValueMethod.cs @@ -0,0 +1,66 @@ +// Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET. +// Licensed under the Apache License, Version 2.0. + +using System; +using ImageMagick; +using Xunit; + +namespace Magick.NET.Tests; + +public partial class ConvolveMatrixTests +{ + public class TheSetValueMethod + { + [Fact] + public void ShouldThrowExceptionWhenXTooLow() + { + TestThrowsException("x", -1, 0); + } + + [Fact] + public void ShouldThrowExceptionWhenXTooHigh() + { + TestThrowsException("x", 1, 0); + } + + [Fact] + public void ShouldThrowExceptionWhenYTooLow() + { + TestThrowsException("y", 0, -1); + } + + [Fact] + public void ShouldThrowExceptionWhenYTooHigh() + { + TestThrowsException("y", 0, 1); + } + + [Fact] + public void ShouldSetTheValues() + { + var matrix = new ConvolveMatrix(3); + + matrix.SetValue(1, 2, 1.5); + + Assert.Equal(0.0, matrix.GetValue(0, 0)); + Assert.Equal(0.0, matrix.GetValue(0, 1)); + Assert.Equal(0.0, matrix.GetValue(0, 2)); + Assert.Equal(0.0, matrix.GetValue(1, 0)); + Assert.Equal(0.0, matrix.GetValue(1, 1)); + Assert.Equal(1.5, matrix.GetValue(1, 2)); + Assert.Equal(0.0, matrix.GetValue(2, 0)); + Assert.Equal(0.0, matrix.GetValue(2, 1)); + Assert.Equal(0.0, matrix.GetValue(2, 2)); + } + + private static void TestThrowsException(string paramName, int x, int y) + { + var matrix = new ConvolveMatrix(1); + + Assert.Throws(paramName, () => + { + matrix.SetValue(x, y, 1); + }); + } + } +} diff --git a/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheToArrayMethod.cs b/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheToArrayMethod.cs new file mode 100644 index 0000000000..fbb5c6eee5 --- /dev/null +++ b/tests/Magick.NET.Tests/Matrices/ConvolveMatrixTests/TheToArrayMethod.cs @@ -0,0 +1,21 @@ +// Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET. +// Licensed under the Apache License, Version 2.0. + +using ImageMagick; +using Xunit; + +namespace Magick.NET.Tests; + +public partial class ConvolveMatrixTests +{ + public class TheToArrayMethod + { + [Fact] + public void ShouldReturnArray() + { + var matrix = new ConvolveMatrix(1, 6); + + Assert.Equal(new double[] { 6 }, matrix.ToArray()); + } + } +} diff --git a/tests/Magick.NET.Tests/Matrices/MagickColorMatrixTests/TheSetColumnMethod.cs b/tests/Magick.NET.Tests/Matrices/MagickColorMatrixTests/TheSetColumnMethod.cs index f03608b0fd..d58503ff07 100644 --- a/tests/Magick.NET.Tests/Matrices/MagickColorMatrixTests/TheSetColumnMethod.cs +++ b/tests/Magick.NET.Tests/Matrices/MagickColorMatrixTests/TheSetColumnMethod.cs @@ -20,7 +20,7 @@ public void ShouldThrowExceptionWhenXTooHigh() => TestThrowsException(2); [Fact] - public void ShouldThrowExceptionWhenValuesIsNul() + public void ShouldThrowExceptionWhenValuesIsNull() { var matrix = new MagickColorMatrix(2); @@ -53,7 +53,7 @@ public void ShouldThrowExceptionForInvalidNumberOfValues() }); } - private void TestThrowsException(int x) + private static void TestThrowsException(int x) { var matrix = new MagickColorMatrix(2); diff --git a/tests/Magick.NET.Tests/Matrices/MagickColorMatrixTests/TheSetRowMethod.cs b/tests/Magick.NET.Tests/Matrices/MagickColorMatrixTests/TheSetRowMethod.cs index 69c933713e..f3876970a3 100644 --- a/tests/Magick.NET.Tests/Matrices/MagickColorMatrixTests/TheSetRowMethod.cs +++ b/tests/Magick.NET.Tests/Matrices/MagickColorMatrixTests/TheSetRowMethod.cs @@ -20,7 +20,7 @@ public void ShouldThrowExceptionWhenYTooHigh() => TestThrowsException(2); [Fact] - public void ShouldThrowExceptionWhenValuesIsNul() + public void ShouldThrowExceptionWhenValuesIsNull() { var matrix = new MagickColorMatrix(2); @@ -53,7 +53,7 @@ public void ShouldThrowExceptionForInvalidNumberOfValues() }); } - private void TestThrowsException(int y) + private static void TestThrowsException(int y) { var matrix = new MagickColorMatrix(2); diff --git a/tests/Magick.NET.Tests/Matrices/MagickColorMatrixTests/TheSetValueMethod.cs b/tests/Magick.NET.Tests/Matrices/MagickColorMatrixTests/TheSetValueMethod.cs index 6e92b66674..24788129f9 100644 --- a/tests/Magick.NET.Tests/Matrices/MagickColorMatrixTests/TheSetValueMethod.cs +++ b/tests/Magick.NET.Tests/Matrices/MagickColorMatrixTests/TheSetValueMethod.cs @@ -40,7 +40,7 @@ public void ShouldSetTheValues() Assert.Equal(0.0, matrix.GetValue(1, 1)); } - private void TestThrowsException(string paramName, int x, int y) + private static void TestThrowsException(string paramName, int x, int y) { var matrix = new MagickColorMatrix(2);