feat: Replace Moq and FluentAssertions with NSubstitute and Shouldly in test projects

This commit is contained in:
MaddoScientisto 2026-03-12 19:40:58 +01:00
commit 41d9dacfac
6 changed files with 96 additions and 91 deletions

View file

@ -3,6 +3,7 @@ using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SixLabors.ImageSharp.PixelFormats;
using MaddoShared.ImageSharpTests.Helpers;
using Shouldly;
namespace MaddoShared.ImageSharpTests.Tests
{
@ -43,8 +44,8 @@ namespace MaddoShared.ImageSharpTests.Tests
// top band (upper 25%)
var topCount = PixelInspector.CountNonBackgroundPixels(outPath, 0, 0, 800, (int)(600 * 0.25), new Rgba32(255, 255, 255, 255), tolerance: 10);
Assert.IsTrue(bottomCount > 50, $"Expected text pixels in bottom band, found {bottomCount}");
Assert.IsTrue(bottomCount > topCount, "Expected more non-background pixels at bottom than top");
(bottomCount > 50).ShouldBeTrue($"Expected text pixels in bottom band, found {bottomCount}");
(bottomCount > topCount).ShouldBeTrue("Expected more non-background pixels at bottom than top");
}
}
}