Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SDK to .NET 8 target net6.0 and net8.0, drop netcoreapp3.1, fix tests culture assert issues #273

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8e8dca5
Add net6.0 and net8.0 moniker
devlead Nov 18, 2023
7d42fc1
Add net6.0 and net8.0 moniker
devlead Nov 18, 2023
eceac16
Update Microsoft.SourceLink.GitHub to 8.0.0
devlead Nov 18, 2023
37fa617
Update SharpZipLib to 1.4.2
devlead Nov 18, 2023
22035b1
Fix tests that can break on non en-US
devlead Nov 18, 2023
ad2655e
Update Microsoft.NET.Test.Sdk to 17.8.0
devlead Nov 18, 2023
a26ae1b
Update NUnit3TestAdapter to 4.5.0
devlead Nov 18, 2023
0667acd
Update Microsoft.CodeAnalysis.CSharp.Scripting to 4.7.0
devlead Nov 18, 2023
876088d
Update Microsoft.CodeAnalysis.CSharp to 4.7.0
devlead Nov 18, 2023
1f962e6
Update System.Collections.Immutable to 7.0.0
devlead Nov 18, 2023
d8e0e8a
Address breaking change in code analysis
devlead Nov 18, 2023
2a423e5
Drop netcoreapp3.1, dropped by transient dependencies
devlead Nov 18, 2023
b7c864f
Update Microsoft.Extensions.* to 6.0.x & 8.0.0
devlead Nov 18, 2023
1c25c9d
Update Microsoft.AspNetCore.* to 6.0.25 (8.0.0)
devlead Nov 18, 2023
b45abc0
Update Microsoft.IO.RecyclableMemoryStream to 2.3.2
devlead Nov 18, 2023
a7f1d27
Update Microsoft.Data.SqlClient to 5.1.2
devlead Nov 18, 2023
3c5d7c4
Update NUnit to 3.14.0
devlead Nov 18, 2023
71c0fbe
Update Shouldly to 4.2.1
devlead Nov 18, 2023
3e1e704
Update Microsoft.Data.SqlClient to 5.1.5
devlead Feb 12, 2024
da8ac7f
Update Microsoft.NET.Test.Sdk to 17.9.0
devlead Feb 12, 2024
8b1af1f
Update NUnit to 4.0.1
devlead Feb 12, 2024
643dfc3
Update SixLabors.ImageSharp to 2.1.9
devlead Sep 24, 2024
1ca963b
Update Microsoft.AspNetCore.Mvc.Razor.Extensions to 6.0.33
devlead Sep 24, 2024
4d125a7
Update Microsoft.AspNetCore.Razor.Language to 6.0.33
devlead Sep 24, 2024
99d6e3f
Update Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation to 6.0.33 & …
devlead Sep 24, 2024
c53e71e
Update Microsoft.Extensions.DependencyInjection.Abstractions to 8.0.1
devlead Sep 24, 2024
01b8bca
Update Microsoft.Extensions.DependencyModelto 8.0.1
devlead Sep 24, 2024
dc68fcb
Microsoft.Extensions.Logging.Abstractions to 8.0.1
devlead Sep 24, 2024
1baa574
Microsoft.NET.Test.Sdk to 17.11.1
devlead Sep 24, 2024
b26caeb
Update NUnit3TestAdapter to 4.6.0
devlead Sep 24, 2024
dcd61fb
NUnit.Analyzers to 4.3.0
devlead Sep 24, 2024
69adafb
Update deprecated GitHub/actions actions
devlead Sep 24, 2024
1ea8f9c
Pin actions to macos-13 because libsass.dylib issues
devlead Sep 24, 2024
eead1a5
Pin actions to macos-13 because libsass.dylib issues
devlead Sep 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,28 @@ 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
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
6.0.x
8.0.x
- 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 }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,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]
steps:
- name: Process Test Results
uses: dorny/test-reporter@v1
Expand Down
24 changes: 21 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
<Project>
<PropertyGroup>
<!--
Warnings that appeared with .NET 8.0.100
https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1021
https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1040
https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062
https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1505
https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1710
https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1711
https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1720
https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1721
https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1725
https://aka.ms/dotnet-warnings/SYSLIB0013
https://github.com/Microsoft/vs-threading/blob/master/doc/analyzers/VSTHRD103.md

CS0672 - Member 'ItemStream<TItem>.InitializeLifetimeService()' overrides obsolete member 'MarshalByRefObject.InitializeLifetimeService()'
SYSLIB0010: 'MarshalByRefObject.InitializeLifetimeService()' is obsolete: 'This Remoting API is not supported and throws PlatformNotSupportedException.'
-->
<NoWarn>CA1021;CA1040;CA1062;CA1505;CA1710;CA1711;CA1720;CA1721;CA1725;CS0672;SYSLIB0010;SYSLIB0013;VSTHRD103;$(NoWarn)</NoWarn>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<Version Condition="'$(StatiqFrameworkVersion)' == ''">1.0.0</Version>
<Version Condition="'$(StatiqFrameworkVersion)' != ''">$(StatiqFrameworkVersion)</Version>
<InformationalVersion>$(Version)</InformationalVersion>
Expand All @@ -20,7 +39,6 @@
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TargetFramework>netcoreapp3.1</TargetFramework>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904;CA1724</WarningsNotAsErrors>
</PropertyGroup>
Expand All @@ -29,9 +47,9 @@
<None Include="$(MSBuildThisFileDirectory)\icon.png" Pack="true" PackagePath="\"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All"/>
<PackageReference Include="Roslynator.Analyzers" Version="4.0.2" PrivateAssets="All"/>
<PackageReference Include="Roslynator.Analyzers" Version="4.6.2" PrivateAssets="All"/>
<!-- It appears as though there might be a performance issue in versions of Microsoft.VisualStudio.Threading.Analyzers past this at least through 17.0.64 -->
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="16.9.60" PrivateAssets="All"/>
</ItemGroup>
Expand Down
27 changes: 19 additions & 8 deletions src/core/Statiq.App/Statiq.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,30 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.Configuration.Xml" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.1.18" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.7.0" />
<PackageReference Include="NetEscapades.Configuration.Yaml" Version="3.1.0" />
<PackageReference Include="NetEscapades.Extensions.Logging.RollingFile" Version="2.2.0" />
<PackageReference Include="Spectre.Console" Version="0.45.0" />
<PackageReference Include="Spectre.Console.Cli" Version="0.45.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Xml" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Xml" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Statiq.Common\Statiq.Common.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> ConvertEnumerable(IEnumerable enumerable)
{
foreach (object value in enumerable)
Expand Down
2 changes: 1 addition & 1 deletion src/core/Statiq.Common/Meta/TypeHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public static bool TryConvert<T>(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<T>.TryConvert(value, out result))
if (MetadataTypeConverter<T>.TryConvertInvariant(value, out result))
{
return true;
}
Expand Down
19 changes: 14 additions & 5 deletions src/core/Statiq.Common/Statiq.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@
<ItemGroup>
<PackageReference Include="AngleSharp" Version="0.16.1" />
<PackageReference Include="ConcurrentHashSet" Version="1.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="3.1.6" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.18" />
<PackageReference Include="NetFabric.Hyperlinq" Version="3.0.0-beta48" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.4" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
</ItemGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Statiq.Core</_Parameter1>
Expand Down
15 changes: 10 additions & 5 deletions src/core/Statiq.Core/Statiq.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@
<PackageReference Include="JavaScriptEngineSwitcher.Core" Version="3.21.0" />
<PackageReference Include="JavaScriptEngineSwitcher.Jint" Version="3.21.2" />
<PackageReference Include="JSPool" Version="2.0.1" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.18" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="1.2.2" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.2" />
<PackageReference Include="Polly" Version="7.1.1" />
<PackageReference Include="SemanticVersioning" Version="1.2.2" />
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" />
<PackageReference Include="System.Collections.Immutable" Version="7.0.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.5" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Statiq.Common\Statiq.Common.csproj" />
Expand Down
15 changes: 10 additions & 5 deletions src/core/Statiq.Testing/Statiq.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@
<PackageTags>Statiq Static StaticContent StaticSite Blog BlogEngine</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.18" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="Shouldly" Version="4.0.3">
<PackageReference Include="NUnit" Version="4.0.1" />
<PackageReference Include="Shouldly" Version="4.2.1">
<!-- See https://github.com/shouldly/shouldly/issues/795 -->
<ExcludeAssets>build</ExcludeAssets>
</PackageReference>
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
<PackageReference Include="System.Collections.Immutable" Version="7.0.0" />
</ItemGroup> <ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Statiq.Common\Statiq.Common.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/Statiq.Images/Statiq.Images.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PackageTags>Statiq Static StaticContent StaticSite Blog BlogEngine Images ImageProcessor</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.9" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\core\Statiq.Common\Statiq.Common.csproj" />
Expand Down
22 changes: 15 additions & 7 deletions src/extensions/Statiq.Razor/Statiq.Razor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Razor.Language" Version="3.1.15" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.15" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="3.1.15" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.1.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Composite" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="3.1.18" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Language" Version="6.0.33" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="6.0.33" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.33" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Composite" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="6.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.8" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Composite" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\core\Statiq.Common\Statiq.Common.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/Statiq.Xmp/Statiq.Xmp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MetadataExtractor" Version="2.2.0" />
<PackageReference Include="SharpZipLib" Version="1.2.0" />
<PackageReference Include="SharpZipLib" Version="1.4.2" />
<PackageReference Include="XmpCore" Version="6.1.10" />
</ItemGroup>
<ItemGroup>
Expand Down
8 changes: 6 additions & 2 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
<HasRuntimeOutput>true</HasRuntimeOutput>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
24 changes: 12 additions & 12 deletions tests/core/Statiq.App.Tests/Bootstrapper/BootstrapperFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/core/Statiq.Common.Tests/Documents/DocumentFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void IdIsNotTheSameForDifferentDocuments()
IDocument b = new ObjectDocument<CustomObject>(obj);

// Then
Assert.AreNotEqual(a.Id, b.Id);
Assert.That(b.Id, Is.Not.EqualTo(a.Id));
}
}

Expand All @@ -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]
Expand Down
Loading