Skip to content

Commit

Permalink
Updated testcase for ArtQrCode with custom finder pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
codebude committed Apr 22, 2024
1 parent db84288 commit e094cd3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions QRCoderTests/ArtQRCodeRendererTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ public void can_create_standard_qrcode_graphic_with_custom_finder()
{
var gen = new QRCodeGenerator();
var data = gen.CreateQrCode("This is a quick test! 123#?", QRCodeGenerator.ECCLevel.H);
var finder = new Bitmap(15, 15);
var finder = new Bitmap(70, 70);
using (var g = Graphics.FromImage(finder))
{
g.FillRectangle(Brushes.Red, 0, 0, 70, 70);
}
var bmp = new ArtQRCode(data).GetGraphic(10, Color.Black, Color.White, Color.Transparent, finderPatternImage: finder);

var result = HelperFunctions.BitmapToHash(bmp);
result.ShouldBe("1102c0c6f235eaf4c3ac639f82f17bfa");
result.ShouldBe("5df3f2892eeb01e9c282ad10f642dec2");
}

[Fact]
Expand Down

0 comments on commit e094cd3

Please sign in to comment.