Mouse over QR Code test fixed
MODIFY
WalletWasabi.Tests/UnitTests/QrCode/QrCodeDecodingTests.cs
WalletWasabi.Tests/UnitTests/QrCode/QrCodeDecodingTests.cs
-using System;
-using System.Collections.Generic;
using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using Xunit;
using QRCodeDecoderLibrary;
using System.Drawing;
@@ -97,14 +93,14 @@ namespace WalletWasabi.Tests.UnitTests.QrCode
public void DecodePictureWithMouseOverTheQRCodeReturnsNull()
{
QRDecoder decoder = new();
+ string expectedOutput = "tb1qutgpgraaze3hqnvt2xyw5acsmd3urprk3ff27d";
- string path = Path.Combine(_commonPartialPath, "Mouse_over_the_QR-code.jpg");
+ string path = Path.Combine(_commonPartialPath, "mouseOverQR.jpg");
using Bitmap inputImage = new(path);
-
- //Returns null because of the mouse over the image
var dataCollection = decoder.SearchQrCodes(inputImage);
- Assert.Empty(dataCollection);
+ Assert.Single(dataCollection);
+ Assert.Equal(expectedOutput, dataCollection.First());
}
[Fact]

DELETE
WalletWasabi.Tests/UnitTests/QrCode/QrTestResources/Mouse_over_the_QR-code.jpg
WalletWasabi.Tests/UnitTests/QrCode/QrTestResources/Mouse_over_the_QR-code.jpg
Binary files a/WalletWasabi.Tests/UnitTests/QrCode/QrTestResources/Mouse_over_the_QR-code.jpg and /dev/null differ

ADD
WalletWasabi.Tests/UnitTests/QrCode/QrTestResources/mouseOverQR.jpg
WalletWasabi.Tests/UnitTests/QrCode/QrTestResources/mouseOverQR.jpg
Binary files /dev/null and b/WalletWasabi.Tests/UnitTests/QrCode/QrTestResources/mouseOverQR.jpg differ

MODIFY
WalletWasabi.Tests/WalletWasabi.Tests.csproj
WalletWasabi.Tests/WalletWasabi.Tests.csproj
<None Update="UnitTests\QrCode\QrTestResources\AddressTest2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
- <None Update="UnitTests\QrCode\QrTestResources\Mouse_over_the_QR-code.jpg">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ <None Update="UnitTests\QrCode\QrTestResources\mouseOverQR.jpg">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="UnitTests\QrCode\QrTestResources\NotBitcoinAddress.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

Mouse over QR Code test fixed