Skip to content

Commit

Permalink
Corrected unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Jan 30, 2025
1 parent 5648380 commit 42fc46e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public void ShouldThrowExceptionWhenPercentageIsNegative()
{
using var image = new MagickImage();

Assert.Throws<ArgumentException>("threshold", () => image.BlackThreshold(new Percentage(-1)));
Assert.Throws<ArgumentException>("threshold", () => image.WhiteThreshold(new Percentage(-1)));
}

[Fact]
Expand All @@ -33,10 +33,10 @@ public void ShouldMakePixelsAboveThresholdWhite()
public void ShouldThresholdTheSpecifiedChannel()
{
using var image = new MagickImage(Files.MagickNETIconPNG);
image.BlackThreshold(new Percentage(10), Channels.Green);
image.WhiteThreshold(new Percentage(10), Channels.Green);

ColorAssert.Equal(new MagickColor("#347bbd"), image, 43, 74);
ColorAssert.Equal(new MagickColor("#a8dff8"), image, 60, 74);
ColorAssert.Equal(new MagickColor("#34ffbd"), image, 43, 74);
ColorAssert.Equal(new MagickColor("#a8fff8"), image, 60, 74);
}
}
}

0 comments on commit 42fc46e

Please sign in to comment.