From 8e8dca5051037cf79b103639d2d49d61bf1ef050 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 15:02:55 +0100 Subject: [PATCH 01/47] Add net6.0 and net8.0 moniker --- .github/workflows/build.yml | 1 + Directory.Build.props | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c024d502..a158ac99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,6 +28,7 @@ jobs: dotnet-version: | 3.1.x 6.0.x + 8.0.x - name: Build and Test run: dotnet test --logger "trx;LogFileName=test-results.trx" - name: Upload Test Results diff --git a/Directory.Build.props b/Directory.Build.props index 3d207d2b..7cb09e3d 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,5 +1,24 @@ + + CA1021;CA1040;CA1062;CA1505;CA1710;CA1711;CA1720;CA1721;CA1725;CS0672;SYSLIB0010;SYSLIB0013;VSTHRD103;$(NoWarn) + netcoreapp3.1;net6.0;net8.0 1.0.0 $(StatiqFrameworkVersion) $(Version) From 7d42fc158d8f0b2ef3ac9fe27e5e8168edc94790 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 15:04:03 +0100 Subject: [PATCH 02/47] Add net6.0 and net8.0 moniker --- Directory.Build.props | 1 - 1 file changed, 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 7cb09e3d..ede78102 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -39,7 +39,6 @@ true snupkg true - netcoreapp3.1 true NU1901;NU1902;NU1903;NU1904;CA1724 From eceac16c130db9e235ad8ea640a849279ab75acf Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 15:05:06 +0100 Subject: [PATCH 03/47] Update Microsoft.SourceLink.GitHub to 8.0.0 --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index ede78102..fbd12c94 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -47,7 +47,7 @@ - + From 37fa617f722ac166b06b3da2f5052dcdf21a555d Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 15:07:01 +0100 Subject: [PATCH 04/47] Update SharpZipLib to 1.4.2 --- src/extensions/Statiq.Xmp/Statiq.Xmp.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/Statiq.Xmp/Statiq.Xmp.csproj b/src/extensions/Statiq.Xmp/Statiq.Xmp.csproj index c17d2e92..6cfaf882 100644 --- a/src/extensions/Statiq.Xmp/Statiq.Xmp.csproj +++ b/src/extensions/Statiq.Xmp/Statiq.Xmp.csproj @@ -5,7 +5,7 @@ - + From 22035b17a62b920407981f41462d5eac120212d4 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 15:09:14 +0100 Subject: [PATCH 05/47] Fix tests that can break on non en-US i.e. lunar indexes --- .../Meta/TypeConversion/MetadataTypeConverter{T}.cs | 4 ++++ src/core/Statiq.Common/Meta/TypeHelper.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/Statiq.Common/Meta/TypeConversion/MetadataTypeConverter{T}.cs b/src/core/Statiq.Common/Meta/TypeConversion/MetadataTypeConverter{T}.cs index 9ccaae54..61017d8f 100644 --- a/src/core/Statiq.Common/Meta/TypeConversion/MetadataTypeConverter{T}.cs +++ b/src/core/Statiq.Common/Meta/TypeConversion/MetadataTypeConverter{T}.cs @@ -23,6 +23,10 @@ public override IEnumerable ToEnumerable(IEnumerable enumerable) => public static bool TryConvert(object value, out T result) => UniversalTypeConverter.TryConvertTo(value, out result); + // This is where the magic happens via https://github.com/t-bruning/UniversalTypeConverter + public static bool TryConvertInvariant(object value, out T result) => + UniversalTypeConverter.TryConvertTo(value, out result, System.Globalization.CultureInfo.InvariantCulture); + private static IEnumerable ConvertEnumerable(IEnumerable enumerable) { foreach (object value in enumerable) diff --git a/src/core/Statiq.Common/Meta/TypeHelper.cs b/src/core/Statiq.Common/Meta/TypeHelper.cs index d9fb1c9b..e49e5cf8 100644 --- a/src/core/Statiq.Common/Meta/TypeHelper.cs +++ b/src/core/Statiq.Common/Meta/TypeHelper.cs @@ -228,7 +228,7 @@ public static bool TryConvert(object value, out T result) } // Check a normal conversion (in case it's a special type that implements a cast, IConvertible, or something) - if (MetadataTypeConverter.TryConvert(value, out result)) + if (MetadataTypeConverter.TryConvertInvariant(value, out result)) { return true; } From ad2655ed0772e5c21a87f10903e3bbba815b1484 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 15:14:28 +0100 Subject: [PATCH 06/47] Update Microsoft.NET.Test.Sdk to 17.8.0 --- tests/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index aa2133cc..318adb3b 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -5,7 +5,7 @@ true - + \ No newline at end of file From a26ae1bb875a471e72aa3e826251ead50279ec3e Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 15:15:18 +0100 Subject: [PATCH 07/47] Update NUnit3TestAdapter to 4.5.0 --- tests/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index 318adb3b..ab1e9bd9 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -6,6 +6,6 @@ - + \ No newline at end of file From 0667acd3374d9fe087b27cc1b8721f49aa6d8eeb Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 15:33:36 +0100 Subject: [PATCH 08/47] Update Microsoft.CodeAnalysis.CSharp.Scripting to 4.7.0 --- src/core/Statiq.App/Statiq.App.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Statiq.App/Statiq.App.csproj b/src/core/Statiq.App/Statiq.App.csproj index 65d025a2..fe30db5a 100644 --- a/src/core/Statiq.App/Statiq.App.csproj +++ b/src/core/Statiq.App/Statiq.App.csproj @@ -11,7 +11,7 @@ - + From 876088db98d762194ada97ebf1803d8d3270f175 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 15:35:14 +0100 Subject: [PATCH 09/47] Update Microsoft.CodeAnalysis.CSharp to 4.7.0 --- src/core/Statiq.Core/Statiq.Core.csproj | 2 +- .../Statiq.CodeAnalysis.Tests/AnalyzeCSharpTypesFixture.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/Statiq.Core/Statiq.Core.csproj b/src/core/Statiq.Core/Statiq.Core.csproj index b2de0e47..8496f0d9 100644 --- a/src/core/Statiq.Core/Statiq.Core.csproj +++ b/src/core/Statiq.Core/Statiq.Core.csproj @@ -7,7 +7,7 @@ - + diff --git a/tests/extensions/Statiq.CodeAnalysis.Tests/AnalyzeCSharpTypesFixture.cs b/tests/extensions/Statiq.CodeAnalysis.Tests/AnalyzeCSharpTypesFixture.cs index bf765484..f6534231 100644 --- a/tests/extensions/Statiq.CodeAnalysis.Tests/AnalyzeCSharpTypesFixture.cs +++ b/tests/extensions/Statiq.CodeAnalysis.Tests/AnalyzeCSharpTypesFixture.cs @@ -435,7 +435,7 @@ enum Yellow // Then results.Single(x => x["Name"].Equals("Green"))["SpecificKind"].ShouldBe("Class"); results.Single(x => x["Name"].Equals("Blue"))["SpecificKind"].ShouldBe("Class"); - results.Single(x => x["Name"].Equals("Red"))["SpecificKind"].ShouldBe("Structure"); + results.Single(x => x["Name"].Equals("Red"))["SpecificKind"].ShouldBe("Struct"); results.Single(x => x["Name"].Equals("Yellow"))["SpecificKind"].ShouldBe("Enum"); } From 1f962e693e676f598b8c7739c30b2f6d288552d7 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 15:38:28 +0100 Subject: [PATCH 10/47] Update System.Collections.Immutable to 7.0.0 --- src/core/Statiq.Core/Statiq.Core.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Statiq.Core/Statiq.Core.csproj b/src/core/Statiq.Core/Statiq.Core.csproj index 8496f0d9..c5cb1088 100644 --- a/src/core/Statiq.Core/Statiq.Core.csproj +++ b/src/core/Statiq.Core/Statiq.Core.csproj @@ -12,7 +12,7 @@ - + From d8e0e8a1b2542b86311f1b9ed6dc838bbde65447 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 15:43:37 +0100 Subject: [PATCH 11/47] Address breaking change in code analysis --- .../Statiq.CodeAnalysis.Tests/AnalyzeCSharpTypesFixture.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/extensions/Statiq.CodeAnalysis.Tests/AnalyzeCSharpTypesFixture.cs b/tests/extensions/Statiq.CodeAnalysis.Tests/AnalyzeCSharpTypesFixture.cs index f6534231..ce7de2c8 100644 --- a/tests/extensions/Statiq.CodeAnalysis.Tests/AnalyzeCSharpTypesFixture.cs +++ b/tests/extensions/Statiq.CodeAnalysis.Tests/AnalyzeCSharpTypesFixture.cs @@ -435,7 +435,11 @@ enum Yellow // Then results.Single(x => x["Name"].Equals("Green"))["SpecificKind"].ShouldBe("Class"); results.Single(x => x["Name"].Equals("Blue"))["SpecificKind"].ShouldBe("Class"); +#if NET8_0_OR_GREATER results.Single(x => x["Name"].Equals("Red"))["SpecificKind"].ShouldBe("Struct"); +#else + results.Single(x => x["Name"].Equals("Red"))["SpecificKind"].ShouldBe("Structure"); +#endif results.Single(x => x["Name"].Equals("Yellow"))["SpecificKind"].ShouldBe("Enum"); } From 2a423e590b119302087f97eb260ae792c0b64da0 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 15:54:46 +0100 Subject: [PATCH 12/47] Drop netcoreapp3.1, dropped by transient dependencies i.e. System.Reflection.MetaData, System.Text.Encoding, etc. --- Directory.Build.props | 4 ++-- tests/core/TestConsoleApp/TestConsoleApp.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index fbd12c94..f18d474a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -18,7 +18,7 @@ SYSLIB0010: 'MarshalByRefObject.InitializeLifetimeService()' is obsolete: 'This Remoting API is not supported and throws PlatformNotSupportedException.' --> CA1021;CA1040;CA1062;CA1505;CA1710;CA1711;CA1720;CA1721;CA1725;CS0672;SYSLIB0010;SYSLIB0013;VSTHRD103;$(NoWarn) - netcoreapp3.1;net6.0;net8.0 + net6.0;net8.0 1.0.0 $(StatiqFrameworkVersion) $(Version) @@ -49,7 +49,7 @@ - + diff --git a/tests/core/TestConsoleApp/TestConsoleApp.csproj b/tests/core/TestConsoleApp/TestConsoleApp.csproj index c73e0d16..921b61b6 100644 --- a/tests/core/TestConsoleApp/TestConsoleApp.csproj +++ b/tests/core/TestConsoleApp/TestConsoleApp.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net6.0;net8.0 From b7c864fd1e16f1d9637907a7dc384c6eb36d9dd1 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 16:09:38 +0100 Subject: [PATCH 13/47] Update Microsoft.Extensions.* to 6.0.x & 8.0.0 --- src/core/Statiq.App/Statiq.App.csproj | 25 +++++++++++++------ src/core/Statiq.Common/Statiq.Common.csproj | 19 ++++++++++---- src/core/Statiq.Core/Statiq.Core.csproj | 7 +++++- src/core/Statiq.Testing/Statiq.Testing.csproj | 11 +++++--- .../Statiq.Razor/Statiq.Razor.csproj | 13 +++++++--- .../Statiq.Common.Tests.csproj | 7 ++++-- .../Statiq.Core.Tests.csproj | 7 ++++-- 7 files changed, 66 insertions(+), 23 deletions(-) diff --git a/src/core/Statiq.App/Statiq.App.csproj b/src/core/Statiq.App/Statiq.App.csproj index fe30db5a..15d45f5d 100644 --- a/src/core/Statiq.App/Statiq.App.csproj +++ b/src/core/Statiq.App/Statiq.App.csproj @@ -12,18 +12,29 @@ - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/src/core/Statiq.Common/Statiq.Common.csproj b/src/core/Statiq.Common/Statiq.Common.csproj index 3b1aa596..4ddba87e 100644 --- a/src/core/Statiq.Common/Statiq.Common.csproj +++ b/src/core/Statiq.Common/Statiq.Common.csproj @@ -6,13 +6,22 @@ - - - - - + + + + + + + + + + + + + + <_Parameter1>Statiq.Core diff --git a/src/core/Statiq.Core/Statiq.Core.csproj b/src/core/Statiq.Core/Statiq.Core.csproj index c5cb1088..016013fd 100644 --- a/src/core/Statiq.Core/Statiq.Core.csproj +++ b/src/core/Statiq.Core/Statiq.Core.csproj @@ -8,13 +8,18 @@ - + + + + + + diff --git a/src/core/Statiq.Testing/Statiq.Testing.csproj b/src/core/Statiq.Testing/Statiq.Testing.csproj index 2405d486..03661bdf 100644 --- a/src/core/Statiq.Testing/Statiq.Testing.csproj +++ b/src/core/Statiq.Testing/Statiq.Testing.csproj @@ -4,14 +4,19 @@ Statiq Static StaticContent StaticSite Blog BlogEngine - - build - + + + + + + + + diff --git a/src/extensions/Statiq.Razor/Statiq.Razor.csproj b/src/extensions/Statiq.Razor/Statiq.Razor.csproj index 0e62bdfa..8ad62053 100644 --- a/src/extensions/Statiq.Razor/Statiq.Razor.csproj +++ b/src/extensions/Statiq.Razor/Statiq.Razor.csproj @@ -11,9 +11,16 @@ - - - + + + + + + + + + + diff --git a/tests/core/Statiq.Common.Tests/Statiq.Common.Tests.csproj b/tests/core/Statiq.Common.Tests/Statiq.Common.Tests.csproj index 1b5f8fed..0ffcd293 100644 --- a/tests/core/Statiq.Common.Tests/Statiq.Common.Tests.csproj +++ b/tests/core/Statiq.Common.Tests/Statiq.Common.Tests.csproj @@ -4,8 +4,11 @@ - - + + + + + diff --git a/tests/core/Statiq.Core.Tests/Statiq.Core.Tests.csproj b/tests/core/Statiq.Core.Tests/Statiq.Core.Tests.csproj index 17cb182c..d081975a 100644 --- a/tests/core/Statiq.Core.Tests/Statiq.Core.Tests.csproj +++ b/tests/core/Statiq.Core.Tests/Statiq.Core.Tests.csproj @@ -4,7 +4,10 @@ - - + + + + + \ No newline at end of file From 1c25c9de8eeab8cc0230b2820cc99ebb1d1466e8 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 16:35:39 +0100 Subject: [PATCH 14/47] Update Microsoft.AspNetCore.* to 6.0.25 (8.0.0) --- src/extensions/Statiq.Razor/Statiq.Razor.csproj | 11 ++++++----- .../Statiq.Razor/StatiqRazorProjectFileSystem.cs | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/extensions/Statiq.Razor/Statiq.Razor.csproj b/src/extensions/Statiq.Razor/Statiq.Razor.csproj index 8ad62053..becf47e3 100644 --- a/src/extensions/Statiq.Razor/Statiq.Razor.csproj +++ b/src/extensions/Statiq.Razor/Statiq.Razor.csproj @@ -7,17 +7,18 @@ - - - - + + + - + + + diff --git a/src/extensions/Statiq.Razor/StatiqRazorProjectFileSystem.cs b/src/extensions/Statiq.Razor/StatiqRazorProjectFileSystem.cs index b19f66b6..6e287773 100644 --- a/src/extensions/Statiq.Razor/StatiqRazorProjectFileSystem.cs +++ b/src/extensions/Statiq.Razor/StatiqRazorProjectFileSystem.cs @@ -27,7 +27,6 @@ public StatiqRazorProjectFileSystem(Microsoft.Extensions.FileProviders.IFileProv _hostingEnvironment = hostingEnviroment.ThrowIfNull(nameof(hostingEnviroment)); } - [Obsolete("Use GetItem(string path, string fileKind) instead.")] public override RazorProjectItem GetItem(string path) { return GetItem(path, fileKind: null); From b45abc0cf44278b7b3b993db85c3c16e5172e380 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 17:24:33 +0100 Subject: [PATCH 15/47] Update Microsoft.IO.RecyclableMemoryStream to 2.3.2 --- src/core/Statiq.Core/Statiq.Core.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Statiq.Core/Statiq.Core.csproj b/src/core/Statiq.Core/Statiq.Core.csproj index 016013fd..0ada4cf3 100644 --- a/src/core/Statiq.Core/Statiq.Core.csproj +++ b/src/core/Statiq.Core/Statiq.Core.csproj @@ -8,7 +8,7 @@ - + From a7f1d27bb10854140482f3869b7f02dbd5620ab6 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 17:27:15 +0100 Subject: [PATCH 16/47] Update Microsoft.Data.SqlClient to 5.1.2 --- src/core/Statiq.Core/Statiq.Core.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Statiq.Core/Statiq.Core.csproj b/src/core/Statiq.Core/Statiq.Core.csproj index 0ada4cf3..1908ef5d 100644 --- a/src/core/Statiq.Core/Statiq.Core.csproj +++ b/src/core/Statiq.Core/Statiq.Core.csproj @@ -12,7 +12,7 @@ - + From 3c5d7c4589ef46751f913cad51d45d6404d5565f Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 17:28:57 +0100 Subject: [PATCH 17/47] Update NUnit to 3.14.0 --- src/core/Statiq.Testing/Statiq.Testing.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Statiq.Testing/Statiq.Testing.csproj b/src/core/Statiq.Testing/Statiq.Testing.csproj index 03661bdf..3f97d15a 100644 --- a/src/core/Statiq.Testing/Statiq.Testing.csproj +++ b/src/core/Statiq.Testing/Statiq.Testing.csproj @@ -4,7 +4,7 @@ Statiq Static StaticContent StaticSite Blog BlogEngine - + build From 71c0fbeee8404e66f51495491188b515f7974885 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 17:29:33 +0100 Subject: [PATCH 18/47] Update Shouldly to 4.2.1 --- src/core/Statiq.Testing/Statiq.Testing.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Statiq.Testing/Statiq.Testing.csproj b/src/core/Statiq.Testing/Statiq.Testing.csproj index 3f97d15a..d7ee61f6 100644 --- a/src/core/Statiq.Testing/Statiq.Testing.csproj +++ b/src/core/Statiq.Testing/Statiq.Testing.csproj @@ -5,7 +5,7 @@ - + build From 3e1e704f607c2a76f6baff2d870b9a38c0b90141 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Mon, 12 Feb 2024 13:49:20 +0100 Subject: [PATCH 19/47] Update Microsoft.Data.SqlClient to 5.1.5 --- src/core/Statiq.Core/Statiq.Core.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Statiq.Core/Statiq.Core.csproj b/src/core/Statiq.Core/Statiq.Core.csproj index 1908ef5d..892c4b93 100644 --- a/src/core/Statiq.Core/Statiq.Core.csproj +++ b/src/core/Statiq.Core/Statiq.Core.csproj @@ -12,7 +12,7 @@ - + From da8ac7f6a15d49477fbfcab0540e034d4494184a Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Mon, 12 Feb 2024 13:52:25 +0100 Subject: [PATCH 20/47] Update Microsoft.NET.Test.Sdk to 17.9.0 --- tests/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index ab1e9bd9..affa7e1e 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -5,7 +5,7 @@ true - + \ No newline at end of file From 8b1af1f9567b73a44f9bce85aa3db94916388ca6 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Mon, 12 Feb 2024 17:14:06 +0100 Subject: [PATCH 21/47] Update NUnit to 4.0.1 --- src/core/Statiq.Testing/Statiq.Testing.csproj | 2 +- tests/Directory.Build.props | 4 + .../Bootstrapper/BootstrapperFixture.cs | 24 ++-- .../Documents/DocumentFixture.cs | 4 +- .../Documents/ObjectDocumentFixture.cs | 4 +- .../Documents/ToLookupExtensionsFixture.cs | 52 +++++---- .../IO/Globbing/GlobberFixture.cs | 12 +- .../IReadOnlyFileSystemExtensionsFixture.cs | 53 ++++----- .../IO/NormalizedPathFixture.cs | 26 ++--- .../IO/PathCollectionFixture.cs | 6 +- .../IO/VirtualInputDirectoryFixture.cs | 22 ++-- .../Meta/MetadataFixture.cs | 109 ++++++++++-------- .../Modules/ModuleListFixture.cs | 58 ++++++---- .../Util/RelativeUrlFixture.cs | 12 +- .../Execution/PipelineCollectionFixture.cs | 2 +- .../Statiq.Core.Tests/IO/FileSystemFixture.cs | 6 +- .../Control/CombineDocumentsFixture.cs | 6 +- .../Modules/Control/ConcatDocumentsFixture.cs | 23 ++-- .../Modules/Control/ExecuteSwitchFixture.cs | 52 +++++---- .../Modules/Control/GroupDocumentsFixture.cs | 23 ++-- .../Modules/Control/MergeDocumentsFixture.cs | 58 ++++++---- .../Modules/Control/OrderDocumentsFixture.cs | 16 +-- .../Control/PaginateDocumentsFixture.cs | 11 +- .../Control/ProcessSidecarFileFixture.cs | 21 +++- .../Control/ReplaceDocumentsFixture.cs | 12 +- .../Extensibility/ExecuteConfigFixture.cs | 6 +- .../Modules/IO/CopyFilesFixture.cs | 109 +++++++++++------- .../Modules/IO/ReadWebFixture.cs | 34 +++--- 28 files changed, 443 insertions(+), 324 deletions(-) diff --git a/src/core/Statiq.Testing/Statiq.Testing.csproj b/src/core/Statiq.Testing/Statiq.Testing.csproj index d7ee61f6..750432dc 100644 --- a/src/core/Statiq.Testing/Statiq.Testing.csproj +++ b/src/core/Statiq.Testing/Statiq.Testing.csproj @@ -4,7 +4,7 @@ Statiq Static StaticContent StaticSite Blog BlogEngine - + build diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index affa7e1e..14316103 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -7,5 +7,9 @@ + + all + runtime; build; native; contentfiles; analyzers + \ No newline at end of file diff --git a/tests/core/Statiq.App.Tests/Bootstrapper/BootstrapperFixture.cs b/tests/core/Statiq.App.Tests/Bootstrapper/BootstrapperFixture.cs index 4edce7d5..101106e8 100644 --- a/tests/core/Statiq.App.Tests/Bootstrapper/BootstrapperFixture.cs +++ b/tests/core/Statiq.App.Tests/Bootstrapper/BootstrapperFixture.cs @@ -69,12 +69,12 @@ public async Task SetsLogLevel(string logLevel, int expected) result.LogMessages.Count(x => x.FormattedMessage.StartsWith("Foo/Process")).ShouldBe(expected); } - [TestCase("Trace", false)] - [TestCase("Debug", false)] - [TestCase("Information", false)] - [TestCase("Warning", false)] - [TestCase("Error", true)] - [TestCase("Critical", true)] + [TestCase(LogLevel.Trace, false)] + [TestCase(LogLevel.Debug, false)] + [TestCase(LogLevel.Information, false)] + [TestCase(LogLevel.Warning, false)] + [TestCase(LogLevel.Error, true)] + [TestCase(LogLevel.Critical, true)] public async Task DefaultFailureLogLevel(LogLevel logLevel, bool expectedFailure) { // Given @@ -91,12 +91,12 @@ public async Task DefaultFailureLogLevel(LogLevel logLevel, bool expectedFailure result.ExitCode.ShouldBe(expectedFailure ? (int)ExitCode.LogLevelFailure : (int)ExitCode.Normal); } - [TestCase("Trace", false)] - [TestCase("Debug", false)] - [TestCase("Information", false)] - [TestCase("Warning", true)] - [TestCase("Error", true)] - [TestCase("Critical", true)] + [TestCase(LogLevel.Trace, false)] + [TestCase(LogLevel.Debug, false)] + [TestCase(LogLevel.Information, false)] + [TestCase(LogLevel.Warning, true)] + [TestCase(LogLevel.Error, true)] + [TestCase(LogLevel.Critical, true)] public async Task SetFailureLogLevel(LogLevel logLevel, bool expectedFailure) { // Given diff --git a/tests/core/Statiq.Common.Tests/Documents/DocumentFixture.cs b/tests/core/Statiq.Common.Tests/Documents/DocumentFixture.cs index fc0ec89f..65b9f58a 100644 --- a/tests/core/Statiq.Common.Tests/Documents/DocumentFixture.cs +++ b/tests/core/Statiq.Common.Tests/Documents/DocumentFixture.cs @@ -19,7 +19,7 @@ public void IdIsNotTheSameForDifferentDocuments() Document b = new Document(); // Then - Assert.AreNotEqual(a.Id, b.Id); + Assert.That(b.Id, Is.Not.EqualTo(a.Id)); } [Test] @@ -48,7 +48,7 @@ public void IdIsTheSameAfterClone() IDocument cloned = document.Clone(null); // Then - Assert.AreEqual(document.Id, cloned.Id); + Assert.That(cloned.Id, Is.EqualTo(document.Id)); } [Test] diff --git a/tests/core/Statiq.Common.Tests/Documents/ObjectDocumentFixture.cs b/tests/core/Statiq.Common.Tests/Documents/ObjectDocumentFixture.cs index 2631ca54..7fe8f3e2 100644 --- a/tests/core/Statiq.Common.Tests/Documents/ObjectDocumentFixture.cs +++ b/tests/core/Statiq.Common.Tests/Documents/ObjectDocumentFixture.cs @@ -19,7 +19,7 @@ public void IdIsNotTheSameForDifferentDocuments() IDocument b = new ObjectDocument(obj); // Then - Assert.AreNotEqual(a.Id, b.Id); + Assert.That(b.Id, Is.Not.EqualTo(a.Id)); } } @@ -36,7 +36,7 @@ public void IdIsTheSameAfterClone() IDocument cloned = document.Clone(null); // Then - Assert.AreEqual(document.Id, cloned.Id); + Assert.That(cloned.Id, Is.EqualTo(document.Id)); } [Test] diff --git a/tests/core/Statiq.Common.Tests/Documents/ToLookupExtensionsFixture.cs b/tests/core/Statiq.Common.Tests/Documents/ToLookupExtensionsFixture.cs index 4d403027..581a9491 100644 --- a/tests/core/Statiq.Common.Tests/Documents/ToLookupExtensionsFixture.cs +++ b/tests/core/Statiq.Common.Tests/Documents/ToLookupExtensionsFixture.cs @@ -36,11 +36,14 @@ public void ReturnsCorrectLookupOfInt() ILookup lookup = documents.ToLookupMany("Numbers"); // Then - Assert.AreEqual(4, lookup.Count); - CollectionAssert.AreEquivalent(new[] { a }, lookup[1]); - CollectionAssert.AreEquivalent(new[] { a, b }, lookup[2]); - CollectionAssert.AreEquivalent(new[] { a, b, c }, lookup[3]); - CollectionAssert.AreEquivalent(new[] { b, d }, lookup[4]); + Assert.Multiple(() => + { + Assert.That(lookup, Has.Count.EqualTo(4)); + Assert.That(lookup[1], Is.EquivalentTo(new[] { a })); + Assert.That(lookup[2], Is.EquivalentTo(new[] { a, b })); + Assert.That(lookup[3], Is.EquivalentTo(new[] { a, b, c })); + Assert.That(lookup[4], Is.EquivalentTo(new[] { b, d })); + }); } [Test] @@ -69,11 +72,14 @@ public void ReturnsCorrectLookupOfString() ILookup lookup = documents.ToLookupMany("Numbers"); // Then - Assert.AreEqual(4, lookup.Count); - CollectionAssert.AreEquivalent(new[] { a }, lookup["1"]); - CollectionAssert.AreEquivalent(new[] { a, b }, lookup["2"]); - CollectionAssert.AreEquivalent(new[] { a, b, c }, lookup["3"]); - CollectionAssert.AreEquivalent(new[] { b, d }, lookup["4"]); + Assert.Multiple(() => + { + Assert.That(lookup, Has.Count.EqualTo(4)); + Assert.That(lookup["1"], Is.EquivalentTo(new[] { a })); + Assert.That(lookup["2"], Is.EquivalentTo(new[] { a, b })); + Assert.That(lookup["3"], Is.EquivalentTo(new[] { a, b, c })); + Assert.That(lookup["4"], Is.EquivalentTo(new[] { b, d })); + }); } [Test] @@ -106,11 +112,14 @@ public void ReturnsCorrectLookupWithValues() ILookup lookup = documents.ToLookupMany("Numbers", "Colors"); // Then - Assert.AreEqual(4, lookup.Count); - CollectionAssert.AreEquivalent(new[] { "Red" }, lookup[1]); - CollectionAssert.AreEquivalent(new[] { "Red", "Red" }, lookup[2]); - CollectionAssert.AreEquivalent(new[] { "Red", "Red", "Green" }, lookup[3]); - CollectionAssert.AreEquivalent(new[] { "Red", "Green" }, lookup[4]); + Assert.Multiple(() => + { + Assert.That(lookup, Has.Count.EqualTo(4)); + Assert.That(lookup[1], Is.EquivalentTo(new[] { "Red" })); + Assert.That(lookup[2], Is.EquivalentTo(new[] { "Red", "Red" })); + Assert.That(lookup[3], Is.EquivalentTo(new[] { "Red", "Red", "Green" })); + Assert.That(lookup[4], Is.EquivalentTo(new[] { "Red", "Green" })); + }); } } @@ -146,11 +155,14 @@ public void ReturnsCorrectLookupWithValues() ILookup lookup = documents.ToLookupManyToMany("Numbers", "Colors"); // Then - Assert.AreEqual(4, lookup.Count); - CollectionAssert.AreEquivalent(new[] { "Red" }, lookup[1]); - CollectionAssert.AreEquivalent(new[] { "Red", "Red", "Blue" }, lookup[2]); - CollectionAssert.AreEquivalent(new[] { "Red", "Red", "Blue", "Green" }, lookup[3]); - CollectionAssert.AreEquivalent(new[] { "Red", "Blue", "Green", "Blue" }, lookup[4]); + Assert.That(lookup, Has.Count.EqualTo(4)); + Assert.Multiple(() => + { + Assert.That(lookup[1], Is.EquivalentTo(new[] { "Red" })); + Assert.That(lookup[2], Is.EquivalentTo(new[] { "Red", "Red", "Blue" })); + Assert.That(lookup[3], Is.EquivalentTo(new[] { "Red", "Red", "Blue", "Green" })); + Assert.That(lookup[4], Is.EquivalentTo(new[] { "Red", "Blue", "Green", "Blue" })); + }); } } } diff --git a/tests/core/Statiq.Common.Tests/IO/Globbing/GlobberFixture.cs b/tests/core/Statiq.Common.Tests/IO/Globbing/GlobberFixture.cs index 0fd7420f..65353abe 100644 --- a/tests/core/Statiq.Common.Tests/IO/Globbing/GlobberFixture.cs +++ b/tests/core/Statiq.Common.Tests/IO/Globbing/GlobberFixture.cs @@ -49,8 +49,8 @@ public void ShouldReturnMatchedFiles(string directoryPath, string[] patterns, st IEnumerable matchesReversedSlash = Globber.GetFiles(directory, patterns.Select(x => x.Replace("/", "\\"))); // Then - CollectionAssert.AreEquivalent(resultPaths, matches.Select(x => x.Path.FullPath)); - CollectionAssert.AreEquivalent(resultPaths, matchesReversedSlash.Select(x => x.Path.FullPath)); + Assert.That(matches.Select(x => x.Path.FullPath), Is.EquivalentTo(resultPaths)); + Assert.That(matchesReversedSlash.Select(x => x.Path.FullPath), Is.EquivalentTo(resultPaths)); } [Test] @@ -110,8 +110,8 @@ public void RecursiveWildcardTests(string directoryPath, string[] patterns, stri IEnumerable matchesReversedSlash = Globber.GetFiles(directory, patterns.Select(x => x.Replace("/", "\\"))); // Then - CollectionAssert.AreEquivalent(resultPaths, matches.Select(x => x.Path.FullPath)); - CollectionAssert.AreEquivalent(resultPaths, matchesReversedSlash.Select(x => x.Path.FullPath)); + Assert.That(matches.Select(x => x.Path.FullPath), Is.EquivalentTo(resultPaths)); + Assert.That(matchesReversedSlash.Select(x => x.Path.FullPath), Is.EquivalentTo(resultPaths)); } // Addresses a specific problem with nested folders in a wildcard search @@ -132,7 +132,7 @@ public void NestedFoldersWilcard() IEnumerable matches = Globber.GetFiles(directory, new[] { "**/*.txt" }); // Then - CollectionAssert.AreEquivalent(new[] { "/a/b/c/x.txt", "/a/bar/foo/y.txt" }, matches.Select(x => x.Path.FullPath)); + Assert.That(matches.Select(x => x.Path.FullPath), Is.EquivalentTo(new[] { "/a/b/c/x.txt", "/a/bar/foo/y.txt" })); } [TestCase("/a/b")] @@ -224,7 +224,7 @@ public void ShouldExpandBraces(string pattern, string[] expected) IEnumerable result = Globber.ExpandBraces(pattern); // Then - CollectionAssert.AreEquivalent(expected, result); + Assert.That(result, Is.EquivalentTo(expected)); } } diff --git a/tests/core/Statiq.Common.Tests/IO/IReadOnlyFileSystemExtensionsFixture.cs b/tests/core/Statiq.Common.Tests/IO/IReadOnlyFileSystemExtensionsFixture.cs index 68a19b9c..76c7ed3d 100644 --- a/tests/core/Statiq.Common.Tests/IO/IReadOnlyFileSystemExtensionsFixture.cs +++ b/tests/core/Statiq.Common.Tests/IO/IReadOnlyFileSystemExtensionsFixture.cs @@ -32,7 +32,7 @@ public void ReturnsInputFile(string input, string expected) IFile result = fileSystem.GetInputFile(input); // Then - Assert.AreEqual(expected, result.Path.FullPath); + Assert.That(result.Path.FullPath, Is.EqualTo(expected)); } [Test] @@ -47,7 +47,7 @@ public void ReturnsInputFileAboveInputDirectory() IFile result = fileSystem.GetInputFile("../bar.txt"); // Then - Assert.AreEqual("/a/x/bar.txt", result.Path.FullPath); + Assert.That(result.Path.FullPath, Is.EqualTo("/a/x/bar.txt")); } [Test] @@ -62,7 +62,7 @@ public void ReturnsInputFileWhenInputDirectoryAboveRoot() IFile result = fileSystem.GetInputFile("bar.txt"); // Then - Assert.AreEqual("/a/x/bar.txt", result.Path.FullPath); + Assert.That(result.Path.FullPath, Is.EqualTo("/a/x/bar.txt")); } [Test] @@ -77,7 +77,7 @@ public void ReturnsInputFileWhenInputDirectoryAndFileAscend() IFile result = fileSystem.GetInputFile("../bar.txt"); // Then - Assert.AreEqual("/a/x/bar.txt", result.Path.FullPath); + Assert.That(result.Path.FullPath, Is.EqualTo("/a/x/bar.txt")); } } @@ -93,8 +93,8 @@ public void ReturnsVirtualInputDirectoryForRelativePath() IDirectory result = fileSystem.GetInputDirectory("A/B/C"); // Then - Assert.IsInstanceOf(result); - Assert.AreEqual("A/B/C", result.Path.FullPath); + Assert.That(result, Is.InstanceOf()); + Assert.That(result.Path.FullPath, Is.EqualTo("A/B/C")); } [Test] @@ -107,8 +107,8 @@ public void ReturnsVirtualInputDirectoryForAscendingPath() IDirectory result = fileSystem.GetInputDirectory("../A/B/C"); // Then - Assert.IsInstanceOf(result); - Assert.AreEqual("../A/B/C", result.Path.FullPath); + Assert.That(result, Is.InstanceOf()); + Assert.That(result.Path.FullPath, Is.EqualTo("../A/B/C")); } [Test] @@ -121,8 +121,8 @@ public void ReturnsVirtualInputDirectoryForNullPath() IDirectory result = fileSystem.GetInputDirectory(); // Then - Assert.IsInstanceOf(result); - Assert.AreEqual(string.Empty, result.Path.FullPath); + Assert.That(result, Is.InstanceOf()); + Assert.That(result.Path.FullPath, Is.EqualTo(string.Empty)); } [Test] @@ -135,7 +135,7 @@ public void ReturnsDirectoryForAbsolutePath() IDirectory result = fileSystem.GetInputDirectory("/A/B/C"); // Then - Assert.AreEqual("/A/B/C", result.Path.FullPath); + Assert.That(result.Path.FullPath, Is.EqualTo("/A/B/C")); } } @@ -158,17 +158,18 @@ public void ReturnsCombinedInputDirectories() IEnumerable result = fileSystem.GetInputDirectories(); // Then - CollectionAssert.AreEquivalent( - new[] - { - "/a/theme", - "/a/input", - "/a/b/c", - "/a/b/d", - "/a/x", - "/a/y", - "/z" - }, result.Select(x => x.Path.FullPath)); + Assert.That( + result.Select(x => x.Path.FullPath), + Is.EquivalentTo(new[] + { + "/a/theme", + "/a/input", + "/a/b/c", + "/a/b/d", + "/a/x", + "/a/y", + "/z" + })); } } @@ -438,7 +439,7 @@ public void ShouldNotThrowForNullPattern() IEnumerable results = fileSystem.GetFiles(dir, null, "**/foo.txt"); // Then - CollectionAssert.AreEquivalent(new[] { "/a/b/c/foo.txt" }, results.Select(x => x.Path.FullPath)); + Assert.That(results.Select(x => x.Path.FullPath), Is.EquivalentTo(new[] { "/a/b/c/foo.txt" })); } [TestCase("/", new[] { "/a/b/c/foo.txt" }, new[] { "/a/b/c/foo.txt" }, true)] @@ -486,7 +487,7 @@ public void ShouldReturnExistingFiles(string directory, string[] patterns, strin IEnumerable results = fileSystem.GetFiles(dir, patterns); // Then - CollectionAssert.AreEquivalent(expected, results.Select(x => x.Path.FullPath)); + Assert.That(results.Select(x => x.Path.FullPath), Is.EquivalentTo(expected)); if (reverseSlashes) { @@ -494,7 +495,7 @@ public void ShouldReturnExistingFiles(string directory, string[] patterns, strin results = fileSystem.GetFiles(dir, patterns.Select(x => x.Replace("/", "\\"))); // Then - CollectionAssert.AreEquivalent(expected, results.Select(x => x.Path.FullPath)); + Assert.That(results.Select(x => x.Path.FullPath), Is.EquivalentTo(expected)); } } @@ -526,7 +527,7 @@ public void ShouldNotReturnExcludedFiles(string directory, string excluded, stri IEnumerable results = fileSystem.GetFiles(dir, patterns); // Then - CollectionAssert.AreEquivalent(expected, results.Select(x => x.Path.FullPath)); + Assert.That(results.Select(x => x.Path.FullPath), Is.EquivalentTo(expected)); } } diff --git a/tests/core/Statiq.Common.Tests/IO/NormalizedPathFixture.cs b/tests/core/Statiq.Common.Tests/IO/NormalizedPathFixture.cs index 2a4b3273..e34fef73 100644 --- a/tests/core/Statiq.Common.Tests/IO/NormalizedPathFixture.cs +++ b/tests/core/Statiq.Common.Tests/IO/NormalizedPathFixture.cs @@ -591,7 +591,7 @@ public void CanSeeIfAPathHasAnExtension(string fullPath, bool expected) NormalizedPath path = new NormalizedPath(fullPath); // Then - Assert.AreEqual(expected, path.HasExtension); + Assert.That(path.HasExtension, Is.EqualTo(expected)); } } @@ -610,7 +610,7 @@ public void CanGetExtension(string fullPath, string expected) string extension = result.Extension; // Then - Assert.AreEqual(expected, extension); + Assert.That(extension, Is.EqualTo(expected)); } } @@ -626,7 +626,7 @@ public void CanGetDirectoryForFilePath() NormalizedPath directory = path.Parent; // Then - Assert.AreEqual("temp", directory.FullPath); + Assert.That(directory.FullPath, Is.EqualTo("temp")); } [Test] @@ -662,7 +662,7 @@ public void ShouldReturnRootRelativePath(string fullPath, string expected) NormalizedPath rootRelative = path.RootRelative; // Then - Assert.AreEqual(expected, rootRelative.FullPath); + Assert.That(rootRelative.FullPath, Is.EqualTo(expected)); } [TestCase(@"\a\b\c")] @@ -682,7 +682,7 @@ public void ShouldReturnSelfForExplicitRelativePath(string fullPath) NormalizedPath rootRelative = path.RootRelative; // Then - Assert.AreEqual(path.FullPath, rootRelative.FullPath); + Assert.That(rootRelative.FullPath, Is.EqualTo(path.FullPath)); } } @@ -711,7 +711,7 @@ public void ShouldChangeExtension(string path, string extension, string expected normalized = normalized.ChangeExtension(extension); // Then - Assert.AreEqual(expected, normalized.ToString()); + Assert.That(normalized.ToString(), Is.EqualTo(expected)); } [TestCase("foo")] @@ -755,7 +755,7 @@ public void CanAppendExtensionToPath(string extension, string expected) path = path.AppendExtension(extension); // Then - Assert.AreEqual(expected, path.ToString()); + Assert.That(path.ToString(), Is.EqualTo(expected)); } } @@ -787,7 +787,7 @@ public void CanInsertSuffixToPath(string path, string suffix, string expected) filePath = filePath.InsertSuffix(suffix); // Then - Assert.AreEqual(expected, filePath.FullPath); + Assert.That(filePath.FullPath, Is.EqualTo(expected)); } } @@ -820,7 +820,7 @@ public void CanInsertPrefixToPath(string path, string prefix, string expected) filePath = filePath.InsertPrefix(prefix); // Then - Assert.AreEqual(expected, filePath.FullPath); + Assert.That(filePath.FullPath, Is.EqualTo(expected)); } } @@ -985,7 +985,7 @@ public void ShouldReturnDirectoryName(string directoryPath, string name) string result = path.Name; // Then - Assert.AreEqual(name, result); + Assert.That(result, Is.EqualTo(name)); } } @@ -1006,7 +1006,7 @@ public void ReturnsParent(string directoryPath, string expected) NormalizedPath parent = path.Parent; // Then - Assert.AreEqual(expected, parent.FullPath); + Assert.That(parent.FullPath, Is.EqualTo(expected)); } [TestCase(".")] @@ -1078,7 +1078,7 @@ public void ShouldCombinePaths(string first, string second, string expected) NormalizedPath result = path.GetFilePath(new NormalizedPath(second)); // Then - Assert.AreEqual(expected, result.FullPath); + Assert.That(result.FullPath, Is.EqualTo(expected)); } } @@ -1121,7 +1121,7 @@ public void ShouldCombinePaths(string first, string second, string expected) NormalizedPath result = path.Combine(new NormalizedPath(second)); // Then - Assert.AreEqual(expected, result.FullPath); + Assert.That(result.FullPath, Is.EqualTo(expected)); } } diff --git a/tests/core/Statiq.Common.Tests/IO/PathCollectionFixture.cs b/tests/core/Statiq.Common.Tests/IO/PathCollectionFixture.cs index de2f5095..8538a549 100644 --- a/tests/core/Statiq.Common.Tests/IO/PathCollectionFixture.cs +++ b/tests/core/Statiq.Common.Tests/IO/PathCollectionFixture.cs @@ -49,7 +49,7 @@ public void ShouldReturnTheNumberOfPathsInTheCollection() PathCollection collection = new PathCollection(new[] { _upperCaseA, _upperCaseB }); // When, Then - Assert.AreEqual(2, collection.Count); + Assert.That(collection, Has.Count.EqualTo(2)); } } @@ -66,7 +66,7 @@ public void ShouldAddPathIfNotAlreadyPresent() collection.Add(_upperCaseA); // Then - Assert.AreEqual(2, collection.Count); + Assert.That(collection, Has.Count.EqualTo(2)); } } @@ -83,7 +83,7 @@ public void ShouldAddPathsThatAreNotPresent() collection.AddRange(new[] { _upperCaseA, _upperCaseB, _upperCaseC }); // Then - Assert.AreEqual(3, collection.Count); + Assert.That(collection, Has.Count.EqualTo(3)); } } } diff --git a/tests/core/Statiq.Common.Tests/IO/VirtualInputDirectoryFixture.cs b/tests/core/Statiq.Common.Tests/IO/VirtualInputDirectoryFixture.cs index 7e1811e6..40ab3462 100644 --- a/tests/core/Statiq.Common.Tests/IO/VirtualInputDirectoryFixture.cs +++ b/tests/core/Statiq.Common.Tests/IO/VirtualInputDirectoryFixture.cs @@ -49,7 +49,7 @@ public void RootVirtualDirectoryDoesNotIncludeSelf(string virtualPath, SearchOpt IEnumerable directories = directory.GetDirectories(searchOption); // Then - CollectionAssert.AreEquivalent(expectedPaths, directories.Select(x => x.Path.FullPath)); + Assert.That(directories.Select(x => x.Path.FullPath), Is.EquivalentTo(expectedPaths)); } [TestCase("a", SearchOption.AllDirectories, new[] { "a/b" })] @@ -63,7 +63,7 @@ public void NonRootVirtualDirectoryIncludesSelf(string virtualPath, SearchOption IEnumerable directories = directory.GetDirectories(searchOption); // Then - CollectionAssert.AreEquivalent(expectedPaths, directories.Select(x => x.Path.FullPath)); + Assert.That(directories.Select(x => x.Path.FullPath), Is.EquivalentTo(expectedPaths)); } [TestCase("", SearchOption.TopDirectoryOnly, new[] { "x", "i" })] @@ -126,7 +126,7 @@ public void GetsFiles(string virtualPath, SearchOption searchOption, string[] ex IEnumerable files = directory.GetFiles(searchOption); // Then - CollectionAssert.AreEquivalent(expectedPaths, files.Select(x => x.Path.FullPath)); + Assert.That(files.Select(x => x.Path.FullPath), Is.EquivalentTo(expectedPaths)); } [TestCase("", SearchOption.TopDirectoryOnly, new string[] { })] @@ -173,8 +173,8 @@ public void GetsInputFile(string virtualPath, string filePath, string expectedPa IFile file = directory.GetFile(filePath); // Then - Assert.AreEqual(expectedPath, file.Path.FullPath); - Assert.AreEqual(expectedExists, file.Exists); + Assert.That(file.Path.FullPath, Is.EqualTo(expectedPath)); + Assert.That(file.Exists, Is.EqualTo(expectedExists)); } [TestCase("", "x/y/z/foo.txt", "/root/a/x/y/z/foo.txt", true)] @@ -203,8 +203,8 @@ public void GetsMappedInputFile(string virtualPath, string filePath, string expe IFile file = directory.GetFile(filePath); // Then - Assert.AreEqual(expectedPath, file.Path.FullPath); - Assert.AreEqual(expectedExists, file.Exists); + Assert.That(file.Path.FullPath, Is.EqualTo(expectedPath)); + Assert.That(file.Exists, Is.EqualTo(expectedExists)); } [Test] @@ -221,7 +221,7 @@ public void GetsInputFileAboveInputDirectory() IFile file = directory.GetFile("../c/foo.txt"); // Then - Assert.AreEqual("/a/b/c/foo.txt", file.Path.FullPath); + Assert.That(file.Path.FullPath, Is.EqualTo("/a/b/c/foo.txt")); } [Test] @@ -234,7 +234,7 @@ public void GetsMappedInputFileAboveInputDirectory() IFile file = directory.GetFile("../../z/fizz.txt"); // Then - Assert.AreEqual("/root/c/z/fizz.txt", file.Path.FullPath); + Assert.That(file.Path.FullPath, Is.EqualTo("/root/c/z/fizz.txt")); } [Test] @@ -293,7 +293,7 @@ public void ShouldReturnDirectory(string virtualPath, string path, string expect IDirectory result = directory.GetDirectory(path); // Then - Assert.AreEqual(expected, result.Path.FullPath); + Assert.That(result.Path.FullPath, Is.EqualTo(expected)); } [Test] @@ -333,7 +333,7 @@ public void ShouldReturnParentDirectory(string virtualPath, string expected) IDirectory result = directory.Parent; // Then - Assert.AreEqual(expected, result?.Path.FullPath); + Assert.That(result?.Path.FullPath, Is.EqualTo(expected)); } } diff --git a/tests/core/Statiq.Common.Tests/Meta/MetadataFixture.cs b/tests/core/Statiq.Common.Tests/Meta/MetadataFixture.cs index f2ba5c09..605ace6e 100644 --- a/tests/core/Statiq.Common.Tests/Meta/MetadataFixture.cs +++ b/tests/core/Statiq.Common.Tests/Meta/MetadataFixture.cs @@ -60,7 +60,7 @@ public void ReturnsCorrectResultWithMetadataValue() object value = metadata["A"]; // Then - Assert.AreEqual("a", value); + Assert.That(value, Is.EqualTo("a")); } [Test] @@ -77,7 +77,7 @@ public void ReturnsCorrectResultForKeysWithDifferentCase() object value = metadata["a"]; // Then - Assert.AreEqual("a", value); + Assert.That(value, Is.EqualTo("a")); } } @@ -94,7 +94,7 @@ public void ReturnsTrueForValidValue() bool contains = metadata.ContainsKey("A"); // Then - Assert.IsTrue(contains); + Assert.That(contains, Is.True); } [Test] @@ -108,7 +108,7 @@ public void ReturnsFalseForInvalidValue() bool contains = metadata.ContainsKey("B"); // Then - Assert.IsFalse(contains); + Assert.That(contains, Is.False); } [Test] @@ -122,7 +122,7 @@ public void ReturnsTrueForSameKeysWithDifferentCase() bool contains = metadata.ContainsKey("a"); // Then - Assert.IsTrue(contains); + Assert.That(contains, Is.True); } } @@ -140,8 +140,8 @@ public void ReturnsTrueForValidValue() bool contains = metadata.TryGetValue("A", out value); // Then - Assert.IsTrue(contains); - Assert.AreEqual("a", value); + Assert.That(contains, Is.True); + Assert.That(value, Is.EqualTo("a")); } [Test] @@ -156,8 +156,11 @@ public void ReturnsFalseForInvalidValue() bool contains = metadata.TryGetValue("B", out value); // Then - Assert.IsFalse(contains); - Assert.AreEqual(null, value); + Assert.Multiple(() => + { + Assert.That(contains, Is.False); + Assert.That(value, Is.EqualTo(null)); + }); } [Test] @@ -175,8 +178,11 @@ public void ReturnsCorrectResultWithMetadataValue() bool contains = metadata.TryGetValue("A", out value); // Then - Assert.IsTrue(contains); - Assert.AreEqual("a", value); + Assert.Multiple(() => + { + Assert.That(contains, Is.True); + Assert.That(value, Is.EqualTo("a")); + }); } } @@ -193,7 +199,7 @@ public void CanCloneWithNewValues() metadata = new Metadata(metadata, new[] { new KeyValuePair("A", "a") }); // Then - Assert.AreEqual("a", metadata["A"]); + Assert.That(metadata["A"], Is.EqualTo("a")); } [Test] @@ -207,7 +213,7 @@ public void ContainsPreviousValues() Metadata clone = new Metadata(metadata, new Dictionary { { "B", "b" } }); // Then - Assert.AreEqual("a", clone["A"]); + Assert.That(clone["A"], Is.EqualTo("a")); } [Test] @@ -221,7 +227,7 @@ public void ClonedMetadataDoesNotContainNewValues() Metadata clone = new Metadata(metadata, new Dictionary { { "B", "b" } }); // Then - Assert.IsFalse(metadata.ContainsKey("B")); + Assert.That(metadata.ContainsKey("B"), Is.False); } [Test] @@ -235,7 +241,7 @@ public void ContainsNewValues() Metadata clone = new Metadata(metadata, new Dictionary { { "B", "b" } }); // Then - Assert.AreEqual("b", clone["B"]); + Assert.That(clone["B"], Is.EqualTo("b")); } [Test] @@ -249,8 +255,11 @@ public void ReplacesValue() Metadata clone = new Metadata(metadata, new Dictionary { { "A", "b" } }); // Then - Assert.AreEqual("a", metadata["A"]); - Assert.AreEqual("b", clone["A"]); + Assert.Multiple(() => + { + Assert.That(metadata["A"], Is.EqualTo("a")); + Assert.That(clone["A"], Is.EqualTo("b")); + }); } } @@ -267,7 +276,7 @@ public void GetWithMetadataValueReturnsCorrectResult() object value = metadata.Get("A"); // Then - Assert.AreEqual("a", value); + Assert.That(value, Is.EqualTo("a")); } [Test] @@ -285,7 +294,7 @@ public void ReturnsCorrectResultWithDerivedMetadataValue() object value = metadata.Get("A"); // Then - Assert.AreEqual("x", value); + Assert.That(value, Is.EqualTo("x")); } [Test] @@ -302,8 +311,11 @@ public void MetadataValueCalledForEachRequest() value = metadata.Get("A"); // Then - Assert.AreEqual("a", value); - Assert.AreEqual(3, metadataValue.Calls); + Assert.Multiple(() => + { + Assert.That(value, Is.EqualTo("a")); + Assert.That(metadataValue.Calls, Is.EqualTo(3)); + }); } } @@ -320,8 +332,11 @@ public void ReturnsCorrectResultForList() IReadOnlyList result = metadata.GetList("A"); // Then - Assert.IsNotNull(result); - CollectionAssert.AreEqual(result, new[] { 1, 2, 3 }); + Assert.Multiple(() => + { + Assert.That(result, Is.Not.Null); + Assert.That(new[] { 1, 2, 3 }, Is.EqualTo(result).AsCollection); + }); } [Test] @@ -335,8 +350,8 @@ public void ReturnsCorrectResultForConvertedStringList() IReadOnlyList result = metadata.GetList("A"); // Then - Assert.IsNotNull(result); - CollectionAssert.AreEqual(result, new[] { 1, 2, 3 }); + Assert.That(result, Is.Not.Null); + Assert.That(new[] { 1, 2, 3 }, Is.EqualTo(result).AsCollection); } [Test] @@ -350,8 +365,8 @@ public void ReturnsCorrectResultForConvertedIntList() IReadOnlyList result = metadata.GetList("A"); // Then - Assert.IsNotNull(result); - CollectionAssert.AreEqual(result, new[] { "1", "2", "3" }); + Assert.That(result, Is.Not.Null); + Assert.That(new[] { "1", "2", "3" }, Is.EqualTo(result).AsCollection); } [Test] @@ -365,8 +380,8 @@ public void ReturnsCorrectResultForArray() IReadOnlyList result = metadata.GetList("A"); // Then - Assert.IsNotNull(result); - CollectionAssert.AreEqual(result, new[] { 1, 2, 3 }); + Assert.That(result, Is.Not.Null); + Assert.That(new[] { 1, 2, 3 }, Is.EqualTo(result).AsCollection); } } @@ -400,8 +415,8 @@ public void ReturnsListForList() IEnumerable result = metadata.GetDocuments("A"); // Then - Assert.IsNotNull(result); - CollectionAssert.AreEqual(new[] { a, b, c }, result); + Assert.That(result, Is.Not.Null); + Assert.That(result, Is.EqualTo(new[] { a, b, c }).AsCollection); } [Test] @@ -415,8 +430,8 @@ public void ReturnsEmptyListForListOfInt() IEnumerable result = metadata.GetDocuments("A"); // Then - Assert.IsNotNull(result); - CollectionAssert.IsEmpty(result); + Assert.That(result, Is.Not.Null); + Assert.That(result, Is.Empty); } [Test] @@ -430,8 +445,8 @@ public void ReturnsEmptyListForSingleInt() IEnumerable result = metadata.GetDocuments("A"); // Then - Assert.IsNotNull(result); - CollectionAssert.IsEmpty(result); + Assert.That(result, Is.Not.Null); + Assert.That(result, Is.Empty); } } @@ -448,7 +463,7 @@ public void ReturnsEmptyListWhenKeyNotFound() DocumentList result = metadata.GetDocumentList("A"); // Then - Assert.IsEmpty(result); + Assert.That(result, Is.Empty); } [Test] @@ -465,8 +480,8 @@ public void ReturnsListForList() DocumentList result = metadata.GetDocumentList("A"); // Then - Assert.IsNotNull(result); - CollectionAssert.AreEqual(new[] { a, b, c }, result); + Assert.That(result, Is.Not.Null); + Assert.That(result, Is.EqualTo(new[] { a, b, c }).AsCollection); } [Test] @@ -480,8 +495,8 @@ public void ReturnsEmptyListForListOfInt() DocumentList result = metadata.GetDocumentList("A"); // Then - Assert.IsNotNull(result); - CollectionAssert.IsEmpty(result); + Assert.That(result, Is.Not.Null); + Assert.That(result, Is.Empty); } [Test] @@ -495,8 +510,8 @@ public void ReturnsEmptyListForSingleInt() DocumentList result = metadata.GetDocumentList("A"); // Then - Assert.IsNotNull(result); - CollectionAssert.IsEmpty(result); + Assert.That(result, Is.Not.Null); + Assert.That(result, Is.Empty); } } @@ -515,8 +530,8 @@ public void ReturnsCorrectStringForFilePath(string path, string expected) object result = metadata.GetString("A"); // Then - Assert.IsInstanceOf(result); - Assert.AreEqual(expected, result); + Assert.That(result, Is.InstanceOf()); + Assert.That(result, Is.EqualTo(expected)); } [TestCase("/a/b/c", "/a/b/c")] @@ -532,8 +547,8 @@ public void ReturnsCorrectStringForDirectoryPath(string path, string expected) object result = metadata.GetString("A"); // Then - Assert.IsInstanceOf(result); - Assert.AreEqual(expected, result); + Assert.That(result, Is.InstanceOf()); + Assert.That(result, Is.EqualTo(expected)); } } @@ -638,7 +653,7 @@ public void EnumeratingMetadataValuesReturnsCorrectResults() object[] values = metadata.Select(x => x.Value).ToArray(); // Then - CollectionAssert.AreEquivalent(new[] { "a", "b", "c" }, values); + Assert.That(values, Is.EquivalentTo(new[] { "a", "b", "c" })); } } diff --git a/tests/core/Statiq.Common.Tests/Modules/ModuleListFixture.cs b/tests/core/Statiq.Common.Tests/Modules/ModuleListFixture.cs index 62cff539..030a8069 100644 --- a/tests/core/Statiq.Common.Tests/Modules/ModuleListFixture.cs +++ b/tests/core/Statiq.Common.Tests/Modules/ModuleListFixture.cs @@ -159,10 +159,13 @@ public void InsertAfterFirst() collection.InsertAfterFirst(new CountModule("foo")); // Then - Assert.AreEqual(collection[0].GetType(), typeof(RedModule)); - Assert.AreEqual(collection[1].GetType(), typeof(CountModule)); - Assert.AreEqual(collection[2].GetType(), typeof(RedModule)); - Assert.AreEqual(collection[3].GetType(), typeof(GreenModule)); + Assert.Multiple(() => + { + Assert.That(typeof(RedModule), Is.EqualTo(collection[0].GetType())); + Assert.That(typeof(CountModule), Is.EqualTo(collection[1].GetType())); + Assert.That(typeof(RedModule), Is.EqualTo(collection[2].GetType())); + Assert.That(typeof(GreenModule), Is.EqualTo(collection[3].GetType())); + }); } } @@ -181,10 +184,13 @@ public void InsertBeforeFirst() collection.InsertBeforeFirst(new CountModule("foo")); // Then - Assert.AreEqual(collection[0].GetType(), typeof(CountModule)); - Assert.AreEqual(collection[1].GetType(), typeof(RedModule)); - Assert.AreEqual(collection[2].GetType(), typeof(RedModule)); - Assert.AreEqual(collection[3].GetType(), typeof(GreenModule)); + Assert.Multiple(() => + { + Assert.That(typeof(CountModule), Is.EqualTo(collection[0].GetType())); + Assert.That(typeof(RedModule), Is.EqualTo(collection[1].GetType())); + Assert.That(typeof(RedModule), Is.EqualTo(collection[2].GetType())); + Assert.That(typeof(GreenModule), Is.EqualTo(collection[3].GetType())); + }); } } @@ -203,10 +209,13 @@ public void InsertAfterLast() collection.InsertAfterLast(new CountModule("foo")); // Then - Assert.AreEqual(collection[0].GetType(), typeof(RedModule)); - Assert.AreEqual(collection[1].GetType(), typeof(RedModule)); - Assert.AreEqual(collection[2].GetType(), typeof(CountModule)); - Assert.AreEqual(collection[3].GetType(), typeof(GreenModule)); + Assert.Multiple(() => + { + Assert.That(typeof(RedModule), Is.EqualTo(collection[0].GetType())); + Assert.That(typeof(RedModule), Is.EqualTo(collection[1].GetType())); + Assert.That(typeof(CountModule), Is.EqualTo(collection[2].GetType())); + Assert.That(typeof(GreenModule), Is.EqualTo(collection[3].GetType())); + }); } } @@ -225,10 +234,13 @@ public void InsertBeforeLast() collection.InsertBeforeLast(new CountModule("foo")); // Then - Assert.AreEqual(collection[0].GetType(), typeof(RedModule)); - Assert.AreEqual(collection[1].GetType(), typeof(CountModule)); - Assert.AreEqual(collection[2].GetType(), typeof(RedModule)); - Assert.AreEqual(collection[3].GetType(), typeof(GreenModule)); + Assert.Multiple(() => + { + Assert.That(typeof(RedModule), Is.EqualTo(collection[0].GetType())); + Assert.That(typeof(CountModule), Is.EqualTo(collection[1].GetType())); + Assert.That(typeof(RedModule), Is.EqualTo(collection[2].GetType())); + Assert.That(typeof(GreenModule), Is.EqualTo(collection[3].GetType())); + }); } } @@ -248,8 +260,11 @@ public void ReplaceFirst() collection.ReplaceFirst(new CountModule("replacedKey")); // Then - Assert.AreEqual("replacedKey", ((CountModule)collection[1]).ValueKey); - Assert.AreEqual("mykey2", ((CountModule)collection[2]).ValueKey); + Assert.Multiple(() => + { + Assert.That(((CountModule)collection[1]).ValueKey, Is.EqualTo("replacedKey")); + Assert.That(((CountModule)collection[2]).ValueKey, Is.EqualTo("mykey2")); + }); } } @@ -269,8 +284,11 @@ public void ReplaceLast() collection.ReplaceLast(new CountModule("replacedKey")); // Then - Assert.AreEqual("mykey1", ((CountModule)collection[1]).ValueKey); - Assert.AreEqual("replacedKey", ((CountModule)collection[2]).ValueKey); + Assert.Multiple(() => + { + Assert.That(((CountModule)collection[1]).ValueKey, Is.EqualTo("mykey1")); + Assert.That(((CountModule)collection[2]).ValueKey, Is.EqualTo("replacedKey")); + }); } } diff --git a/tests/core/Statiq.Common.Tests/Util/RelativeUrlFixture.cs b/tests/core/Statiq.Common.Tests/Util/RelativeUrlFixture.cs index 230156f4..10aba391 100644 --- a/tests/core/Statiq.Common.Tests/Util/RelativeUrlFixture.cs +++ b/tests/core/Statiq.Common.Tests/Util/RelativeUrlFixture.cs @@ -27,7 +27,7 @@ public void ShouldParseRoot(string url, bool expected) RelativeUrl relativeUrl = new RelativeUrl(url); // Then - Assert.AreEqual(expected, relativeUrl.HasRoot); + Assert.That(relativeUrl.HasRoot, Is.EqualTo(expected)); } [TestCase(null, "")] @@ -55,7 +55,7 @@ public void ShouldParseFragment(string url, string expected) RelativeUrl relativeUrl = new RelativeUrl(url); // Then - Assert.AreEqual(expected, relativeUrl.Fragment); + Assert.That(relativeUrl.Fragment, Is.EqualTo(expected)); } [TestCase(null, "")] @@ -97,7 +97,7 @@ public void ShouldParseQuery(string url, string expected) RelativeUrl relativeUrl = new RelativeUrl(url); // Then - Assert.AreEqual(expected, relativeUrl.Query); + Assert.That(relativeUrl.Query, Is.EqualTo(expected)); } [TestCase(null, null)] @@ -135,7 +135,7 @@ public void ShouldParsePath(string url, string expected) RelativeUrl relativeUrl = new RelativeUrl(url); // Then - Assert.AreEqual(expected, (string)relativeUrl.Path); + Assert.That((string)relativeUrl.Path, Is.EqualTo(expected)); } [TestCase("?", null, "?")] @@ -155,7 +155,7 @@ public void ShouldCreateUrl(string url, string root, string expected) RelativeUrl relativeUrl = new RelativeUrl(url, root); // Then - Assert.AreEqual(expected, relativeUrl.ToString()); + Assert.That(relativeUrl.ToString(), Is.EqualTo(expected)); } [Test] @@ -165,7 +165,7 @@ public void ImplicitOperatorShouldMatchToString() RelativeUrl relativeUrl = new RelativeUrl("~/foo?a=b#fragment", "root"); // Then - Assert.AreEqual(relativeUrl.ToString(), (string)relativeUrl); + Assert.That((string)relativeUrl, Is.EqualTo(relativeUrl.ToString())); } } } diff --git a/tests/core/Statiq.Core.Tests/Execution/PipelineCollectionFixture.cs b/tests/core/Statiq.Core.Tests/Execution/PipelineCollectionFixture.cs index 69d4744d..500dabdb 100644 --- a/tests/core/Statiq.Core.Tests/Execution/PipelineCollectionFixture.cs +++ b/tests/core/Statiq.Core.Tests/Execution/PipelineCollectionFixture.cs @@ -56,7 +56,7 @@ public void ReturnsTrueForDifferentCase() bool contains = pipelines.ContainsKey("test"); // Then - Assert.IsTrue(contains); + Assert.That(contains, Is.True); } } } diff --git a/tests/core/Statiq.Core.Tests/IO/FileSystemFixture.cs b/tests/core/Statiq.Core.Tests/IO/FileSystemFixture.cs index 27772578..bf30b025 100644 --- a/tests/core/Statiq.Core.Tests/IO/FileSystemFixture.cs +++ b/tests/core/Statiq.Core.Tests/IO/FileSystemFixture.cs @@ -18,7 +18,7 @@ public void AddsDefaultInputPath() FileSystem fileSystem = new FileSystem(); // Then - CollectionAssert.AreEquivalent(new[] { "input" }, fileSystem.InputPaths.Select(x => x.FullPath)); + Assert.That(fileSystem.InputPaths.Select(x => x.FullPath), Is.EquivalentTo(new[] { "input" })); } } @@ -54,7 +54,7 @@ public void CanSet() fileSystem.RootPath = "/foo/bar"; // Then - Assert.AreEqual("/foo/bar", fileSystem.RootPath.FullPath); + Assert.That(fileSystem.RootPath.FullPath, Is.EqualTo("/foo/bar")); } } @@ -80,7 +80,7 @@ public void CanSet() fileSystem.OutputPath = "/foo/bar"; // Then - Assert.AreEqual("/foo/bar", fileSystem.OutputPath.FullPath); + Assert.That(fileSystem.OutputPath.FullPath, Is.EqualTo("/foo/bar")); } } diff --git a/tests/core/Statiq.Core.Tests/Modules/Control/CombineDocumentsFixture.cs b/tests/core/Statiq.Core.Tests/Modules/Control/CombineDocumentsFixture.cs index 7eee661e..e9340b11 100644 --- a/tests/core/Statiq.Core.Tests/Modules/Control/CombineDocumentsFixture.cs +++ b/tests/core/Statiq.Core.Tests/Modules/Control/CombineDocumentsFixture.cs @@ -26,12 +26,12 @@ public async Task AppendsContent() IReadOnlyList results = await ExecuteAsync(new[] { a, b }, combine); // Then - CollectionAssert.AreEqual( - new[] { "ab" }, + Assert.That( await results .ToAsyncEnumerable() .SelectAwait(async x => await x.GetContentStringAsync()) - .ToListAsync()); + .ToListAsync(), + Is.EqualTo(new[] { "ab" }).AsCollection); } [Test] diff --git a/tests/core/Statiq.Core.Tests/Modules/Control/ConcatDocumentsFixture.cs b/tests/core/Statiq.Core.Tests/Modules/Control/ConcatDocumentsFixture.cs index 61711375..cf6189b1 100644 --- a/tests/core/Statiq.Core.Tests/Modules/Control/ConcatDocumentsFixture.cs +++ b/tests/core/Statiq.Core.Tests/Modules/Control/ConcatDocumentsFixture.cs @@ -36,16 +36,19 @@ public async Task ResultsInCorrectCountsWithInputDocumentsOnConcat() IReadOnlyList results = await ExecuteAsync(a, new ConcatDocuments(b), c); // Then - Assert.AreEqual(1, a.ExecuteCount); - Assert.AreEqual(1, b.ExecuteCount); - Assert.AreEqual(1, c.ExecuteCount); - Assert.AreEqual(1, a.InputCount); - Assert.AreEqual(2, b.InputCount); - Assert.AreEqual(8, c.InputCount); - Assert.AreEqual(2, a.OutputCount); - Assert.AreEqual(6, b.OutputCount); - Assert.AreEqual(32, c.OutputCount); - results.Count.ShouldBe(32); + Assert.Multiple(() => + { + Assert.That(a.ExecuteCount, Is.EqualTo(1)); + Assert.That(b.ExecuteCount, Is.EqualTo(1)); + Assert.That(c.ExecuteCount, Is.EqualTo(1)); + Assert.That(a.InputCount, Is.EqualTo(1)); + Assert.That(b.InputCount, Is.EqualTo(2)); + Assert.That(c.InputCount, Is.EqualTo(8)); + Assert.That(a.OutputCount, Is.EqualTo(2)); + Assert.That(b.OutputCount, Is.EqualTo(6)); + Assert.That(c.OutputCount, Is.EqualTo(32)); + Assert.That(results, Has.Count.EqualTo(32)); + }); } } } diff --git a/tests/core/Statiq.Core.Tests/Modules/Control/ExecuteSwitchFixture.cs b/tests/core/Statiq.Core.Tests/Modules/Control/ExecuteSwitchFixture.cs index 0661fc11..16373426 100644 --- a/tests/core/Statiq.Core.Tests/Modules/Control/ExecuteSwitchFixture.cs +++ b/tests/core/Statiq.Core.Tests/Modules/Control/ExecuteSwitchFixture.cs @@ -24,10 +24,13 @@ public async Task SwitchResultsInCorrectCounts() await ExecuteAsync(a, switchModule); // Then - Assert.AreEqual(1, a.ExecuteCount); - Assert.AreEqual(1, b.ExecuteCount); - Assert.AreEqual(1, c.ExecuteCount); - Assert.AreEqual(1, d.ExecuteCount); + Assert.Multiple(() => + { + Assert.That(a.ExecuteCount, Is.EqualTo(1)); + Assert.That(b.ExecuteCount, Is.EqualTo(1)); + Assert.That(c.ExecuteCount, Is.EqualTo(1)); + Assert.That(d.ExecuteCount, Is.EqualTo(1)); + }); } [Test] @@ -47,11 +50,14 @@ public async Task SwitchNoCasesResultsInCorrectCounts() await ExecuteAsync(a, switchModule, c); // Then - Assert.AreEqual(1, a.ExecuteCount); - Assert.AreEqual(1, b.ExecuteCount); - Assert.AreEqual(3, b.InputCount); - Assert.AreEqual(3, b.OutputCount); - Assert.AreEqual(3, c.InputCount); + Assert.Multiple(() => + { + Assert.That(a.ExecuteCount, Is.EqualTo(1)); + Assert.That(b.ExecuteCount, Is.EqualTo(1)); + Assert.That(b.InputCount, Is.EqualTo(3)); + Assert.That(b.OutputCount, Is.EqualTo(3)); + Assert.That(c.InputCount, Is.EqualTo(3)); + }); } [Test] @@ -71,11 +77,14 @@ public async Task MissingDefaultResultsInCorrectCounts() await ExecuteAsync(a, switchModule, c); // Then - Assert.AreEqual(1, a.ExecuteCount); - Assert.AreEqual(1, b.ExecuteCount); - Assert.AreEqual(1, b.InputCount); - Assert.AreEqual(1, b.OutputCount); - Assert.AreEqual(3, c.InputCount); + Assert.Multiple(() => + { + Assert.That(a.ExecuteCount, Is.EqualTo(1)); + Assert.That(b.ExecuteCount, Is.EqualTo(1)); + Assert.That(b.InputCount, Is.EqualTo(1)); + Assert.That(b.OutputCount, Is.EqualTo(1)); + Assert.That(c.InputCount, Is.EqualTo(3)); + }); } [Test] @@ -95,11 +104,14 @@ public async Task ArrayInCaseResultsInCorrectCounts() await ExecuteAsync(a, switchModule, c); // Then - Assert.AreEqual(1, a.ExecuteCount); - Assert.AreEqual(1, b.ExecuteCount); - Assert.AreEqual(2, b.InputCount); - Assert.AreEqual(2, b.OutputCount); - Assert.AreEqual(3, c.InputCount); + Assert.Multiple(() => + { + Assert.That(a.ExecuteCount, Is.EqualTo(1)); + Assert.That(b.ExecuteCount, Is.EqualTo(1)); + Assert.That(b.InputCount, Is.EqualTo(2)); + Assert.That(b.OutputCount, Is.EqualTo(2)); + Assert.That(c.InputCount, Is.EqualTo(3)); + }); } [Test] @@ -118,7 +130,7 @@ public async Task OmittingCasesAndDefaultResultsInCorrectCounts() await ExecuteAsync(a, switchModule, b); // Then - Assert.AreEqual(3, b.InputCount); + Assert.That(b.InputCount, Is.EqualTo(3)); } } } diff --git a/tests/core/Statiq.Core.Tests/Modules/Control/GroupDocumentsFixture.cs b/tests/core/Statiq.Core.Tests/Modules/Control/GroupDocumentsFixture.cs index 5fefb3d1..cf87cdf9 100644 --- a/tests/core/Statiq.Core.Tests/Modules/Control/GroupDocumentsFixture.cs +++ b/tests/core/Statiq.Core.Tests/Modules/Control/GroupDocumentsFixture.cs @@ -35,7 +35,7 @@ public async Task SetsCorrectMetadata() IReadOnlyList results = await ExecuteAsync(count, groupByMany, gatherData); // Then - CollectionAssert.AreEquivalent(new[] { 0, 1, 2, 3 }, groupKey); + Assert.That(groupKey, Is.EquivalentTo(new[] { 0, 1, 2, 3 })); } [Test] @@ -66,11 +66,14 @@ public async Task SetsDocumentsInMetadata() IReadOnlyList results = await ExecuteAsync(count, groupByMany, orderBy, gatherData); // Then - Assert.AreEqual(4, content.Count); - CollectionAssert.AreEquivalent(new[] { "3", "6" }, content[0]); - CollectionAssert.AreEquivalent(new[] { "1", "4", "7" }, content[1]); - CollectionAssert.AreEquivalent(new[] { "2", "5", "8" }, content[2]); - CollectionAssert.AreEquivalent(new[] { "1", "2", "3", "4", "5", "6", "7", "8" }, content[3]); + Assert.Multiple(() => + { + Assert.That(content, Has.Count.EqualTo(4)); + Assert.That(content[0], Is.EquivalentTo(new[] { "3", "6" })); + Assert.That(content[1], Is.EquivalentTo(new[] { "1", "4", "7" })); + Assert.That(content[2], Is.EquivalentTo(new[] { "2", "5", "8" })); + Assert.That(content[3], Is.EquivalentTo(new[] { "1", "2", "3", "4", "5", "6", "7", "8" })); + }); } [Test] @@ -96,7 +99,7 @@ public async Task GroupByMetadataKey() IReadOnlyList results = await ExecuteAsync(count, meta, groupByMany, gatherData); // Then - CollectionAssert.AreEquivalent(new[] { 0, 1, 2, 3 }, groupKey); + Assert.That(groupKey, Is.EquivalentTo(new[] { 0, 1, 2, 3 })); } [Test] @@ -127,7 +130,7 @@ public async Task GroupByMetadataKeyWithMissingMetadata() IReadOnlyList results = await ExecuteAsync(count, meta, groupByMany, gatherData); // Then - CollectionAssert.AreEquivalent(new[] { 1, 2, 3 }, groupKey); + Assert.That(groupKey, Is.EquivalentTo(new[] { 1, 2, 3 })); } [Test] @@ -157,7 +160,7 @@ public async Task DefaultComparerIsCaseSensitive() IReadOnlyList results = await ExecuteAsync(meta, groupByMany, gatherData); // Then - CollectionAssert.AreEquivalent(new object[] { "A", "B", "b", "C", "c", 1, "1" }, groupKey); + Assert.That(groupKey, Is.EquivalentTo(new object[] { "A", "B", "b", "C", "c", 1, "1" })); } [Test] @@ -187,7 +190,7 @@ public async Task CaseInsensitiveStringComparer() IReadOnlyList results = await ExecuteAsync(meta, groupByMany, gatherData); // Then - CollectionAssert.AreEquivalent(new object[] { "A", "b", "C", 1 }, groupKey); + Assert.That(groupKey, Is.EquivalentTo(new object[] { "A", "b", "C", 1 })); } } } diff --git a/tests/core/Statiq.Core.Tests/Modules/Control/MergeDocumentsFixture.cs b/tests/core/Statiq.Core.Tests/Modules/Control/MergeDocumentsFixture.cs index 1ecf4443..7aadaa3b 100644 --- a/tests/core/Statiq.Core.Tests/Modules/Control/MergeDocumentsFixture.cs +++ b/tests/core/Statiq.Core.Tests/Modules/Control/MergeDocumentsFixture.cs @@ -35,7 +35,7 @@ public async Task ReplacesContent() new SetMetadata("Content", Config.FromDocument(async doc => await doc.GetContentStringAsync()))); // Then - CollectionAssert.AreEqual(new[] { "1121" }, results.Select(x => x["Content"])); + Assert.That(results.Select(x => x["Content"]), Is.EqualTo(new[] { "1121" }).AsCollection); } [Test] @@ -60,7 +60,7 @@ public async Task ReverseReplacesContent() new SetMetadata("Content", Config.FromDocument(async doc => await doc.GetContentStringAsync()))); // Then - CollectionAssert.AreEqual(new[] { "11" }, results.Select(x => x["Content"])); + Assert.That(results.Select(x => x["Content"]), Is.EqualTo(new[] { "11" }).AsCollection); } [Test] @@ -82,8 +82,11 @@ public async Task CombinesMetadata() IReadOnlyList results = await ExecuteAsync(a, new MergeDocuments(b)); // Then - CollectionAssert.AreEqual(new[] { 11 }, results.Select(x => x["A"])); - CollectionAssert.AreEqual(new[] { 21 }, results.Select(x => x["B"])); + Assert.Multiple(() => + { + Assert.That(results.Select(x => x["A"]), Is.EqualTo(new[] { 11 }).AsCollection); + Assert.That(results.Select(x => x["B"]), Is.EqualTo(new[] { 21 }).AsCollection); + }); } [Test] @@ -105,7 +108,7 @@ public async Task CombinesAndOverwritesMetadata() IReadOnlyList results = await ExecuteAsync(a, new MergeDocuments(b)); // Then - CollectionAssert.AreEqual(new[] { 21 }, results.Select(x => x["A"])); + Assert.That(results.Select(x => x["A"]), Is.EqualTo(new[] { 21 }).AsCollection); } [Test] @@ -127,10 +130,13 @@ public async Task SingleInputSingleResult() IReadOnlyList results = await ExecuteAsync(a, new MergeDocuments(b)); // Then - Assert.AreEqual(1, a.OutputCount); - Assert.AreEqual(1, b.OutputCount); - CollectionAssert.AreEqual(new[] { 11 }, results.Select(x => x["A"])); - CollectionAssert.AreEqual(new[] { 21 }, results.Select(x => x["B"])); + Assert.Multiple(() => + { + Assert.That(a.OutputCount, Is.EqualTo(1)); + Assert.That(b.OutputCount, Is.EqualTo(1)); + Assert.That(results.Select(x => x["A"]), Is.EqualTo(new[] { 11 }).AsCollection); + Assert.That(results.Select(x => x["B"]), Is.EqualTo(new[] { 21 }).AsCollection); + }); } [Test] @@ -152,11 +158,14 @@ public async Task SingleInputMultipleResults() // When IReadOnlyList results = await ExecuteAsync(a, new MergeDocuments(b)); - // Then - Assert.AreEqual(1, a.OutputCount); - Assert.AreEqual(2, b.OutputCount); - CollectionAssert.AreEqual(new[] { 11, 11 }, results.Select(x => x["A"])); - CollectionAssert.AreEqual(new[] { 21, 22 }, results.Select(x => x["B"])); + Assert.Multiple(() => + { + // Then + Assert.That(a.OutputCount, Is.EqualTo(1)); + Assert.That(b.OutputCount, Is.EqualTo(2)); + Assert.That(results.Select(x => x["A"]), Is.EqualTo(new[] { 11, 11 }).AsCollection); + Assert.That(results.Select(x => x["B"]), Is.EqualTo(new[] { 21, 22 }).AsCollection); + }); } [Test] @@ -236,15 +245,18 @@ public async Task ResultsInCorrectCountsWithInputDocuments() IReadOnlyList results = await ExecuteAsync(a, new MergeDocuments(b), c); // Then - Assert.AreEqual(1, a.ExecuteCount); - Assert.AreEqual(1, b.ExecuteCount); - Assert.AreEqual(1, c.ExecuteCount); - Assert.AreEqual(1, a.InputCount); - Assert.AreEqual(2, b.InputCount); - Assert.AreEqual(12, c.InputCount); - Assert.AreEqual(2, a.OutputCount); - Assert.AreEqual(6, b.OutputCount); - Assert.AreEqual(48, c.OutputCount); + Assert.Multiple(() => + { + Assert.That(a.ExecuteCount, Is.EqualTo(1)); + Assert.That(b.ExecuteCount, Is.EqualTo(1)); + Assert.That(c.ExecuteCount, Is.EqualTo(1)); + Assert.That(a.InputCount, Is.EqualTo(1)); + Assert.That(b.InputCount, Is.EqualTo(2)); + Assert.That(c.InputCount, Is.EqualTo(12)); + Assert.That(a.OutputCount, Is.EqualTo(2)); + Assert.That(b.OutputCount, Is.EqualTo(6)); + Assert.That(c.OutputCount, Is.EqualTo(48)); + }); results.Count.ShouldBe(48); } } diff --git a/tests/core/Statiq.Core.Tests/Modules/Control/OrderDocumentsFixture.cs b/tests/core/Statiq.Core.Tests/Modules/Control/OrderDocumentsFixture.cs index bf8f686c..8b09a622 100644 --- a/tests/core/Statiq.Core.Tests/Modules/Control/OrderDocumentsFixture.cs +++ b/tests/core/Statiq.Core.Tests/Modules/Control/OrderDocumentsFixture.cs @@ -107,8 +107,8 @@ public async Task OrdersThenByInAscendingOrder() await ExecuteAsync(count, count2, orderBy, gatherData); // Then - Assert.AreEqual(10, content.Count); // (4+1) * (21+1) - CollectionAssert.AreEqual(new[] { "11", "12", "23", "24", "35", "36", "47", "48", "59", "510" }, content); + Assert.That(content, Has.Count.EqualTo(10)); // (4+1) * (21+1) + Assert.That(content, Is.EqualTo(new[] { "11", "12", "23", "24", "35", "36", "47", "48", "59", "510" }).AsCollection); } [Test] @@ -139,8 +139,8 @@ public async Task OrdersThenByInDescendingOrder() await ExecuteAsync(count, count2, orderBy, gatherData); // Then - Assert.AreEqual(10, content.Count); // (4+1) * (21+1) - CollectionAssert.AreEqual(new[] { "12", "11", "24", "23", "36", "35", "48", "47", "510", "59" }, content); + Assert.That(content.Count, Is.EqualTo(10)); // (4+1) * (21+1) + Assert.That(content, Is.EqualTo(new[] { "12", "11", "24", "23", "36", "35", "48", "47", "510", "59" }).AsCollection); } [Test] @@ -172,8 +172,8 @@ public async Task OrdersDescendingThenByInDescendingOrder() await ExecuteAsync(count, count2, orderBy, gatherData); // Then - Assert.AreEqual(10, content.Count); // (4+1) * (21+1) - CollectionAssert.AreEqual(new[] { "510", "59", "48", "47", "36", "35", "24", "23", "12", "11" }, content); + Assert.That(content, Has.Count.EqualTo(10)); // (4+1) * (21+1) + Assert.That(content, Is.EqualTo(new[] { "510", "59", "48", "47", "36", "35", "24", "23", "12", "11" }).AsCollection); } [Test] @@ -204,8 +204,8 @@ public async Task OrdersDescendingThenByInAscendingOrder() await ExecuteAsync(count, count2, orderBy, gatherData); // Then - Assert.AreEqual(10, content.Count); // (4+1) * (21+1) - CollectionAssert.AreEqual(new[] { "59", "510", "47", "48", "35", "36", "23", "24", "11", "12" }, content); + Assert.That(content, Has.Count.EqualTo(10)); // (4+1) * (21+1) + Assert.That(content, Is.EqualTo(new[] { "59", "510", "47", "48", "35", "36", "23", "24", "11", "12" }).AsCollection); } [Test] diff --git a/tests/core/Statiq.Core.Tests/Modules/Control/PaginateDocumentsFixture.cs b/tests/core/Statiq.Core.Tests/Modules/Control/PaginateDocumentsFixture.cs index fb51028a..1f6fa4e9 100644 --- a/tests/core/Statiq.Core.Tests/Modules/Control/PaginateDocumentsFixture.cs +++ b/tests/core/Statiq.Core.Tests/Modules/Control/PaginateDocumentsFixture.cs @@ -40,10 +40,13 @@ public async Task PaginateSetsDocumentsInMetadata() await ExecuteAsync(count, paginate, gatherData); // Then - Assert.AreEqual(3, content.Count); - CollectionAssert.AreEqual(new[] { "1", "2", "3" }, content[0]); - CollectionAssert.AreEqual(new[] { "4", "5", "6" }, content[1]); - CollectionAssert.AreEqual(new[] { "7", "8" }, content[2]); + Assert.Multiple(() => + { + Assert.That(content, Has.Count.EqualTo(3)); + Assert.That(content[0], Is.EqualTo(new[] { "1", "2", "3" }).AsCollection); + Assert.That(content[1], Is.EqualTo(new[] { "4", "5", "6" }).AsCollection); + Assert.That(content[2], Is.EqualTo(new[] { "7", "8" }).AsCollection); + }); } [Test] diff --git a/tests/core/Statiq.Core.Tests/Modules/Control/ProcessSidecarFileFixture.cs b/tests/core/Statiq.Core.Tests/Modules/Control/ProcessSidecarFileFixture.cs index 26dd04ad..a4281148 100644 --- a/tests/core/Statiq.Core.Tests/Modules/Control/ProcessSidecarFileFixture.cs +++ b/tests/core/Statiq.Core.Tests/Modules/Control/ProcessSidecarFileFixture.cs @@ -36,8 +36,11 @@ public async Task LoadsSidecarFile() IReadOnlyList documents = await ExecuteAsync(inputs, context, sidecar); // Then - Assert.AreEqual("data: a1", lodedSidecarContent); - Assert.AreEqual("File a1", documents.Single().Content); + Assert.Multiple(() => + { + Assert.That(lodedSidecarContent, Is.EqualTo("data: a1")); + Assert.That(documents.Single().Content, Is.EqualTo("File a1")); + }); } [Test] @@ -63,8 +66,11 @@ public async Task LoadsCustomSidecarFile() IReadOnlyList documents = await ExecuteAsync(inputs, context, sidecar); // Then - Assert.AreEqual("data: other", lodedSidecarContent); - Assert.AreEqual("File a1", documents.Single().Content); + Assert.Multiple(() => + { + Assert.That(lodedSidecarContent, Is.EqualTo("data: other")); + Assert.That(documents.Single().Content, Is.EqualTo("File a1")); + }); } [Test] @@ -90,8 +96,11 @@ public async Task ReturnsOriginalDocumentForMissingSidecarFile() IReadOnlyList documents = await ExecuteAsync(inputs, context, sidecar); // Then - Assert.IsFalse(executedSidecarModules); - Assert.AreEqual(inputs.First(), documents.First()); + Assert.Multiple(() => + { + Assert.That(executedSidecarModules, Is.False); + Assert.That(documents.First(), Is.EqualTo(inputs.First())); + }); } private TestDocument GetDocument(string source, string content) => diff --git a/tests/core/Statiq.Core.Tests/Modules/Control/ReplaceDocumentsFixture.cs b/tests/core/Statiq.Core.Tests/Modules/Control/ReplaceDocumentsFixture.cs index b3f746e5..ea59f6e0 100644 --- a/tests/core/Statiq.Core.Tests/Modules/Control/ReplaceDocumentsFixture.cs +++ b/tests/core/Statiq.Core.Tests/Modules/Control/ReplaceDocumentsFixture.cs @@ -36,8 +36,8 @@ public async Task PipelineReturnsCorrectDocuments() await engine.ExecuteAsync(cancellationTokenSource.Token); // Then - Assert.AreEqual(4, content.Count); - CollectionAssert.AreEquivalent(new[] { "A", "B", "C", "D" }, content); + Assert.That(content, Has.Count.EqualTo(4)); + Assert.That(content, Is.EquivalentTo(new[] { "A", "B", "C", "D" })); } [Test] @@ -63,8 +63,8 @@ public async Task EmptyConstructorWithSpecifiedPipelinesReturnsCorrectDocuments( await engine.ExecuteAsync(cancellationTokenSource.Token); // Then - Assert.AreEqual(6, content.Count); - CollectionAssert.AreEquivalent(new[] { "A", "B", "C", "D", "G", "H" }, content); + Assert.That(content, Has.Count.EqualTo(6)); + Assert.That(content, Is.EquivalentTo(new[] { "A", "B", "C", "D", "G", "H" })); } [Test] @@ -90,8 +90,8 @@ public async Task SpecifiedPipelineDocumentsAreReturnedInCorrectOrder() await engine.ExecuteAsync(cancellationTokenSource.Token); // Then - Assert.AreEqual(6, content.Count); - CollectionAssert.AreEquivalent(new[] { "G", "H", "A", "B", "C", "D" }, content); + Assert.That(content, Has.Count.EqualTo(6)); + Assert.That(content, Is.EquivalentTo(new[] { "G", "H", "A", "B", "C", "D" })); } } } diff --git a/tests/core/Statiq.Core.Tests/Modules/Extensibility/ExecuteConfigFixture.cs b/tests/core/Statiq.Core.Tests/Modules/Extensibility/ExecuteConfigFixture.cs index 6480415c..465631fb 100644 --- a/tests/core/Statiq.Core.Tests/Modules/Extensibility/ExecuteConfigFixture.cs +++ b/tests/core/Statiq.Core.Tests/Modules/Extensibility/ExecuteConfigFixture.cs @@ -40,7 +40,7 @@ public async Task ContextConfigReturnsInputsForNullResult() IReadOnlyList outputs = await ExecuteAsync(inputs, execute); // Then - CollectionAssert.AreEqual(inputs, outputs); + Assert.That(outputs, Is.EqualTo(inputs).AsCollection); } [Test] @@ -156,7 +156,7 @@ public async Task DocumentConfigReturnsInputsForNullResult() IReadOnlyList outputs = await ExecuteAsync(inputs, execute); // Then - CollectionAssert.AreEqual(inputs, outputs); + Assert.That(outputs, Is.EqualTo(inputs).AsCollection); } [Test] @@ -174,7 +174,7 @@ public async Task DocumentConfigReturnsDocumentForSingleResultDocument() IReadOnlyList result = await ExecuteAsync(count, execute); // Then - CollectionAssert.AreEquivalent(document, result.Single()); + Assert.That(result.Single(), Is.EquivalentTo(document)); } [Test] diff --git a/tests/core/Statiq.Core.Tests/Modules/IO/CopyFilesFixture.cs b/tests/core/Statiq.Core.Tests/Modules/IO/CopyFilesFixture.cs index f8b90032..d400efb5 100644 --- a/tests/core/Statiq.Core.Tests/Modules/IO/CopyFilesFixture.cs +++ b/tests/core/Statiq.Core.Tests/Modules/IO/CopyFilesFixture.cs @@ -41,12 +41,15 @@ public async Task RecursivePatternCopiesFiles() await ExecuteAsync(context, copyFiles); // Then - Assert.IsTrue(context.FileSystem.GetOutputFile("test-a.txt").Exists); - Assert.IsTrue(context.FileSystem.GetOutputFile("test-b.txt").Exists); - Assert.IsTrue(context.FileSystem.GetOutputFile("Subfolder/test-c.txt").Exists); - Assert.IsTrue(context.FileSystem.GetOutputDirectory("Subfolder").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("markdown-x.md").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("Subfolder/markdown-y.md").Exists); + Assert.Multiple(() => + { + Assert.That(context.FileSystem.GetOutputFile("test-a.txt").Exists, Is.True); + Assert.That(context.FileSystem.GetOutputFile("test-b.txt").Exists, Is.True); + Assert.That(context.FileSystem.GetOutputFile("Subfolder/test-c.txt").Exists, Is.True); + Assert.That(context.FileSystem.GetOutputDirectory("Subfolder").Exists, Is.True); + Assert.That(context.FileSystem.GetOutputFile("markdown-x.md").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("Subfolder/markdown-y.md").Exists, Is.False); + }); } [Test] @@ -60,12 +63,15 @@ public async Task CopyFilesInTopDirectoryOnly() await ExecuteAsync(context, copyFiles); // Then - Assert.IsTrue(context.FileSystem.GetOutputFile("test-a.txt").Exists); - Assert.IsTrue(context.FileSystem.GetOutputFile("test-b.txt").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("Subfolder/test-c.txt").Exists); - Assert.IsFalse(context.FileSystem.GetOutputDirectory("Subfolder").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("markdown-x.md").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("Subfolder/markdown-y.md").Exists); + Assert.Multiple(() => + { + Assert.That(context.FileSystem.GetOutputFile("test-a.txt").Exists, Is.True); + Assert.That(context.FileSystem.GetOutputFile("test-b.txt").Exists, Is.True); + Assert.That(context.FileSystem.GetOutputFile("Subfolder/test-c.txt").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputDirectory("Subfolder").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("markdown-x.md").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("Subfolder/markdown-y.md").Exists, Is.False); + }); } [Test] @@ -79,12 +85,15 @@ public async Task CopyFilesInSubfolderOnly() await ExecuteAsync(context, copyFiles); // Then - Assert.IsFalse(context.FileSystem.GetOutputFile("test-a.txt").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("test-b.txt").Exists); - Assert.IsTrue(context.FileSystem.GetOutputFile("Subfolder/test-c.txt").Exists); - Assert.IsTrue(context.FileSystem.GetOutputDirectory("Subfolder").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("markdown-x.md").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("Subfolder/markdown-y.md").Exists); + Assert.Multiple(() => + { + Assert.That(context.FileSystem.GetOutputFile("test-a.txt").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("test-b.txt").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("Subfolder/test-c.txt").Exists, Is.True); + Assert.That(context.FileSystem.GetOutputDirectory("Subfolder").Exists, Is.True); + Assert.That(context.FileSystem.GetOutputFile("markdown-x.md").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("Subfolder/markdown-y.md").Exists, Is.False); + }); } [Test] @@ -98,13 +107,16 @@ public async Task DoesNotCopyFilesAboveInputPath() await ExecuteAsync(context, copyFiles); // Then - Assert.IsFalse(context.FileSystem.GetOutputFile("test-a.txt").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("test-b.txt").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("Subfolder/test-c.txt").Exists); - Assert.IsFalse(context.FileSystem.GetOutputDirectory("Subfolder").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("markdown-x.md").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("Subfolder/markdown-y.md").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("test-above-input.txt").Exists); + Assert.Multiple(() => + { + Assert.That(context.FileSystem.GetOutputFile("test-a.txt").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("test-b.txt").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("Subfolder/test-c.txt").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputDirectory("Subfolder").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("markdown-x.md").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("Subfolder/markdown-y.md").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("test-above-input.txt").Exists, Is.False); + }); } [Test] @@ -118,13 +130,16 @@ public async Task CopyFilesAboveInputPathWithOthers() await ExecuteAsync(context, copyFiles); // Then - Assert.IsTrue(context.FileSystem.GetOutputFile("test-a.txt").Exists); - Assert.IsTrue(context.FileSystem.GetOutputFile("test-b.txt").Exists); - Assert.IsTrue(context.FileSystem.GetOutputFile("Subfolder/test-c.txt").Exists); - Assert.IsTrue(context.FileSystem.GetOutputDirectory("Subfolder").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("markdown-x.md").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("Subfolder/markdown-y.md").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("test-above-input.txt").Exists); // Files outside an input path will not be copied + Assert.Multiple(() => + { + Assert.That(context.FileSystem.GetOutputFile("test-a.txt").Exists, Is.True); + Assert.That(context.FileSystem.GetOutputFile("test-b.txt").Exists, Is.True); + Assert.That(context.FileSystem.GetOutputFile("Subfolder/test-c.txt").Exists, Is.True); + Assert.That(context.FileSystem.GetOutputDirectory("Subfolder").Exists, Is.True); + Assert.That(context.FileSystem.GetOutputFile("markdown-x.md").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("Subfolder/markdown-y.md").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("test-above-input.txt").Exists, Is.False); // Files outside an input path will not be copied + }); } [Test] @@ -138,12 +153,15 @@ public async Task CopyFolderFromAbsolutePath() await ExecuteAsync(context, copyFiles); // Then - Assert.IsTrue(context.FileSystem.GetOutputFile("test-a.txt").Exists); - Assert.IsTrue(context.FileSystem.GetOutputFile("test-b.txt").Exists); - Assert.IsTrue(context.FileSystem.GetOutputFile("Subfolder/test-c.txt").Exists); - Assert.IsTrue(context.FileSystem.GetOutputDirectory("Subfolder").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("markdown-x.md").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("Subfolder/markdown-y.md").Exists); + Assert.Multiple(() => + { + Assert.That(context.FileSystem.GetOutputFile("test-a.txt").Exists, Is.True); + Assert.That(context.FileSystem.GetOutputFile("test-b.txt").Exists, Is.True); + Assert.That(context.FileSystem.GetOutputFile("Subfolder/test-c.txt").Exists, Is.True); + Assert.That(context.FileSystem.GetOutputDirectory("Subfolder").Exists, Is.True); + Assert.That(context.FileSystem.GetOutputFile("markdown-x.md").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("Subfolder/markdown-y.md").Exists, Is.False); + }); } [Test] @@ -157,12 +175,15 @@ public async Task CopyNonExistingFolder() await ExecuteAsync(context, copyFiles); // Then - Assert.IsFalse(context.FileSystem.GetOutputFile("test-a.txt").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("test-b.txt").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("Subfolder/test-c.txt").Exists); - Assert.IsFalse(context.FileSystem.GetOutputDirectory("Subfolder").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("markdown-x.md").Exists); - Assert.IsFalse(context.FileSystem.GetOutputFile("Subfolder/markdown-y.md").Exists); + Assert.Multiple(() => + { + Assert.That(context.FileSystem.GetOutputFile("test-a.txt").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("test-b.txt").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("Subfolder/test-c.txt").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputDirectory("Subfolder").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("markdown-x.md").Exists, Is.False); + Assert.That(context.FileSystem.GetOutputFile("Subfolder/markdown-y.md").Exists, Is.False); + }); } public async Task ShouldSetSourceAndDestination() diff --git a/tests/core/Statiq.Core.Tests/Modules/IO/ReadWebFixture.cs b/tests/core/Statiq.Core.Tests/Modules/IO/ReadWebFixture.cs index cc7999f9..ca4b425e 100644 --- a/tests/core/Statiq.Core.Tests/Modules/IO/ReadWebFixture.cs +++ b/tests/core/Statiq.Core.Tests/Modules/IO/ReadWebFixture.cs @@ -41,14 +41,17 @@ public async Task SingleHtmlDownloadGetStream() // Then Dictionary headers = result[Keys.SourceHeaders] as Dictionary; - Assert.IsNotNull(headers, "Header cannot be null"); - Assert.IsTrue(headers.Count > 0, "Headers must contain contents"); - - foreach (KeyValuePair h in headers) + Assert.Multiple(() => { - Assert.IsNotEmpty(h.Key, "Header key cannot be empty"); - Assert.IsNotEmpty(h.Value, "Header value cannot be empty"); - } + Assert.That(headers, Is.Not.Null, "Header cannot be null"); + Assert.That(headers, Is.Not.Empty, "Headers must contain contents"); + + foreach (KeyValuePair h in headers) + { + Assert.That(h.Key, Is.Not.Empty, "Header key cannot be empty"); + Assert.That(h.Value, Is.Not.Empty, "Header value cannot be empty"); + } + }); result.Content.ShouldNotBeEmpty(); } @@ -81,14 +84,17 @@ public async Task MultipleHtmlDownload() { Dictionary headers = result[Keys.SourceHeaders] as Dictionary; - Assert.IsNotNull(headers, "Header cannot be null"); - Assert.IsTrue(headers.Count > 0, "Headers must contain contents"); - - foreach (KeyValuePair h in headers) + Assert.Multiple(() => { - Assert.IsNotEmpty(h.Key, "Header key cannot be empty"); - Assert.IsNotEmpty(h.Value, "Header value cannot be empty"); - } + Assert.That(headers, Is.Not.Null, "Header cannot be null"); + Assert.That(headers, Is.Not.Empty, "Headers must contain contents"); + + foreach (KeyValuePair h in headers) + { + Assert.That(h.Key, Is.Not.Empty, "Header key cannot be empty"); + Assert.That(h.Value, Is.Not.Empty, "Header value cannot be empty"); + } + }); result.Content.ShouldNotBeEmpty(); } From 643dfc3c6b9889eae175517fd9fc153ed43537d9 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 24 Sep 2024 16:14:18 +0200 Subject: [PATCH 22/47] Update SixLabors.ImageSharp to 2.1.9 --- src/extensions/Statiq.Images/Statiq.Images.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/Statiq.Images/Statiq.Images.csproj b/src/extensions/Statiq.Images/Statiq.Images.csproj index b588603c..ffccc47c 100644 --- a/src/extensions/Statiq.Images/Statiq.Images.csproj +++ b/src/extensions/Statiq.Images/Statiq.Images.csproj @@ -4,7 +4,7 @@ Statiq Static StaticContent StaticSite Blog BlogEngine Images ImageProcessor - + From 1ca963ba63d6b202f0477c04a6979caf801029c0 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 24 Sep 2024 16:17:57 +0200 Subject: [PATCH 23/47] Update Microsoft.AspNetCore.Mvc.Razor.Extensions to 6.0.33 --- src/extensions/Statiq.Razor/Statiq.Razor.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/Statiq.Razor/Statiq.Razor.csproj b/src/extensions/Statiq.Razor/Statiq.Razor.csproj index becf47e3..5638d6f0 100644 --- a/src/extensions/Statiq.Razor/Statiq.Razor.csproj +++ b/src/extensions/Statiq.Razor/Statiq.Razor.csproj @@ -8,7 +8,7 @@ - + From 4d125a708ffe8b998bc82efc2778e9a53bf3ef3d Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 24 Sep 2024 16:20:11 +0200 Subject: [PATCH 24/47] Update Microsoft.AspNetCore.Razor.Language to 6.0.33 --- src/extensions/Statiq.Razor/Statiq.Razor.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/Statiq.Razor/Statiq.Razor.csproj b/src/extensions/Statiq.Razor/Statiq.Razor.csproj index 5638d6f0..43297cc5 100644 --- a/src/extensions/Statiq.Razor/Statiq.Razor.csproj +++ b/src/extensions/Statiq.Razor/Statiq.Razor.csproj @@ -7,7 +7,7 @@ - + From 99d6e3f2638fbe862ba4bbac256458fd9da9cad9 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 24 Sep 2024 16:22:13 +0200 Subject: [PATCH 25/47] Update Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation to 6.0.33 & 8.0.8 --- src/extensions/Statiq.Razor/Statiq.Razor.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extensions/Statiq.Razor/Statiq.Razor.csproj b/src/extensions/Statiq.Razor/Statiq.Razor.csproj index 43297cc5..b6f4ac3d 100644 --- a/src/extensions/Statiq.Razor/Statiq.Razor.csproj +++ b/src/extensions/Statiq.Razor/Statiq.Razor.csproj @@ -12,13 +12,13 @@ - + - + From c53e71e6c8fe9692966a956d25e0d2c61caedb59 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 24 Sep 2024 16:27:06 +0200 Subject: [PATCH 26/47] Update Microsoft.Extensions.DependencyInjection.Abstractions to 8.0.1 --- src/core/Statiq.Common/Statiq.Common.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Statiq.Common/Statiq.Common.csproj b/src/core/Statiq.Common/Statiq.Common.csproj index 4ddba87e..96dad27a 100644 --- a/src/core/Statiq.Common/Statiq.Common.csproj +++ b/src/core/Statiq.Common/Statiq.Common.csproj @@ -17,7 +17,7 @@ - + From 01b8bcaf131d312a2fc5481ef52a61a200117dfb Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 24 Sep 2024 16:28:20 +0200 Subject: [PATCH 27/47] Update Microsoft.Extensions.DependencyModelto 8.0.1 --- src/core/Statiq.Common/Statiq.Common.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Statiq.Common/Statiq.Common.csproj b/src/core/Statiq.Common/Statiq.Common.csproj index 96dad27a..295e7d89 100644 --- a/src/core/Statiq.Common/Statiq.Common.csproj +++ b/src/core/Statiq.Common/Statiq.Common.csproj @@ -18,7 +18,7 @@ - + From dc68fcb50a03680cae7c19ccf251aaa360d20509 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 24 Sep 2024 16:30:51 +0200 Subject: [PATCH 28/47] Microsoft.Extensions.Logging.Abstractions to 8.0.1 --- src/core/Statiq.Common/Statiq.Common.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Statiq.Common/Statiq.Common.csproj b/src/core/Statiq.Common/Statiq.Common.csproj index 295e7d89..78e71e8a 100644 --- a/src/core/Statiq.Common/Statiq.Common.csproj +++ b/src/core/Statiq.Common/Statiq.Common.csproj @@ -20,7 +20,7 @@ - + From 1baa574a4d7f6ac56ac44a256148015232a9e450 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 24 Sep 2024 16:33:47 +0200 Subject: [PATCH 29/47] Microsoft.NET.Test.Sdk to 17.11.1 --- tests/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index 14316103..e9d5c918 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -5,7 +5,7 @@ true - + all From b26caeb0ef340843de8e744ec50c8ed2e57d197a Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 24 Sep 2024 16:34:28 +0200 Subject: [PATCH 30/47] Update NUnit3TestAdapter to 4.6.0 --- tests/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index e9d5c918..423bf2f9 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers From dcd61fb095b4baea92af3a362c2095606211b959 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 24 Sep 2024 16:37:39 +0200 Subject: [PATCH 31/47] NUnit.Analyzers to 4.3.0 --- tests/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index 423bf2f9..47d08974 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers From 69adafbae5e788214d3442f021897bbd2b1f9268 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 24 Sep 2024 16:46:21 +0200 Subject: [PATCH 32/47] Update deprecated GitHub/actions actions --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a158ac99..a0b985cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,11 +19,11 @@ jobs: NUGET_CERT_REVOCATION_MODE: offline steps: - name: Get Source - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: recursive - name: Install .NET Core SDK - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: | 3.1.x @@ -32,7 +32,7 @@ jobs: - name: Build and Test run: dotnet test --logger "trx;LogFileName=test-results.trx" - name: Upload Test Results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: success() || failure() with: name: test-results-${{ matrix.os }} From 1ea8f9c3438168ebe3245d5d70766b0213bfa318 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 24 Sep 2024 16:53:46 +0200 Subject: [PATCH 33/47] Pin actions to macos-13 because libsass.dylib issues --- .github/workflows/build.yml | 3 ++- .github/workflows/test-report.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a0b985cd..a91306c5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,8 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest, ubuntu-latest, macos-latest] + # libsass.dylib is not working on macos-14 + os: [windows-latest, ubuntu-latest, macos-13] env: # https://github.com/NuGet/Home/issues/11548 # https://twitter.com/xoofx/status/1488617114940452872?s=20&t=BKSN4j9rP6fOyg8l7aW0eg diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml index 6bc50c1a..928f910c 100644 --- a/.github/workflows/test-report.yml +++ b/.github/workflows/test-report.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest, ubuntu-latest, macos-latest] + os: [windows-latest, ubuntu-latest, macos-13] steps: - name: Process Test Results uses: dorny/test-reporter@v1 From eead1a50bbc264f7856194fca5d115edaa1e3ab6 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 24 Sep 2024 17:11:34 +0200 Subject: [PATCH 34/47] Pin actions to macos-13 because libsass.dylib issues --- .github/workflows/test-report.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml index 928f910c..ad6ce6c6 100644 --- a/.github/workflows/test-report.yml +++ b/.github/workflows/test-report.yml @@ -10,6 +10,7 @@ jobs: strategy: fail-fast: false matrix: + # libsass.dylib is not working on macos-14 os: [windows-latest, ubuntu-latest, macos-13] steps: - name: Process Test Results From f6f04928377018f9389effebb258d164bd0f9249 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 22 Jan 2025 14:58:57 +0100 Subject: [PATCH 35/47] Drop unsupported net6.0 TFM --- .github/workflows/build.yml | 2 -- Directory.Build.props | 2 +- src/core/Statiq.App/Statiq.App.csproj | 11 ----------- src/core/Statiq.Common/Statiq.Common.csproj | 9 --------- src/core/Statiq.Core/Statiq.Core.csproj | 5 ----- src/core/Statiq.Testing/Statiq.Testing.csproj | 5 ----- src/extensions/Statiq.Razor/Statiq.Razor.csproj | 8 -------- .../Statiq.Common.Tests/Statiq.Common.Tests.csproj | 5 ----- tests/core/Statiq.Core.Tests/Statiq.Core.Tests.csproj | 5 ----- tests/core/TestConsoleApp/TestConsoleApp.csproj | 2 +- 10 files changed, 2 insertions(+), 52 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a91306c5..33aaa96a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,8 +27,6 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: | - 3.1.x - 6.0.x 8.0.x - name: Build and Test run: dotnet test --logger "trx;LogFileName=test-results.trx" diff --git a/Directory.Build.props b/Directory.Build.props index f18d474a..8cf2361d 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -18,7 +18,7 @@ SYSLIB0010: 'MarshalByRefObject.InitializeLifetimeService()' is obsolete: 'This Remoting API is not supported and throws PlatformNotSupportedException.' --> CA1021;CA1040;CA1062;CA1505;CA1710;CA1711;CA1720;CA1721;CA1725;CS0672;SYSLIB0010;SYSLIB0013;VSTHRD103;$(NoWarn) - net6.0;net8.0 + net8.0 1.0.0 $(StatiqFrameworkVersion) $(Version) diff --git a/src/core/Statiq.App/Statiq.App.csproj b/src/core/Statiq.App/Statiq.App.csproj index 15d45f5d..dfd73db6 100644 --- a/src/core/Statiq.App/Statiq.App.csproj +++ b/src/core/Statiq.App/Statiq.App.csproj @@ -16,17 +16,6 @@ - - - - - - - - - - - diff --git a/src/core/Statiq.Common/Statiq.Common.csproj b/src/core/Statiq.Common/Statiq.Common.csproj index 78e71e8a..393e8e9a 100644 --- a/src/core/Statiq.Common/Statiq.Common.csproj +++ b/src/core/Statiq.Common/Statiq.Common.csproj @@ -7,15 +7,6 @@ - - - - - - - - - diff --git a/src/core/Statiq.Core/Statiq.Core.csproj b/src/core/Statiq.Core/Statiq.Core.csproj index 892c4b93..d88e36b2 100644 --- a/src/core/Statiq.Core/Statiq.Core.csproj +++ b/src/core/Statiq.Core/Statiq.Core.csproj @@ -14,11 +14,6 @@ - - - - - diff --git a/src/core/Statiq.Testing/Statiq.Testing.csproj b/src/core/Statiq.Testing/Statiq.Testing.csproj index 750432dc..9cdbeccb 100644 --- a/src/core/Statiq.Testing/Statiq.Testing.csproj +++ b/src/core/Statiq.Testing/Statiq.Testing.csproj @@ -10,11 +10,6 @@ build - - - - - diff --git a/src/extensions/Statiq.Razor/Statiq.Razor.csproj b/src/extensions/Statiq.Razor/Statiq.Razor.csproj index b6f4ac3d..39bfd34d 100644 --- a/src/extensions/Statiq.Razor/Statiq.Razor.csproj +++ b/src/extensions/Statiq.Razor/Statiq.Razor.csproj @@ -10,14 +10,6 @@ - - - - - - - - diff --git a/tests/core/Statiq.Common.Tests/Statiq.Common.Tests.csproj b/tests/core/Statiq.Common.Tests/Statiq.Common.Tests.csproj index 0ffcd293..22782306 100644 --- a/tests/core/Statiq.Common.Tests/Statiq.Common.Tests.csproj +++ b/tests/core/Statiq.Common.Tests/Statiq.Common.Tests.csproj @@ -3,11 +3,6 @@ - - - - - diff --git a/tests/core/Statiq.Core.Tests/Statiq.Core.Tests.csproj b/tests/core/Statiq.Core.Tests/Statiq.Core.Tests.csproj index d081975a..34bf1b0c 100644 --- a/tests/core/Statiq.Core.Tests/Statiq.Core.Tests.csproj +++ b/tests/core/Statiq.Core.Tests/Statiq.Core.Tests.csproj @@ -3,11 +3,6 @@ - - - - - \ No newline at end of file diff --git a/tests/core/TestConsoleApp/TestConsoleApp.csproj b/tests/core/TestConsoleApp/TestConsoleApp.csproj index 921b61b6..64218619 100644 --- a/tests/core/TestConsoleApp/TestConsoleApp.csproj +++ b/tests/core/TestConsoleApp/TestConsoleApp.csproj @@ -2,7 +2,7 @@ Exe - net6.0;net8.0 + net8.0 From 28177f72855494f0eea82a27c43bb1e1e8123b00 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 22 Jan 2025 15:00:55 +0100 Subject: [PATCH 36/47] Update Microsoft.NET.Test.Sdk to 17.12.0 --- tests/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index 47d08974..cb690007 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -5,7 +5,7 @@ true - + all From c4284769aa8c4e210feabad741d18606d626cf93 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 22 Jan 2025 15:04:09 +0100 Subject: [PATCH 37/47] Update NUnit.Analyzers to 4.6.0 --- tests/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index cb690007..14c28081 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers From 0541c9298165a0c4d56188d5daa90f9b5a470a87 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 22 Jan 2025 15:08:01 +0100 Subject: [PATCH 38/47] Update Microsoft.Extensions.DependencyInjection to 8.0.1 --- src/core/Statiq.App/Statiq.App.csproj | 2 +- src/core/Statiq.Testing/Statiq.Testing.csproj | 2 +- src/extensions/Statiq.Razor/Statiq.Razor.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/Statiq.App/Statiq.App.csproj b/src/core/Statiq.App/Statiq.App.csproj index dfd73db6..29e46b69 100644 --- a/src/core/Statiq.App/Statiq.App.csproj +++ b/src/core/Statiq.App/Statiq.App.csproj @@ -20,7 +20,7 @@ - + diff --git a/src/core/Statiq.Testing/Statiq.Testing.csproj b/src/core/Statiq.Testing/Statiq.Testing.csproj index 9cdbeccb..c1ba7bc2 100644 --- a/src/core/Statiq.Testing/Statiq.Testing.csproj +++ b/src/core/Statiq.Testing/Statiq.Testing.csproj @@ -10,7 +10,7 @@ build - + diff --git a/src/extensions/Statiq.Razor/Statiq.Razor.csproj b/src/extensions/Statiq.Razor/Statiq.Razor.csproj index 39bfd34d..255ed02b 100644 --- a/src/extensions/Statiq.Razor/Statiq.Razor.csproj +++ b/src/extensions/Statiq.Razor/Statiq.Razor.csproj @@ -11,7 +11,7 @@ - + From 5fbd47c0e8716d439af2c0df9180e0d38ee660fb Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 22 Jan 2025 15:09:05 +0100 Subject: [PATCH 39/47] Update Roslynator.Analyzers to 4.6.4 --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 8cf2361d..4c0f8fc1 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -49,7 +49,7 @@ - + From 7324ec41efa862bf94ac72acdacbc8066a845e7b Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 22 Jan 2025 15:10:22 +0100 Subject: [PATCH 40/47] Update Microsoft.Extensions.Logging to 8.0.1 --- src/core/Statiq.App/Statiq.App.csproj | 2 +- src/core/Statiq.Core/Statiq.Core.csproj | 2 +- src/core/Statiq.Testing/Statiq.Testing.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/Statiq.App/Statiq.App.csproj b/src/core/Statiq.App/Statiq.App.csproj index 29e46b69..afa586d3 100644 --- a/src/core/Statiq.App/Statiq.App.csproj +++ b/src/core/Statiq.App/Statiq.App.csproj @@ -21,7 +21,7 @@ - + diff --git a/src/core/Statiq.Core/Statiq.Core.csproj b/src/core/Statiq.Core/Statiq.Core.csproj index d88e36b2..d4ed55e9 100644 --- a/src/core/Statiq.Core/Statiq.Core.csproj +++ b/src/core/Statiq.Core/Statiq.Core.csproj @@ -14,7 +14,7 @@ - + diff --git a/src/core/Statiq.Testing/Statiq.Testing.csproj b/src/core/Statiq.Testing/Statiq.Testing.csproj index c1ba7bc2..a66dc517 100644 --- a/src/core/Statiq.Testing/Statiq.Testing.csproj +++ b/src/core/Statiq.Testing/Statiq.Testing.csproj @@ -11,7 +11,7 @@ - + From db1d8023c0fc818c17e24c19436842a31b053b01 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 22 Jan 2025 15:12:43 +0100 Subject: [PATCH 41/47] Update YamlDotNet to 13.0.2 --- src/extensions/Statiq.Yaml/Statiq.Yaml.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/Statiq.Yaml/Statiq.Yaml.csproj b/src/extensions/Statiq.Yaml/Statiq.Yaml.csproj index 082aae7c..a9022a80 100644 --- a/src/extensions/Statiq.Yaml/Statiq.Yaml.csproj +++ b/src/extensions/Statiq.Yaml/Statiq.Yaml.csproj @@ -4,7 +4,7 @@ Statiq Static StaticContent StaticSite Blog BlogEngine Yaml - + From ae33cad723dcdb53f3178ff742ae2c9b3162561b Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 22 Jan 2025 15:13:52 +0100 Subject: [PATCH 42/47] Update Microsoft.Extensions.DependencyInjection.Abstractions to 8.0.2 --- src/core/Statiq.Common/Statiq.Common.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Statiq.Common/Statiq.Common.csproj b/src/core/Statiq.Common/Statiq.Common.csproj index 393e8e9a..6b87e218 100644 --- a/src/core/Statiq.Common/Statiq.Common.csproj +++ b/src/core/Statiq.Common/Statiq.Common.csproj @@ -8,7 +8,7 @@ - + From 0402f862c74c52f8df1bd982ab79ed0987e19af9 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 22 Jan 2025 15:15:41 +0100 Subject: [PATCH 43/47] Update Microsoft.Extensions.Configuration.Json to 8.0.1 --- src/core/Statiq.App/Statiq.App.csproj | 2 +- tests/core/Statiq.Common.Tests/Statiq.Common.Tests.csproj | 2 +- tests/core/Statiq.Core.Tests/Statiq.Core.Tests.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/Statiq.App/Statiq.App.csproj b/src/core/Statiq.App/Statiq.App.csproj index afa586d3..6cf160ec 100644 --- a/src/core/Statiq.App/Statiq.App.csproj +++ b/src/core/Statiq.App/Statiq.App.csproj @@ -18,7 +18,7 @@ - + diff --git a/tests/core/Statiq.Common.Tests/Statiq.Common.Tests.csproj b/tests/core/Statiq.Common.Tests/Statiq.Common.Tests.csproj index 22782306..c92fd1e6 100644 --- a/tests/core/Statiq.Common.Tests/Statiq.Common.Tests.csproj +++ b/tests/core/Statiq.Common.Tests/Statiq.Common.Tests.csproj @@ -3,7 +3,7 @@ - + diff --git a/tests/core/Statiq.Core.Tests/Statiq.Core.Tests.csproj b/tests/core/Statiq.Core.Tests/Statiq.Core.Tests.csproj index 34bf1b0c..601756aa 100644 --- a/tests/core/Statiq.Core.Tests/Statiq.Core.Tests.csproj +++ b/tests/core/Statiq.Core.Tests/Statiq.Core.Tests.csproj @@ -3,6 +3,6 @@ - + \ No newline at end of file From 52b3ca0bedd50255a19c3306994faf8f1f6e4ffd Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 22 Jan 2025 15:16:56 +0100 Subject: [PATCH 44/47] Update Microsoft.Extensions.Configuration.Xml to 8.0.1 --- src/core/Statiq.App/Statiq.App.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Statiq.App/Statiq.App.csproj b/src/core/Statiq.App/Statiq.App.csproj index 6cf160ec..39ee6ef1 100644 --- a/src/core/Statiq.App/Statiq.App.csproj +++ b/src/core/Statiq.App/Statiq.App.csproj @@ -19,7 +19,7 @@ - + From 2d6a62a9abd4bbd0af4b6a690001998528f55b1c Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 22 Jan 2025 15:18:08 +0100 Subject: [PATCH 45/47] Update Microsoft.Extensions.Logging.Debug to 8.0.1 --- src/core/Statiq.App/Statiq.App.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Statiq.App/Statiq.App.csproj b/src/core/Statiq.App/Statiq.App.csproj index 39ee6ef1..5f71cba7 100644 --- a/src/core/Statiq.App/Statiq.App.csproj +++ b/src/core/Statiq.App/Statiq.App.csproj @@ -22,7 +22,7 @@ - + From 7104a670c5dffb8d092fcdf89a78eea9771d8876 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 22 Jan 2025 15:19:02 +0100 Subject: [PATCH 46/47] Update Microsoft.Extensions.Logging.Abstractions to 8.0.2 --- src/core/Statiq.Common/Statiq.Common.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Statiq.Common/Statiq.Common.csproj b/src/core/Statiq.Common/Statiq.Common.csproj index 6b87e218..b0132215 100644 --- a/src/core/Statiq.Common/Statiq.Common.csproj +++ b/src/core/Statiq.Common/Statiq.Common.csproj @@ -11,7 +11,7 @@ - + From a89fc1801201de5294a51769c8de60a0a4d1492b Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 22 Jan 2025 15:19:56 +0100 Subject: [PATCH 47/47] Update Microsoft.Extensions.DependencyModel to 8.0.2 --- src/core/Statiq.Common/Statiq.Common.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Statiq.Common/Statiq.Common.csproj b/src/core/Statiq.Common/Statiq.Common.csproj index b0132215..c0368f1d 100644 --- a/src/core/Statiq.Common/Statiq.Common.csproj +++ b/src/core/Statiq.Common/Statiq.Common.csproj @@ -9,7 +9,7 @@ - +