diff --git a/MaddoShared.ImageSharpTests/MaddoShared.ImageSharpTests.csproj b/MaddoShared.ImageSharpTests/MaddoShared.ImageSharpTests.csproj
index 0fc1d12..52f36f6 100644
--- a/MaddoShared.ImageSharpTests/MaddoShared.ImageSharpTests.csproj
+++ b/MaddoShared.ImageSharpTests/MaddoShared.ImageSharpTests.csproj
@@ -12,8 +12,8 @@
-
-
+
+
diff --git a/MaddoShared.ImageSharpTests/Tests/ImageResizingTests.cs b/MaddoShared.ImageSharpTests/Tests/ImageResizingTests.cs
index b4bb333..ddc75ce 100644
--- a/MaddoShared.ImageSharpTests/Tests/ImageResizingTests.cs
+++ b/MaddoShared.ImageSharpTests/Tests/ImageResizingTests.cs
@@ -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
{
@@ -36,8 +37,8 @@ namespace MaddoShared.ImageSharpTests.Tests
var outPath = Path.Combine(ws.DestDir.FullName, state.NomeFileBig);
using var outImg = SixLabors.ImageSharp.Image.Load(outPath);
- Assert.AreEqual(800, outImg.Width);
- Assert.AreEqual(600, outImg.Height);
+ outImg.Width.ShouldBe(800);
+ outImg.Height.ShouldBe(600);
}
}
}
diff --git a/MaddoShared.ImageSharpTests/Tests/TextPositioningTests.cs b/MaddoShared.ImageSharpTests/Tests/TextPositioningTests.cs
index 3724dde..c93460e 100644
--- a/MaddoShared.ImageSharpTests/Tests/TextPositioningTests.cs
+++ b/MaddoShared.ImageSharpTests/Tests/TextPositioningTests.cs
@@ -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");
}
}
}
diff --git a/MaddoShared.Tests/DataModelCharacterizationTests.cs b/MaddoShared.Tests/DataModelCharacterizationTests.cs
index 468e389..7ce601e 100644
--- a/MaddoShared.Tests/DataModelCharacterizationTests.cs
+++ b/MaddoShared.Tests/DataModelCharacterizationTests.cs
@@ -1,12 +1,12 @@
using System;
using System.Threading.Tasks;
-using FluentAssertions;
using ImageCatalog_2;
using ImageCatalog_2.Services;
using MaddoShared;
using Microsoft.Extensions.Logging;
-using Moq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NSubstitute;
+using Shouldly;
namespace MaddoShared.Tests;
@@ -22,41 +22,39 @@ public class DataModelCharacterizationTests
model.SelectSourceFolderCommand.Execute(null);
- raised.Should().BeTrue();
+ raised.ShouldBeTrue();
}
[TestMethod]
public async Task SaveSettingsToFileAsync_DelegatesToSettingsService()
{
- var settingsService = new Mock();
+ var settingsService = Substitute.For();
settingsService
- .Setup(s => s.SaveSettingsAsync(It.IsAny(), It.IsAny