diff --git a/.github/workflows/speed-comparison.yml b/.github/workflows/speed-comparison.yml
index a8bc3862fb..cc363b2a0f 100644
--- a/.github/workflows/speed-comparison.yml
+++ b/.github/workflows/speed-comparison.yml
@@ -28,28 +28,22 @@ jobs:
with:
dotnet-version: 9.0.x
- - name: Build TUnit AOT .NET 8.0
- run: dotnet publish UnifiedTests.csproj -c Release -p:TestFramework=TUNIT --framework net8.0 --output aot-publish-net8 -p:PublishAot=true --runtime ${{ matrix.os == 'windows-latest' && 'win-x64' || matrix.os == 'ubuntu-latest' && 'linux-x64' || 'osx-arm64' }}
- working-directory: "tools/speed-comparison/UnifiedTests"
-
- - name: Build TUnit AOT .NET 9.0
- run: dotnet publish UnifiedTests.csproj -c Release -p:TestFramework=TUNIT --framework net9.0 --output aot-publish-net9 -p:PublishAot=true --runtime ${{ matrix.os == 'windows-latest' && 'win-x64' || matrix.os == 'ubuntu-latest' && 'linux-x64' || 'osx-arm64' }}
- working-directory: "tools/speed-comparison/UnifiedTests"
-
- - name: Build TUnit Single File .NET 8.0
- run: dotnet publish UnifiedTests.csproj -c Release -p:TestFramework=TUNIT --framework net8.0 --output singlefile-publish-net8 -p:PublishSingleFile=true -p:SelfContained=true --runtime ${{ matrix.os == 'windows-latest' && 'win-x64' || matrix.os == 'ubuntu-latest' && 'linux-x64' || 'osx-arm64' }}
- working-directory: "tools/speed-comparison/UnifiedTests"
-
- - name: Build TUnit Single File .NET 9.0
- run: dotnet publish UnifiedTests.csproj -c Release -p:TestFramework=TUNIT --framework net9.0 --output singlefile-publish-net9 -p:PublishSingleFile=true -p:SelfContained=true --runtime ${{ matrix.os == 'windows-latest' && 'win-x64' || matrix.os == 'ubuntu-latest' && 'linux-x64' || 'osx-arm64' }}
+ - name: Build All Frameworks
+ run: |
+ dotnet build -c Release -p:TestFramework=TUNIT --framework net8.0 --output bin/Release-TUNIT/net8.0
+ dotnet build -c Release -p:TestFramework=TUNIT --framework net9.0 --output bin/Release-TUNIT/net9.0
+ dotnet build -c Release -p:TestFramework=XUNIT --framework net8.0 --output bin/Release-XUNIT/net8.0
+ dotnet build -c Release -p:TestFramework=XUNIT --framework net9.0 --output bin/Release-XUNIT/net9.0
+ dotnet build -c Release -p:TestFramework=NUNIT --framework net8.0 --output bin/Release-NUNIT/net8.0
+ dotnet build -c Release -p:TestFramework=NUNIT --framework net9.0 --output bin/Release-NUNIT/net9.0
+ dotnet build -c Release -p:TestFramework=MSTEST --framework net8.0 --output bin/Release-MSTEST/net8.0
+ dotnet build -c Release -p:TestFramework=MSTEST --framework net9.0 --output bin/Release-MSTEST/net9.0
working-directory: "tools/speed-comparison/UnifiedTests"
- - name: Build All Frameworks
+ - name: Publish TUnit AOT
run: |
- dotnet build -c Release -p:TestFramework=TUNIT
- dotnet build -c Release -p:TestFramework=XUNIT
- dotnet build -c Release -p:TestFramework=NUNIT
- dotnet build -c Release -p:TestFramework=MSTEST
+ dotnet publish -c Release -p:TestFramework=TUNIT -p:Aot=true --framework net8.0 --runtime ${{ matrix.os == 'windows-latest' && 'win-x64' || matrix.os == 'ubuntu-latest' && 'linux-x64' || 'osx-arm64' }} --output bin/Release-TUNIT-AOT/net8.0
+ dotnet publish -c Release -p:TestFramework=TUNIT -p:Aot=true --framework net9.0 --runtime ${{ matrix.os == 'windows-latest' && 'win-x64' || matrix.os == 'ubuntu-latest' && 'linux-x64' || 'osx-arm64' }} --output bin/Release-TUNIT-AOT/net9.0
working-directory: "tools/speed-comparison/UnifiedTests"
- name: Run Benchmark
diff --git a/.gitignore b/.gitignore
index 2d7856147c..3dae757b14 100644
--- a/.gitignore
+++ b/.gitignore
@@ -397,6 +397,7 @@ FodyWeavers.xsd
# JetBrains Rider
*.sln.iml
+.idea/
# Generated Code
*.g.cs
diff --git a/.idea/.idea.TUnit/.idea/workspace.xml b/.idea/.idea.TUnit/.idea/workspace.xml
deleted file mode 100644
index 80e9f39bf6..0000000000
--- a/.idea/.idea.TUnit/.idea/workspace.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
- TUnit.Analyzers.Tests/TUnit.Analyzers.Tests.csproj
- TUnit.Analyzers/TUnit.Analyzers.csproj
- TUnit.Assertions.Analyzers.CodeFixers.Tests/TUnit.Assertions.Analyzers.CodeFixers.Tests.csproj
- TUnit.Assertions.Analyzers.Tests/TUnit.Assertions.Analyzers.Tests.csproj
- TUnit.Assertions.Analyzers/TUnit.Assertions.Analyzers.csproj
- TUnit.Assertions.SourceGenerator.Tests/TUnit.Assertions.SourceGenerator.Tests.csproj
- TUnit.Assertions.Tests/TUnit.Assertions.Tests.csproj
- TUnit.Core.SourceGenerator.Tests/TUnit.Core.SourceGenerator.Tests.csproj
- TUnit.Core.SourceGenerator/TUnit.Core.SourceGenerator.csproj
- TUnit.Engine.SourceGenerator/TUnit.Engine.SourceGenerator.csproj
- TUnit.Engine.Tests/TUnit.Engine.Tests.csproj
- TUnit.Example.Asp.Net.TestProject/TUnit.Example.Asp.Net.TestProject.csproj
- TUnit.Example.Asp.Net/TUnit.Example.Asp.Net.csproj
- TUnit.Example.Asp.Net/TUnit.Example.Asp.Net.csproj
- TUnit.Pipeline/TUnit.Pipeline.csproj
- TUnit.PublicAPI/TUnit.PublicAPI.csproj
- TUnit.RpcTests/TUnit.RpcTests.csproj
- TUnit.Templates.Tests/TUnit.Templates.Tests.csproj
- TUnit.Templates/content/TUnit.AspNet.FSharp/TestProject/TestProject.fsproj
- TUnit.Templates/content/TUnit.AspNet.FSharp/WebApp/WebApp.fsproj
- TUnit.Templates/content/TUnit.AspNet.FSharp/WebApp/WebApp.fsproj
- TUnit.Templates/content/TUnit.AspNet/TestProject/TestProject.csproj
- TUnit.Templates/content/TUnit.AspNet/WebApp/WebApp.csproj
- TUnit.Templates/content/TUnit.AspNet/WebApp/WebApp.csproj
- TUnit.Templates/content/TUnit.AspNet/WebApp/WebApp.csproj
- TUnit.Templates/content/TUnit.Aspire.Starter/ExampleNamespace.ApiService/ExampleNamespace.ApiService.csproj
- TUnit.Templates/content/TUnit.Aspire.Starter/ExampleNamespace.ApiService/ExampleNamespace.ApiService.csproj
- TUnit.Templates/content/TUnit.Aspire.Starter/ExampleNamespace.AppHost/ExampleNamespace.AppHost.csproj
- TUnit.Templates/content/TUnit.Aspire.Starter/ExampleNamespace.AppHost/ExampleNamespace.AppHost.csproj
- TUnit.Templates/content/TUnit.Aspire.Starter/ExampleNamespace.TestProject/ExampleNamespace.TestProject.csproj
- TUnit.Templates/content/TUnit.Aspire.Starter/ExampleNamespace.WebApp/ExampleNamespace.WebApp.csproj
- TUnit.Templates/content/TUnit.Aspire.Starter/ExampleNamespace.WebApp/ExampleNamespace.WebApp.csproj
- TUnit.Templates/content/TUnit.Aspire.Test/ExampleNamespace.csproj
- TUnit.Templates/content/TUnit.FSharp/TestProject.fsproj
- TUnit.Templates/content/TUnit.Playwright/TestProject.csproj
- TUnit.Templates/content/TUnit.VB/TestProject.vbproj
- TUnit.Templates/content/TUnit/TestProject.csproj
- TUnit.TestProject.FSharp/TUnit.TestProject.FSharp.fsproj
- TUnit.TestProject.VB.NET/TUnit.TestProject.VB.NET.vbproj
- TUnit.TestProject/TUnit.TestProject.csproj
- TUnit.UnitTests/TUnit.UnitTests.csproj
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {
- "keyToString": {
- "node.js.selected.package.tslint": "(autodetect)"
- }
-}
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Directory.Packages.props b/Directory.Packages.props
index dc9380f8f8..57b1feafef 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -58,10 +58,7 @@
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
@@ -73,7 +70,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
@@ -82,12 +79,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/Library.props b/Library.props
index 36bd76fc63..c3e8636f73 100644
--- a/Library.props
+++ b/Library.props
@@ -8,10 +8,7 @@
true
-
- true
-
+
true
$(MSBuildThisFileDirectory)strongname.snk
0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7
diff --git a/README.md b/README.md
index f8c41764bc..c7c67a676d 100644
--- a/README.md
+++ b/README.md
@@ -440,10 +440,10 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|------------- |-------- |--------:|---------:|---------:|--------:|
-| Build_TUnit | 0.61.58 | 1.740 s | 0.1459 s | 0.4302 s | 1.716 s |
-| Build_NUnit | 4.4.0 | 1.982 s | 0.1231 s | 0.3609 s | 2.003 s |
-| Build_xUnit | 2.9.3 | 1.573 s | 0.1605 s | 0.4732 s | 1.491 s |
-| Build_MSTest | 3.11.0 | 1.425 s | 0.0672 s | 0.1895 s | 1.402 s |
+| Build_TUnit | 0.63.3 | 1.462 s | 0.1537 s | 0.4532 s | 1.310 s |
+| Build_NUnit | 4.4.0 | 1.744 s | 0.1092 s | 0.3168 s | 1.679 s |
+| Build_xUnit | 2.9.3 | 1.641 s | 0.1261 s | 0.3698 s | 1.592 s |
+| Build_MSTest | 3.11.0 | 1.636 s | 0.1609 s | 0.4668 s | 1.595 s |
@@ -462,10 +462,10 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|------------- |-------- |--------:|---------:|---------:|--------:|
-| Build_TUnit | 0.61.58 | 1.703 s | 0.0329 s | 0.0379 s | 1.695 s |
-| Build_NUnit | 4.4.0 | 1.510 s | 0.0214 s | 0.0189 s | 1.510 s |
-| Build_xUnit | 2.9.3 | 1.547 s | 0.0158 s | 0.0148 s | 1.548 s |
-| Build_MSTest | 3.11.0 | 1.554 s | 0.0233 s | 0.0218 s | 1.558 s |
+| Build_TUnit | 0.63.3 | 1.677 s | 0.0312 s | 0.0320 s | 1.674 s |
+| Build_NUnit | 4.4.0 | 1.494 s | 0.0223 s | 0.0198 s | 1.490 s |
+| Build_xUnit | 2.9.3 | 1.516 s | 0.0204 s | 0.0190 s | 1.515 s |
+| Build_MSTest | 3.11.0 | 1.563 s | 0.0274 s | 0.0243 s | 1.551 s |
@@ -484,10 +484,10 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|------------- |-------- |--------:|---------:|---------:|--------:|
-| Build_TUnit | 0.61.58 | 1.898 s | 0.0378 s | 0.0478 s | 1.889 s |
-| Build_NUnit | 4.4.0 | 1.690 s | 0.0321 s | 0.0330 s | 1.696 s |
-| Build_xUnit | 2.9.3 | 1.666 s | 0.0175 s | 0.0163 s | 1.664 s |
-| Build_MSTest | 3.11.0 | 1.731 s | 0.0331 s | 0.0310 s | 1.734 s |
+| Build_TUnit | 0.63.3 | 1.816 s | 0.0320 s | 0.0300 s | 1.813 s |
+| Build_NUnit | 4.4.0 | 1.740 s | 0.0344 s | 0.0756 s | 1.741 s |
+| Build_xUnit | 2.9.3 | 1.746 s | 0.0308 s | 0.0240 s | 1.745 s |
+| Build_MSTest | 3.11.0 | 1.949 s | 0.0594 s | 0.1723 s | 1.945 s |
### Scenario: Tests focused on assertion performance and validation
@@ -505,20 +505,17 @@ Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |----------:|---------:|---------:|----------:|
+| TUnit | 0.63.3 | 479.46 ms | 26.36 ms | 77.31 ms | 468.46 ms |
+| NUnit | 4.4.0 | NA | NA | NA | NA |
+| xUnit | 2.9.3 | NA | NA | NA | NA |
+| MSTest | 3.11.0 | 772.99 ms | 27.36 ms | 79.82 ms | 767.38 ms |
+| TUnit_AOT | 0.63.3 | 78.72 ms | 10.19 ms | 29.88 ms | 72.16 ms |
Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
@@ -535,20 +532,13 @@ AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
-
-Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |----------:|----------:|----------:|----------:|
+| TUnit | 0.63.3 | 476.11 ms | 3.318 ms | 2.941 ms | 475.39 ms |
+| NUnit | 4.4.0 | 906.72 ms | 16.690 ms | 15.611 ms | 909.59 ms |
+| xUnit | 2.9.3 | 981.64 ms | 17.772 ms | 16.624 ms | 984.23 ms |
+| MSTest | 3.11.0 | 837.91 ms | 16.192 ms | 15.146 ms | 845.11 ms |
+| TUnit_AOT | 0.63.3 | 25.04 ms | 0.435 ms | 0.407 ms | 24.90 ms |
@@ -557,28 +547,21 @@ Benchmarks with issues:
```
BenchmarkDotNet v0.15.4, Windows 11 (10.0.26100.6584/24H2/2024Update/HudsonValley) (Hyper-V)
-Intel Xeon Platinum 8370C CPU 2.80GHz (Max: 2.79GHz), 1 CPU, 4 logical and 2 physical cores
+AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 9.0.305
- [Host] : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v4
- Job-YNJDZW : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v4
+ [Host] : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v3
+ Job-YNJDZW : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v3
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
-
-Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |------------:|----------:|----------:|------------:|
+| TUnit | 0.63.3 | 579.08 ms | 11.140 ms | 11.439 ms | 579.59 ms |
+| NUnit | 4.4.0 | 1,028.66 ms | 15.662 ms | 18.645 ms | 1,026.26 ms |
+| xUnit | 2.9.3 | 1,100.01 ms | 15.464 ms | 14.465 ms | 1,098.76 ms |
+| MSTest | 3.11.0 | 965.98 ms | 16.841 ms | 15.753 ms | 969.80 ms |
+| TUnit_AOT | 0.63.3 | 64.84 ms | 1.596 ms | 4.706 ms | 64.04 ms |
### Scenario: Tests running asynchronous operations and async/await patterns
@@ -596,20 +579,18 @@ Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |---------:|---------:|---------:|---------:|
+| TUnit | 0.63.3 | 367.9 ms | 23.31 ms | 67.62 ms | 363.7 ms |
+| NUnit | 4.4.0 | NA | NA | NA | NA |
+| xUnit | 2.9.3 | NA | NA | NA | NA |
+| MSTest | 3.11.0 | NA | NA | NA | NA |
+| TUnit_AOT | 0.63.3 | 123.0 ms | 10.80 ms | 30.98 ms | 121.5 ms |
Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
@@ -618,28 +599,21 @@ Benchmarks with issues:
```
BenchmarkDotNet v0.15.4, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
-AMD EPYC 7763 2.74GHz, 1 CPU, 4 logical and 2 physical cores
+Intel Xeon Platinum 8370C CPU 2.80GHz (Max: 3.41GHz), 1 CPU, 4 logical and 2 physical cores
.NET SDK 9.0.305
- [Host] : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v3
- Job-YNJDZW : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v3
+ [Host] : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v4
+ Job-YNJDZW : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v4
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
-
-Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |------------:|----------:|----------:|----------:|
+| TUnit | 0.63.3 | 447.75 ms | 3.328 ms | 3.113 ms | 448.32 ms |
+| NUnit | 4.4.0 | 936.85 ms | 15.843 ms | 14.820 ms | 932.42 ms |
+| xUnit | 2.9.3 | 1,000.39 ms | 15.065 ms | 14.092 ms | 997.53 ms |
+| MSTest | 3.11.0 | 875.87 ms | 17.316 ms | 17.783 ms | 881.92 ms |
+| TUnit_AOT | 0.63.3 | 34.15 ms | 1.021 ms | 2.979 ms | 33.99 ms |
@@ -656,20 +630,13 @@ AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
-
-Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |------------:|----------:|----------:|------------:|
+| TUnit | 0.63.3 | 487.90 ms | 6.862 ms | 6.419 ms | 488.06 ms |
+| NUnit | 4.4.0 | 996.81 ms | 16.090 ms | 15.051 ms | 1,001.60 ms |
+| xUnit | 2.9.3 | 1,078.25 ms | 21.004 ms | 25.004 ms | 1,074.69 ms |
+| MSTest | 3.11.0 | 960.32 ms | 18.866 ms | 33.042 ms | 957.71 ms |
+| TUnit_AOT | 0.63.3 | 89.64 ms | 2.507 ms | 7.352 ms | 89.31 ms |
### Scenario: Simple tests with basic operations and assertions
@@ -687,20 +654,18 @@ Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |----------:|---------:|---------:|----------:|
+| TUnit | 0.63.3 | 284.11 ms | 5.665 ms | 14.11 ms | 284.77 ms |
+| NUnit | 4.4.0 | NA | NA | NA | NA |
+| xUnit | 2.9.3 | NA | NA | NA | NA |
+| MSTest | 3.11.0 | NA | NA | NA | NA |
+| TUnit_AOT | 0.63.3 | 46.96 ms | 3.820 ms | 11.02 ms | 44.62 ms |
Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
@@ -709,7 +674,7 @@ Benchmarks with issues:
```
BenchmarkDotNet v0.15.4, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
-AMD EPYC 7763 2.63GHz, 1 CPU, 4 logical and 2 physical cores
+AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 9.0.305
[Host] : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v3
Job-YNJDZW : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v3
@@ -717,20 +682,13 @@ AMD EPYC 7763 2.63GHz, 1 CPU, 4 logical and 2 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
-
-Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |----------:|----------:|----------:|----------:|
+| TUnit | 0.63.3 | 453.60 ms | 3.055 ms | 2.708 ms | 454.25 ms |
+| NUnit | 4.4.0 | 899.90 ms | 16.844 ms | 15.756 ms | 899.44 ms |
+| xUnit | 2.9.3 | 975.65 ms | 16.601 ms | 15.529 ms | 975.10 ms |
+| MSTest | 3.11.0 | 829.74 ms | 16.432 ms | 17.582 ms | 829.26 ms |
+| TUnit_AOT | 0.63.3 | 24.26 ms | 0.153 ms | 0.136 ms | 24.29 ms |
@@ -747,20 +705,13 @@ AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
-
-Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |------------:|----------:|----------:|------------:|
+| TUnit | 0.63.3 | 514.15 ms | 3.565 ms | 3.160 ms | 515.34 ms |
+| NUnit | 4.4.0 | 1,007.07 ms | 20.094 ms | 18.796 ms | 1,016.18 ms |
+| xUnit | 2.9.3 | 1,072.94 ms | 17.351 ms | 15.381 ms | 1,071.46 ms |
+| MSTest | 3.11.0 | 960.30 ms | 19.039 ms | 36.681 ms | 957.30 ms |
+| TUnit_AOT | 0.63.3 | 65.31 ms | 1.702 ms | 4.910 ms | 64.62 ms |
### Scenario: Parameterized tests with multiple test cases using data attributes
@@ -778,20 +729,18 @@ Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |----------:|----------:|---------:|----------:|
+| TUnit | 0.63.3 | 508.28 ms | 28.742 ms | 83.39 ms | 503.10 ms |
+| NUnit | 4.4.0 | NA | NA | NA | NA |
+| xUnit | 2.9.3 | NA | NA | NA | NA |
+| MSTest | 3.11.0 | NA | NA | NA | NA |
+| TUnit_AOT | 0.63.3 | 50.26 ms | 5.691 ms | 15.96 ms | 43.02 ms |
Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
@@ -800,7 +749,7 @@ Benchmarks with issues:
```
BenchmarkDotNet v0.15.4, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
-AMD EPYC 7763 2.61GHz, 1 CPU, 4 logical and 2 physical cores
+AMD EPYC 7763 3.14GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 9.0.305
[Host] : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v3
Job-YNJDZW : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v3
@@ -808,20 +757,13 @@ AMD EPYC 7763 2.61GHz, 1 CPU, 4 logical and 2 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
-
-Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |----------:|----------:|----------:|----------:|
+| TUnit | 0.63.3 | 455.80 ms | 3.669 ms | 3.253 ms | 455.17 ms |
+| NUnit | 4.4.0 | 914.06 ms | 17.555 ms | 17.242 ms | 914.95 ms |
+| xUnit | 2.9.3 | 979.27 ms | 16.884 ms | 15.794 ms | 973.97 ms |
+| MSTest | 3.11.0 | 838.10 ms | 16.382 ms | 16.824 ms | 838.29 ms |
+| TUnit_AOT | 0.63.3 | 26.17 ms | 0.143 ms | 0.111 ms | 26.19 ms |
@@ -838,20 +780,13 @@ AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
-
-Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |------------:|----------:|----------:|------------:|
+| TUnit | 0.63.3 | 538.01 ms | 8.772 ms | 8.206 ms | 537.61 ms |
+| NUnit | 4.4.0 | 1,073.69 ms | 19.276 ms | 18.031 ms | 1,073.06 ms |
+| xUnit | 2.9.3 | 1,213.12 ms | 24.081 ms | 36.043 ms | 1,203.63 ms |
+| MSTest | 3.11.0 | 944.38 ms | 18.063 ms | 36.898 ms | 940.78 ms |
+| TUnit_AOT | 0.63.3 | 70.66 ms | 1.623 ms | 4.604 ms | 69.71 ms |
### Scenario: Tests utilizing class fixtures and shared test context
@@ -869,20 +804,17 @@ Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |----------:|----------:|----------:|----------:|
+| TUnit | 0.63.3 | 288.07 ms | 5.635 ms | 8.434 ms | 286.94 ms |
+| NUnit | 4.4.0 | NA | NA | NA | NA |
+| xUnit | 2.9.3 | NA | NA | NA | NA |
+| MSTest | 3.11.0 | 538.04 ms | 10.750 ms | 27.939 ms | 537.81 ms |
+| TUnit_AOT | 0.63.3 | 61.74 ms | 7.554 ms | 22.155 ms | 57.27 ms |
Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
@@ -891,7 +823,7 @@ Benchmarks with issues:
```
BenchmarkDotNet v0.15.4, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
-AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
+AMD EPYC 7763 2.61GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 9.0.305
[Host] : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v3
Job-YNJDZW : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v3
@@ -899,20 +831,13 @@ AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
-
-Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |----------:|----------:|----------:|----------:|
+| TUnit | 0.63.3 | 455.15 ms | 5.557 ms | 5.198 ms | 455.25 ms |
+| NUnit | 4.4.0 | 915.64 ms | 17.609 ms | 18.083 ms | 911.62 ms |
+| xUnit | 2.9.3 | 988.17 ms | 13.009 ms | 12.169 ms | 983.08 ms |
+| MSTest | 3.11.0 | 844.43 ms | 16.200 ms | 16.636 ms | 840.44 ms |
+| TUnit_AOT | 0.63.3 | 41.37 ms | 1.147 ms | 3.365 ms | 41.22 ms |
@@ -921,28 +846,21 @@ Benchmarks with issues:
```
BenchmarkDotNet v0.15.4, Windows 11 (10.0.26100.6584/24H2/2024Update/HudsonValley) (Hyper-V)
-AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
+Intel Xeon Platinum 8370C CPU 2.80GHz (Max: 2.79GHz), 1 CPU, 4 logical and 2 physical cores
.NET SDK 9.0.305
- [Host] : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v3
- Job-YNJDZW : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v3
+ [Host] : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v4
+ Job-YNJDZW : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v4
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
-
-Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |------------:|----------:|----------:|------------:|
+| TUnit | 0.63.3 | 462.52 ms | 2.747 ms | 2.435 ms | 462.57 ms |
+| NUnit | 4.4.0 | 960.55 ms | 16.492 ms | 15.427 ms | 955.02 ms |
+| xUnit | 2.9.3 | 1,023.13 ms | 14.747 ms | 13.795 ms | 1,020.79 ms |
+| MSTest | 3.11.0 | 902.64 ms | 17.032 ms | 15.932 ms | 904.73 ms |
+| TUnit_AOT | 0.63.3 | 75.34 ms | 1.815 ms | 5.352 ms | 75.61 ms |
### Scenario: Tests executing in parallel to test framework parallelization
@@ -960,20 +878,17 @@ Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |----------:|----------:|----------:|----------:|
+| TUnit | 0.63.3 | 363.11 ms | 21.655 ms | 63.17 ms | 355.38 ms |
+| NUnit | 4.4.0 | 810.36 ms | 39.599 ms | 116.14 ms | 817.71 ms |
+| xUnit | 2.9.3 | NA | NA | NA | NA |
+| MSTest | 3.11.0 | NA | NA | NA | NA |
+| TUnit_AOT | 0.63.3 | 52.73 ms | 7.951 ms | 23.32 ms | 47.71 ms |
Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
@@ -982,7 +897,7 @@ Benchmarks with issues:
```
BenchmarkDotNet v0.15.4, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
-AMD EPYC 7763 3.04GHz, 1 CPU, 4 logical and 2 physical cores
+AMD EPYC 7763 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 9.0.305
[Host] : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v3
Job-YNJDZW : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v3
@@ -990,20 +905,13 @@ AMD EPYC 7763 3.04GHz, 1 CPU, 4 logical and 2 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
-
-Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |------------:|----------:|----------:|------------:|
+| TUnit | 0.63.3 | 447.17 ms | 4.052 ms | 3.790 ms | 446.70 ms |
+| NUnit | 4.4.0 | 923.05 ms | 15.178 ms | 14.197 ms | 923.63 ms |
+| xUnit | 2.9.3 | 1,005.70 ms | 19.824 ms | 25.071 ms | 1,012.18 ms |
+| MSTest | 3.11.0 | 846.51 ms | 16.324 ms | 18.145 ms | 847.05 ms |
+| TUnit_AOT | 0.63.3 | 24.71 ms | 0.117 ms | 0.104 ms | 24.71 ms |
@@ -1020,20 +928,13 @@ AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
-
-Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |------------:|----------:|----------:|------------:|
+| TUnit | 0.63.3 | 483.76 ms | 3.091 ms | 2.892 ms | 482.96 ms |
+| NUnit | 4.4.0 | 989.91 ms | 19.172 ms | 18.830 ms | 990.27 ms |
+| xUnit | 2.9.3 | 1,050.50 ms | 15.138 ms | 14.160 ms | 1,052.16 ms |
+| MSTest | 3.11.0 | 917.36 ms | 17.850 ms | 18.331 ms | 919.22 ms |
+| TUnit_AOT | 0.63.3 | 61.39 ms | 1.670 ms | 4.899 ms | 60.37 ms |
### Scenario: A test that takes 50ms to execute, repeated 100 times
@@ -1051,20 +952,18 @@ Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |----------:|----------:|---------:|----------:|
+| TUnit | 0.63.3 | 354.33 ms | 18.244 ms | 51.76 ms | 342.33 ms |
+| NUnit | 4.4.0 | NA | NA | NA | NA |
+| xUnit | 2.9.3 | NA | NA | NA | NA |
+| MSTest | 3.11.0 | NA | NA | NA | NA |
+| TUnit_AOT | 0.63.3 | 71.02 ms | 8.697 ms | 24.39 ms | 68.41 ms |
Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
@@ -1081,20 +980,13 @@ AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
-
-Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |------------:|----------:|----------:|------------:|
+| TUnit | 0.63.3 | 487.20 ms | 5.421 ms | 4.805 ms | 486.93 ms |
+| NUnit | 4.4.0 | 939.51 ms | 18.004 ms | 17.683 ms | 938.30 ms |
+| xUnit | 2.9.3 | 1,091.21 ms | 21.753 ms | 20.348 ms | 1,094.17 ms |
+| MSTest | 3.11.0 | 867.68 ms | 17.173 ms | 19.777 ms | 872.92 ms |
+| TUnit_AOT | 0.63.3 | 40.28 ms | 0.781 ms | 0.767 ms | 40.06 ms |
@@ -1111,20 +1003,13 @@ AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
-
-Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |------------:|----------:|-----------:|------------:|
+| TUnit | 0.63.3 | 547.41 ms | 7.923 ms | 7.412 ms | 544.94 ms |
+| NUnit | 4.4.0 | 1,042.01 ms | 20.683 ms | 20.314 ms | 1,044.61 ms |
+| xUnit | 2.9.3 | 1,256.12 ms | 37.748 ms | 111.302 ms | 1,201.34 ms |
+| MSTest | 3.11.0 | 990.59 ms | 19.476 ms | 36.100 ms | 983.32 ms |
+| TUnit_AOT | 0.63.3 | 76.87 ms | 1.118 ms | 0.933 ms | 77.14 ms |
### Scenario: Tests with setup and teardown lifecycle methods
@@ -1142,20 +1027,18 @@ Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |----------:|----------:|----------:|----------:|
+| TUnit | 0.63.3 | 306.88 ms | 12.220 ms | 34.863 ms | 297.15 ms |
+| NUnit | 4.4.0 | NA | NA | NA | NA |
+| xUnit | 2.9.3 | NA | NA | NA | NA |
+| MSTest | 3.11.0 | NA | NA | NA | NA |
+| TUnit_AOT | 0.63.3 | 38.42 ms | 3.037 ms | 8.811 ms | 37.08 ms |
Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
@@ -1164,7 +1047,7 @@ Benchmarks with issues:
```
BenchmarkDotNet v0.15.4, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
-AMD EPYC 7763 3.22GHz, 1 CPU, 4 logical and 2 physical cores
+AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 9.0.305
[Host] : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v3
Job-YNJDZW : .NET 9.0.9 (9.0.9, 9.0.925.41916), X64 RyuJIT x86-64-v3
@@ -1172,20 +1055,13 @@ AMD EPYC 7763 3.22GHz, 1 CPU, 4 logical and 2 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
-
-Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |------------:|----------:|----------:|----------:|
+| TUnit | 0.63.3 | 455.06 ms | 4.366 ms | 3.871 ms | 456.07 ms |
+| NUnit | 4.4.0 | 921.14 ms | 16.321 ms | 15.267 ms | 920.60 ms |
+| xUnit | 2.9.3 | 1,004.66 ms | 17.672 ms | 16.530 ms | 999.12 ms |
+| MSTest | 3.11.0 | 853.92 ms | 16.796 ms | 15.711 ms | 845.49 ms |
+| TUnit_AOT | 0.63.3 | 25.88 ms | 0.175 ms | 0.164 ms | 25.89 ms |
@@ -1202,20 +1078,13 @@ AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit | 0.61.58 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | NA | NA | NA | NA |
-| xUnit | 2.9.3 | NA | NA | NA | NA |
-| MSTest | 3.11.0 | NA | NA | NA | NA |
-| TUnit_AOT | 0.61.58 | NA | NA | NA | NA |
-
-Benchmarks with issues:
- RuntimeBenchmarks.TUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.NUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.xUnit: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.MSTest: Job-YNJDZW(Runtime=.NET 9.0)
- RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |------------:|----------:|----------:|------------:|
+| TUnit | 0.63.3 | 493.83 ms | 2.563 ms | 2.397 ms | 493.07 ms |
+| NUnit | 4.4.0 | 999.26 ms | 19.901 ms | 25.168 ms | 996.23 ms |
+| xUnit | 2.9.3 | 1,057.71 ms | 15.826 ms | 14.804 ms | 1,058.51 ms |
+| MSTest | 3.11.0 | 934.66 ms | 17.020 ms | 17.478 ms | 934.94 ms |
+| TUnit_AOT | 0.63.3 | 62.90 ms | 1.511 ms | 4.455 ms | 62.61 ms |
diff --git a/TUnit.Analyzers.CodeFixers/InheritsTestsCodeFixProvider.cs b/TUnit.Analyzers.CodeFixers/InheritsTestsCodeFixProvider.cs
index 37c49cc804..1437836a79 100644
--- a/TUnit.Analyzers.CodeFixers/InheritsTestsCodeFixProvider.cs
+++ b/TUnit.Analyzers.CodeFixers/InheritsTestsCodeFixProvider.cs
@@ -16,12 +16,12 @@ namespace TUnit.Analyzers.CodeFixers;
[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(InheritsTestsCodeFixProvider)), Shared]
public class InheritsTestsCodeFixProvider : CodeFixProvider
{
- public override sealed ImmutableArray FixableDiagnosticIds { get; } =
+ public sealed override ImmutableArray FixableDiagnosticIds { get; } =
ImmutableArray.Create(Rules.DoesNotInheritTestsWarning.Id);
public override FixAllProvider GetFixAllProvider() => WellKnownFixAllProviders.BatchFixer;
- public override sealed async Task RegisterCodeFixesAsync(CodeFixContext context)
+ public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)
{
foreach (var diagnostic in context.Diagnostics)
{
diff --git a/TUnit.Analyzers.CodeFixers/XUnitMigrationCodeFixProvider.cs b/TUnit.Analyzers.CodeFixers/XUnitMigrationCodeFixProvider.cs
index e36af3b34d..c0f66c91c3 100644
--- a/TUnit.Analyzers.CodeFixers/XUnitMigrationCodeFixProvider.cs
+++ b/TUnit.Analyzers.CodeFixers/XUnitMigrationCodeFixProvider.cs
@@ -11,12 +11,12 @@ namespace TUnit.Analyzers.CodeFixers;
[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(XUnitMigrationCodeFixProvider)), Shared]
public class XUnitMigrationCodeFixProvider : CodeFixProvider
{
- public override sealed ImmutableArray FixableDiagnosticIds { get; } =
+ public sealed override ImmutableArray FixableDiagnosticIds { get; } =
ImmutableArray.Create(Rules.XunitMigration.Id);
public override FixAllProvider GetFixAllProvider() => WellKnownFixAllProviders.BatchFixer;
- public override sealed Task RegisterCodeFixesAsync(CodeFixContext context)
+ public sealed override Task RegisterCodeFixesAsync(CodeFixContext context)
{
foreach (var diagnostic in context.Diagnostics)
{
diff --git a/TUnit.Analyzers.Tests/AnalyzerTestHelpers.cs b/TUnit.Analyzers.Tests/AnalyzerTestHelpers.cs
index 84123c7846..cfc1a476b4 100644
--- a/TUnit.Analyzers.Tests/AnalyzerTestHelpers.cs
+++ b/TUnit.Analyzers.Tests/AnalyzerTestHelpers.cs
@@ -183,7 +183,7 @@ public static CSharpSuppressorTest CreateSuppresso
}
}
-file static class DiagnosticSeverityExtensions
+static file class DiagnosticSeverityExtensions
{
public static ReportDiagnostic ToReportDiagnostic(this DiagnosticSeverity severity)
=> severity switch
diff --git a/TUnit.Analyzers/ConcurrentDiagnosticAnalyzer.cs b/TUnit.Analyzers/ConcurrentDiagnosticAnalyzer.cs
index 40473f4c39..d0114b7601 100644
--- a/TUnit.Analyzers/ConcurrentDiagnosticAnalyzer.cs
+++ b/TUnit.Analyzers/ConcurrentDiagnosticAnalyzer.cs
@@ -4,7 +4,7 @@ namespace TUnit.Analyzers;
public abstract class ConcurrentDiagnosticAnalyzer : DiagnosticAnalyzer
{
- public override sealed void Initialize(AnalysisContext context)
+ public sealed override void Initialize(AnalysisContext context)
{
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
context.EnableConcurrentExecution();
diff --git a/TUnit.Assertions.Analyzers.CodeFixers/AwaitAssertionCodeFixProvider.cs b/TUnit.Assertions.Analyzers.CodeFixers/AwaitAssertionCodeFixProvider.cs
index f76ce17c6a..0924421d73 100644
--- a/TUnit.Assertions.Analyzers.CodeFixers/AwaitAssertionCodeFixProvider.cs
+++ b/TUnit.Assertions.Analyzers.CodeFixers/AwaitAssertionCodeFixProvider.cs
@@ -13,12 +13,12 @@ namespace TUnit.Assertions.Analyzers.CodeFixers;
[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(AwaitAssertionCodeFixProvider)), Shared]
public class AwaitAssertionCodeFixProvider : CodeFixProvider
{
- public override sealed ImmutableArray FixableDiagnosticIds { get; } =
+ public sealed override ImmutableArray FixableDiagnosticIds { get; } =
ImmutableArray.Create(Rules.AwaitAssertion.Id);
public override FixAllProvider GetFixAllProvider() => WellKnownFixAllProviders.BatchFixer;
- public override sealed async Task RegisterCodeFixesAsync(CodeFixContext context)
+ public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)
{
foreach (var diagnostic in context.Diagnostics)
{
diff --git a/TUnit.Assertions.Analyzers.CodeFixers/XUnitAssertionCodeFixProvider.cs b/TUnit.Assertions.Analyzers.CodeFixers/XUnitAssertionCodeFixProvider.cs
index f5f3846a73..c4f6adaea6 100644
--- a/TUnit.Assertions.Analyzers.CodeFixers/XUnitAssertionCodeFixProvider.cs
+++ b/TUnit.Assertions.Analyzers.CodeFixers/XUnitAssertionCodeFixProvider.cs
@@ -12,12 +12,12 @@ namespace TUnit.Assertions.Analyzers.CodeFixers;
[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(XUnitAssertionCodeFixProvider)), Shared]
public class XUnitAssertionCodeFixProvider : CodeFixProvider
{
- public override sealed ImmutableArray FixableDiagnosticIds { get; } =
+ public sealed override ImmutableArray FixableDiagnosticIds { get; } =
ImmutableArray.Create(Rules.XUnitAssertion.Id);
public override FixAllProvider GetFixAllProvider() => WellKnownFixAllProviders.BatchFixer;
- public override sealed async Task RegisterCodeFixesAsync(CodeFixContext context)
+ public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)
{
foreach (var diagnostic in context.Diagnostics)
{
diff --git a/TUnit.Assertions.Analyzers/ConcurrentDiagnosticAnalyzer.cs b/TUnit.Assertions.Analyzers/ConcurrentDiagnosticAnalyzer.cs
index f7280fad44..0c71821ab2 100644
--- a/TUnit.Assertions.Analyzers/ConcurrentDiagnosticAnalyzer.cs
+++ b/TUnit.Assertions.Analyzers/ConcurrentDiagnosticAnalyzer.cs
@@ -4,7 +4,7 @@ namespace TUnit.Assertions.Analyzers;
public abstract class ConcurrentDiagnosticAnalyzer : DiagnosticAnalyzer
{
- public override sealed void Initialize(AnalysisContext context)
+ public sealed override void Initialize(AnalysisContext context)
{
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
context.EnableConcurrentExecution();
diff --git a/TUnit.Assertions/AssertConditions/BaseAssertCondition.cs b/TUnit.Assertions/AssertConditions/BaseAssertCondition.cs
index cd2323f564..14a1c20b82 100644
--- a/TUnit.Assertions/AssertConditions/BaseAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/BaseAssertCondition.cs
@@ -30,7 +30,7 @@ public AssertionResult FailWithMessage(string message)
///
public virtual TimeSpan? WaitFor { get; protected set; }
- internal protected abstract string GetExpectation();
+ protected internal abstract string GetExpectation();
internal virtual string GetExpectationWithReason()
=> $"{GetExpectation()}{GetBecauseReason()}";
diff --git a/TUnit.Assertions/AssertConditions/Connectors/AndAssertCondition.cs b/TUnit.Assertions/AssertConditions/Connectors/AndAssertCondition.cs
index a0509d97a8..a329cb9b05 100644
--- a/TUnit.Assertions/AssertConditions/Connectors/AndAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/Connectors/AndAssertCondition.cs
@@ -18,12 +18,12 @@ public AndAssertCondition(BaseAssertCondition condition1, BaseAssertCondition co
// Not used, as GetExpectationWithReason is overridden
- internal protected override string GetExpectation() => "";
+ protected internal override string GetExpectation() => "";
internal override string GetExpectationWithReason()
=> $"{_condition1.GetExpectationWithReason()}{Environment.NewLine} and {_condition2.GetExpectationWithReason()}";
- internal override sealed async ValueTask GetAssertionResult(object? actualValue, Exception? exception, AssertionMetadata assertionMetadata, string? actualExpression)
+ internal sealed override async ValueTask GetAssertionResult(object? actualValue, Exception? exception, AssertionMetadata assertionMetadata, string? actualExpression)
{
return (await _condition1.GetAssertionResult(actualValue, exception, assertionMetadata, actualExpression))
.And(await _condition2.GetAssertionResult(actualValue, exception, assertionMetadata, actualExpression));
diff --git a/TUnit.Assertions/AssertConditions/Connectors/OrAssertCondition.cs b/TUnit.Assertions/AssertConditions/Connectors/OrAssertCondition.cs
index a255b967b9..001da713ec 100644
--- a/TUnit.Assertions/AssertConditions/Connectors/OrAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/Connectors/OrAssertCondition.cs
@@ -17,12 +17,12 @@ public OrAssertCondition(BaseAssertCondition condition1, BaseAssertCondition con
}
// Not used, as GetExpectationWithReason is overridden
- internal protected override string GetExpectation() => "";
+ protected internal override string GetExpectation() => "";
internal override string GetExpectationWithReason()
=> $"{_condition1.GetExpectationWithReason()}{Environment.NewLine} or {_condition2.GetExpectationWithReason()}";
- internal override sealed async ValueTask GetAssertionResult(object? actualValue, Exception? exception, AssertionMetadata assertionMetadata, string? actualExpression)
+ internal sealed override async ValueTask GetAssertionResult(object? actualValue, Exception? exception, AssertionMetadata assertionMetadata, string? actualExpression)
{
return await (await _condition1.GetAssertionResult(actualValue, exception, assertionMetadata, actualExpression))
.OrAsync(() => _condition2.GetAssertionResult(actualValue, exception, assertionMetadata, actualExpression));
diff --git a/TUnit.Assertions/AssertConditions/ConvertToAssertCondition.cs b/TUnit.Assertions/AssertConditions/ConvertToAssertCondition.cs
index ef7623d7e7..2df252afb3 100644
--- a/TUnit.Assertions/AssertConditions/ConvertToAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/ConvertToAssertCondition.cs
@@ -6,7 +6,7 @@ public abstract class ConvertToAssertCondition : BaseAssertC
public TToType? ConvertedValue { get; private set; }
- protected override sealed async ValueTask GetResult(TFromType? actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ protected sealed override async ValueTask GetResult(TFromType? actualValue, Exception? exception, AssertionMetadata assertionMetadata)
{
var (result, convertedValue) = await ConvertValue(actualValue);
diff --git a/TUnit.Assertions/AssertConditions/DelegateAssertCondition.cs b/TUnit.Assertions/AssertConditions/DelegateAssertCondition.cs
index 7dad1571be..498ddb833e 100644
--- a/TUnit.Assertions/AssertConditions/DelegateAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/DelegateAssertCondition.cs
@@ -43,7 +43,7 @@ AssertionMetadata assertionMetadata
protected virtual string GetFailureMessage(TException? exception) => "";
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
return GetFailureMessage(Exception as TException);
}
diff --git a/TUnit.Assertions/AssertConditions/EnumerableSatisfiesAssertCondition.cs b/TUnit.Assertions/AssertConditions/EnumerableSatisfiesAssertCondition.cs
index a2bc3904fb..2e649bd130 100644
--- a/TUnit.Assertions/AssertConditions/EnumerableSatisfiesAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/EnumerableSatisfiesAssertCondition.cs
@@ -20,7 +20,7 @@ public EnumerableSatisfiesAssertCondition(Func?> mapper
SetSubject(mapperExpression);
}
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
=> $"to satisfy {_assertionBuilderExpression}";
protected override async ValueTask GetResult(
diff --git a/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageContainingExpectedValueAssertCondition.cs b/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageContainingExpectedValueAssertCondition.cs
index e7be965bca..e3ce66464f 100644
--- a/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageContainingExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageContainingExpectedValueAssertCondition.cs
@@ -7,7 +7,7 @@ public class ExceptionMessageContainingExpectedValueAssertCondition(
: ExpectedValueAssertCondition(expected)
where TException : Exception
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
=> $"message to contain {Formatter.Format(ExpectedValue).TruncateWithEllipsis(100)}";
protected override ValueTask GetResult(TException? actualValue, string? expectedValue)
diff --git a/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageEndingWithExpectedValueAssertCondition.cs b/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageEndingWithExpectedValueAssertCondition.cs
index bf1db7260f..e02c98bf65 100644
--- a/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageEndingWithExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageEndingWithExpectedValueAssertCondition.cs
@@ -7,7 +7,7 @@ public class ExceptionMessageEndingWithExpectedValueAssertCondition(
: ExpectedValueAssertCondition(expected)
where TException : Exception
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
=> $"message to end with {Formatter.Format(ExpectedValue).TruncateWithEllipsis(100)}";
protected override ValueTask GetResult(TException? actualValue, string? expectedValue)
diff --git a/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageEqualsExpectedValueAssertCondition.cs b/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageEqualsExpectedValueAssertCondition.cs
index fdb91bb530..018fd4696c 100644
--- a/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageEqualsExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageEqualsExpectedValueAssertCondition.cs
@@ -7,7 +7,7 @@ public class ExceptionMessageEqualsExpectedValueAssertCondition(stri
: ExpectedValueAssertCondition(expected)
where TException : Exception
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
=> $"message to be equal to {Formatter.Format(expected).TruncateWithEllipsis(100)}";
protected override ValueTask GetResult(TException? actualValue, string? expectedValue)
diff --git a/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageMatchingExpectedAssertCondition.cs b/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageMatchingExpectedAssertCondition.cs
index b508db40ec..423a9a7e80 100644
--- a/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageMatchingExpectedAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageMatchingExpectedAssertCondition.cs
@@ -7,7 +7,7 @@ public class ExceptionMessageMatchingExpectedAssertCondition(StringM
: ExpectedValueAssertCondition(match)
where TException : Exception
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
=> $"message to match {Formatter.Format(ExpectedValue).TruncateWithEllipsis(100)}";
protected override ValueTask GetResult(TException? actualValue, StringMatcher? expectedValue)
diff --git a/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageStartingWithExpectedValueAssertCondition.cs b/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageStartingWithExpectedValueAssertCondition.cs
index 9bc6ead209..e300f7f37d 100644
--- a/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageStartingWithExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/Exceptions/ExceptionMessageStartingWithExpectedValueAssertCondition.cs
@@ -7,7 +7,7 @@ public class ExceptionMessageStartingWithExpectedValueAssertCondition(expected)
where TException : Exception
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
=> $"message to start with {Formatter.Format(ExpectedValue).TruncateWithEllipsis(100)}";
protected override ValueTask GetResult(TException? actualValue, string? expectedValue)
diff --git a/TUnit.Assertions/AssertConditions/ExpectedValueAssertCondition.cs b/TUnit.Assertions/AssertConditions/ExpectedValueAssertCondition.cs
index b5d1ff35a1..f465c3bd0f 100644
--- a/TUnit.Assertions/AssertConditions/ExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/ExpectedValueAssertCondition.cs
@@ -1,3 +1,5 @@
+using System.Diagnostics.CodeAnalysis;
+
namespace TUnit.Assertions.AssertConditions;
public abstract class ExpectedValueAssertCondition(TExpected? expected) : BaseAssertCondition
diff --git a/TUnit.Assertions/AssertConditions/FuncValueAssertCondition.cs b/TUnit.Assertions/AssertConditions/FuncValueAssertCondition.cs
index 29d308c99c..23ce4b6051 100644
--- a/TUnit.Assertions/AssertConditions/FuncValueAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/FuncValueAssertCondition.cs
@@ -10,7 +10,7 @@ string expectation
)
: ExpectedValueAssertCondition(expected)
{
- internal protected override string GetExpectation() => expectation;
+ protected internal override string GetExpectation() => expectation;
protected override ValueTask GetResult(TActual? actualValue, TExpected? expectedValue)
{
diff --git a/TUnit.Assertions/AssertConditions/NotNullExpectedValueAssertCondition.cs b/TUnit.Assertions/AssertConditions/NotNullExpectedValueAssertCondition.cs
index 9b6d52b77e..7da1ceeb4f 100644
--- a/TUnit.Assertions/AssertConditions/NotNullExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/NotNullExpectedValueAssertCondition.cs
@@ -2,7 +2,7 @@ namespace TUnit.Assertions.AssertConditions;
public class NotNullExpectedValueAssertCondition : ConvertToAssertCondition where TActual : class?
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
=> "to not be null";
public override ValueTask<(AssertionResult, TActual?)> ConvertValue(TActual? value)
@@ -19,7 +19,7 @@ internal protected override string GetExpectation()
public class NotNullStructExpectedValueAssertCondition : ConvertToAssertCondition where TActual : struct
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
=> "to not be null";
public override ValueTask<(AssertionResult, TActual)> ConvertValue(TActual? value)
diff --git a/TUnit.Assertions/AssertConditions/NullExpectedValueAssertCondition.cs b/TUnit.Assertions/AssertConditions/NullExpectedValueAssertCondition.cs
index d6c18f13d4..58e2143320 100644
--- a/TUnit.Assertions/AssertConditions/NullExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/NullExpectedValueAssertCondition.cs
@@ -2,7 +2,7 @@ namespace TUnit.Assertions.AssertConditions;
public class NullExpectedValueAssertCondition : BaseAssertCondition
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
=> "to be null";
protected override ValueTask GetResult(
diff --git a/TUnit.Assertions/AssertConditions/SatisfiesAssertCondition.cs b/TUnit.Assertions/AssertConditions/SatisfiesAssertCondition.cs
index fffe5a7414..a292938677 100644
--- a/TUnit.Assertions/AssertConditions/SatisfiesAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/SatisfiesAssertCondition.cs
@@ -19,7 +19,7 @@ public SatisfiesAssertCondition(Func?> mapper,
SetSubject(mapperExpression);
}
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
=> $"to satisfy {_assertionBuilderExpression}";
protected override async ValueTask GetResult(
diff --git a/TUnit.Assertions/AssertConditions/StaticMethodAssertCondition.cs b/TUnit.Assertions/AssertConditions/StaticMethodAssertCondition.cs
index b06bb5d588..39722187e7 100644
--- a/TUnit.Assertions/AssertConditions/StaticMethodAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/StaticMethodAssertCondition.cs
@@ -31,7 +31,7 @@ protected override ValueTask GetResult(T? actualValue, Exceptio
$"'{actualValue}' was expected {expectationVerb} {_methodName}()");
}
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
var expectationVerb = _negated ? "not to satisfy" : "to satisfy";
return $"{expectationVerb} {_methodName}()";
diff --git a/TUnit.Assertions/AssertConditions/ValueAssertCondition.cs b/TUnit.Assertions/AssertConditions/ValueAssertCondition.cs
index efa7343d1f..beb72914fc 100644
--- a/TUnit.Assertions/AssertConditions/ValueAssertCondition.cs
+++ b/TUnit.Assertions/AssertConditions/ValueAssertCondition.cs
@@ -51,7 +51,7 @@ AssertionMetadata assertionMetadata
protected abstract string GetFailureMessage(TActual? actualValue);
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
return GetFailureMessage(ActualValue);
}
diff --git a/TUnit.Assertions/AssertionBuilders/AssertionBuilder.cs b/TUnit.Assertions/AssertionBuilders/AssertionBuilder.cs
index b0db196802..276d2720cc 100644
--- a/TUnit.Assertions/AssertionBuilders/AssertionBuilder.cs
+++ b/TUnit.Assertions/AssertionBuilders/AssertionBuilder.cs
@@ -86,7 +86,7 @@ internal AssertionBuilder AppendConnector(ChainType chainType)
return (AssertionBuilder) ((ISource) this).AppendExpression(chainType.ToString());
}
- internal protected void AppendCallerMethod(string?[] expressions, [CallerMemberName] string methodName = "")
+ protected internal void AppendCallerMethod(string?[] expressions, [CallerMemberName] string methodName = "")
{
if (string.IsNullOrEmpty(methodName))
{
diff --git a/TUnit.Assertions/AssertionBuilders/InvokableAssertionBuilder.cs b/TUnit.Assertions/AssertionBuilders/InvokableAssertionBuilder.cs
index d72747d17b..f625c84cb1 100644
--- a/TUnit.Assertions/AssertionBuilders/InvokableAssertionBuilder.cs
+++ b/TUnit.Assertions/AssertionBuilders/InvokableAssertionBuilder.cs
@@ -46,5 +46,5 @@ string IInvokableAssertionBuilder.GetExpression()
return $"{expression[..100]}...";
}
- internal protected Stack Assertions => Source.Assertions;
+ protected internal Stack Assertions => Source.Assertions;
}
diff --git a/TUnit.Assertions/Assertions/Chronology/Conditions/DateOnlyEqualsExpectedValueAssertCondition.cs b/TUnit.Assertions/Assertions/Chronology/Conditions/DateOnlyEqualsExpectedValueAssertCondition.cs
index 725d9dfc13..530e2d48e6 100644
--- a/TUnit.Assertions/Assertions/Chronology/Conditions/DateOnlyEqualsExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Chronology/Conditions/DateOnlyEqualsExpectedValueAssertCondition.cs
@@ -6,7 +6,7 @@ public class DateOnlyEqualsExpectedValueAssertCondition(DateOnly expected) : Exp
{
private int? _tolerance;
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
if (_tolerance is null or 0)
{
diff --git a/TUnit.Assertions/Assertions/Chronology/Conditions/DateTimeEqualsExpectedValueAssertCondition.cs b/TUnit.Assertions/Assertions/Chronology/Conditions/DateTimeEqualsExpectedValueAssertCondition.cs
index 69042edb92..1ff4693c85 100644
--- a/TUnit.Assertions/Assertions/Chronology/Conditions/DateTimeEqualsExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Chronology/Conditions/DateTimeEqualsExpectedValueAssertCondition.cs
@@ -4,7 +4,7 @@ public class DateTimeEqualsExpectedValueAssertCondition(DateTime expected) : Exp
{
private TimeSpan? _tolerance;
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
if (_tolerance == null || _tolerance == TimeSpan.Zero)
{
diff --git a/TUnit.Assertions/Assertions/Chronology/Conditions/DateTimeOffsetEqualsExpectedValueAssertCondition.cs b/TUnit.Assertions/Assertions/Chronology/Conditions/DateTimeOffsetEqualsExpectedValueAssertCondition.cs
index 9fb1dcc672..dc049505af 100644
--- a/TUnit.Assertions/Assertions/Chronology/Conditions/DateTimeOffsetEqualsExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Chronology/Conditions/DateTimeOffsetEqualsExpectedValueAssertCondition.cs
@@ -4,7 +4,7 @@ public class DateTimeOffsetEqualsExpectedValueAssertCondition(DateTimeOffset exp
{
private TimeSpan? _tolerance;
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
if (_tolerance == null || _tolerance == TimeSpan.Zero)
{
diff --git a/TUnit.Assertions/Assertions/Chronology/Conditions/TimeOnlyEqualsExpectedValueAssertCondition.cs b/TUnit.Assertions/Assertions/Chronology/Conditions/TimeOnlyEqualsExpectedValueAssertCondition.cs
index edff259ad7..8a085711d4 100644
--- a/TUnit.Assertions/Assertions/Chronology/Conditions/TimeOnlyEqualsExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Chronology/Conditions/TimeOnlyEqualsExpectedValueAssertCondition.cs
@@ -6,7 +6,7 @@ public class TimeOnlyEqualsExpectedValueAssertCondition(TimeOnly expected) : Exp
{
private TimeSpan? _tolerance;
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
if (_tolerance == null || _tolerance == TimeSpan.Zero)
{
diff --git a/TUnit.Assertions/Assertions/Chronology/Conditions/TimeSpanEqualsExpectedValueAssertCondition.cs b/TUnit.Assertions/Assertions/Chronology/Conditions/TimeSpanEqualsExpectedValueAssertCondition.cs
index 3b99b0a173..92afe966cc 100644
--- a/TUnit.Assertions/Assertions/Chronology/Conditions/TimeSpanEqualsExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Chronology/Conditions/TimeSpanEqualsExpectedValueAssertCondition.cs
@@ -4,7 +4,7 @@ public class TimeSpanEqualsExpectedValueAssertCondition(TimeSpan expected) : Exp
{
private TimeSpan? _tolerance;
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
if (_tolerance == null || _tolerance == TimeSpan.Zero)
{
diff --git a/TUnit.Assertions/Assertions/ClassMembers/Conditions/PropertyEqualsExpectedValueAssertCondition.cs b/TUnit.Assertions/Assertions/ClassMembers/Conditions/PropertyEqualsExpectedValueAssertCondition.cs
index 7891109823..873722aa5a 100644
--- a/TUnit.Assertions/Assertions/ClassMembers/Conditions/PropertyEqualsExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/ClassMembers/Conditions/PropertyEqualsExpectedValueAssertCondition.cs
@@ -7,15 +7,11 @@ namespace TUnit.Assertions.AssertConditions.ClassMember;
public class PropertyEqualsExpectedValueAssertCondition(Expression> propertySelector, TPropertyType expected, bool isEqual)
: ExpectedValueAssertCondition(expected)
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
return $"{typeof(TRootObjectType).Name}.{ExpressionHelpers.GetName(propertySelector)} to be equal to {ExpectedValue}";
}
-#pragma warning disable IL2046 // Member with 'RequiresUnreferencedCodeAttribute' overrides base member without 'RequiresUnreferencedCodeAttribute'
-#pragma warning disable IL3051 // Member with 'RequiresDynamicCodeAttribute' overrides base member without 'RequiresDynamicCodeAttribute'
- [RequiresUnreferencedCode("Expression compilation requires unreferenced code")]
- [RequiresDynamicCode("Expression compilation requires dynamic code generation")]
protected override ValueTask GetResult(TRootObjectType? actualValue, TPropertyType? expectedValue)
{
var propertyValue = GetPropertyValue(actualValue);
@@ -26,11 +22,7 @@ protected override ValueTask GetResult(TRootObjectType? actualV
$"received {GetPropertyValue(actualValue)?.ToString()}"
);
}
-#pragma warning restore IL3051
-#pragma warning restore IL2046
- [RequiresUnreferencedCode("Expression compilation requires unreferenced code")]
- [RequiresDynamicCode("Expression compilation requires dynamic code generation")]
private object? GetPropertyValue(TRootObjectType? actualValue)
{
if (actualValue is null)
diff --git a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableAllExpectedFuncAssertCondition.cs b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableAllExpectedFuncAssertCondition.cs
index 32326148a1..989168c849 100644
--- a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableAllExpectedFuncAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableAllExpectedFuncAssertCondition.cs
@@ -5,7 +5,7 @@ public class EnumerableAllExpectedFuncAssertCondition(
: BaseAssertCondition
where TActual : IEnumerable
{
- internal protected override string GetExpectation() => $"to contain only entries matching {matcherString ?? "null"}";
+ protected internal override string GetExpectation() => $"to contain only entries matching {matcherString ?? "null"}";
protected override ValueTask GetResult(
TActual? actualValue, Exception? exception,
diff --git a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableContainsExpectedFuncAssertCondition.cs b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableContainsExpectedFuncAssertCondition.cs
index 7307252478..9212f5c026 100644
--- a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableContainsExpectedFuncAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableContainsExpectedFuncAssertCondition.cs
@@ -6,7 +6,7 @@ public class EnumerableContainsExpectedFuncAssertCondition(
where TActual : IEnumerable
{
private bool _wasFound;
- internal protected override string GetExpectation() => $"to contain an entry matching {matcherString ?? "null"}";
+ protected internal override string GetExpectation() => $"to contain an entry matching {matcherString ?? "null"}";
protected override ValueTask GetResult(
TActual? actualValue, Exception? exception,
diff --git a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableContainsExpectedValueAssertCondition.cs b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableContainsExpectedValueAssertCondition.cs
index 46e5be8ae4..b1e81ed6c1 100644
--- a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableContainsExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableContainsExpectedValueAssertCondition.cs
@@ -6,7 +6,7 @@ public class EnumerableContainsExpectedValueAssertCondition(
: ExpectedValueAssertCondition(expected)
where TActual : IEnumerable
{
- internal protected override string GetExpectation() => $"to contain {ExpectedValue}";
+ protected internal override string GetExpectation() => $"to contain {ExpectedValue}";
protected override ValueTask GetResult(TActual? actualValue, TInner? inner)
=> AssertionResult
diff --git a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableCountEqualToExpectedValueAssertCondition.cs b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableCountEqualToExpectedValueAssertCondition.cs
index e72fb14221..56e12afa26 100644
--- a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableCountEqualToExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableCountEqualToExpectedValueAssertCondition.cs
@@ -5,7 +5,7 @@ namespace TUnit.Assertions.AssertConditions.Collections;
public class EnumerableCountEqualToExpectedValueAssertCondition(int expected)
: ExpectedValueAssertCondition(expected) where TActual : IEnumerable
{
- internal protected override string GetExpectation() => $"to have a count of {ExpectedValue}";
+ protected internal override string GetExpectation() => $"to have a count of {ExpectedValue}";
protected override ValueTask GetResult(TActual? actualValue, int count)
{
diff --git a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableCountNotEqualToExpectedValueAssertCondition.cs b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableCountNotEqualToExpectedValueAssertCondition.cs
index b4d697af64..c5c4f9147b 100644
--- a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableCountNotEqualToExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableCountNotEqualToExpectedValueAssertCondition.cs
@@ -5,7 +5,7 @@ namespace TUnit.Assertions.AssertConditions.Collections;
public class EnumerableCountNotEqualToExpectedValueAssertCondition(int expected)
: ExpectedValueAssertCondition(expected) where TActual : IEnumerable
{
- internal protected override string GetExpectation() => $"to have a count different to {ExpectedValue}";
+ protected internal override string GetExpectation() => $"to have a count different to {ExpectedValue}";
protected override ValueTask GetResult(TActual? actualValue, int count)
{
diff --git a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableDistinctItemsExpectedValueAssertCondition.cs b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableDistinctItemsExpectedValueAssertCondition.cs
index 86bb0acac4..4db31b339c 100644
--- a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableDistinctItemsExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableDistinctItemsExpectedValueAssertCondition.cs
@@ -3,7 +3,7 @@ namespace TUnit.Assertions.AssertConditions.Collections;
public class EnumerableDistinctItemsExpectedValueAssertCondition(IEqualityComparer? equalityComparer)
: BaseAssertCondition where TActual : IEnumerable
{
- internal protected override string GetExpectation() => "items to be distinct";
+ protected internal override string GetExpectation() => "items to be distinct";
protected override ValueTask GetResult(
TActual? actualValue, Exception? exception,
diff --git a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableEquivalentToExpectedValueAssertCondition.cs b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableEquivalentToExpectedValueAssertCondition.cs
index 5a6605d399..44d762c715 100644
--- a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableEquivalentToExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableEquivalentToExpectedValueAssertCondition.cs
@@ -12,7 +12,7 @@ public class EnumerableEquivalentToExpectedValueAssertCondition
: ExpectedValueAssertCondition>(expected)
where TActual : IEnumerable?
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
if (!typeof(TInner).IsSimpleType()
&& equalityComparer is EquivalentToEqualityComparer { ComparisonFailures.Length: > 0 })
diff --git a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableNotContainsExpectedFuncAssertCondition.cs b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableNotContainsExpectedFuncAssertCondition.cs
index a28d8e76ae..2570bfca53 100644
--- a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableNotContainsExpectedFuncAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableNotContainsExpectedFuncAssertCondition.cs
@@ -5,7 +5,7 @@ public class EnumerableNotContainsExpectedFuncAssertCondition(
: BaseAssertCondition
where TActual : IEnumerable
{
- internal protected override string GetExpectation() => $"to contain no entry matching {matcherString ?? "null"}";
+ protected internal override string GetExpectation() => $"to contain no entry matching {matcherString ?? "null"}";
protected override ValueTask GetResult(
TActual? actualValue, Exception? exception,
diff --git a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableNotContainsExpectedValueAssertCondition.cs b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableNotContainsExpectedValueAssertCondition.cs
index 11d7e99569..6294b87f32 100644
--- a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableNotContainsExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableNotContainsExpectedValueAssertCondition.cs
@@ -6,7 +6,7 @@ public class EnumerableNotContainsExpectedValueAssertCondition(
: ExpectedValueAssertCondition(expected)
where TActual : IEnumerable
{
- internal protected override string GetExpectation() => $"to not contain {ExpectedValue}";
+ protected internal override string GetExpectation() => $"to not contain {ExpectedValue}";
protected override ValueTask GetResult(TActual? actualValue, TInner? inner)
=> AssertionResult
diff --git a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableNotEquivalentToExpectedValueAssertCondition.cs b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableNotEquivalentToExpectedValueAssertCondition.cs
index 89f0d4dc45..44cb55f017 100644
--- a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableNotEquivalentToExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableNotEquivalentToExpectedValueAssertCondition.cs
@@ -10,7 +10,7 @@ public class EnumerableNotEquivalentToExpectedValueAssertCondition>(expected)
where TActual : IEnumerable?
{
- internal protected override string GetExpectation() => $"to not be equivalent to {(ExpectedValue != null ? Formatter.Format(ExpectedValue) : null)}";
+ protected internal override string GetExpectation() => $"to not be equivalent to {(ExpectedValue != null ? Formatter.Format(ExpectedValue) : null)}";
protected override ValueTask GetResult(TActual? actualValue, IEnumerable? expectedValue)
{
diff --git a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableOrderedByAssertCondition.cs b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableOrderedByAssertCondition.cs
index ba5d8dfff3..57f885e850 100644
--- a/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableOrderedByAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Collections/Conditions/EnumerableOrderedByAssertCondition.cs
@@ -8,7 +8,7 @@ public class EnumerableOrderedByAssertCondition where TActual : IEnumerable
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
return $"to be in {order} order";
}
diff --git a/TUnit.Assertions/Assertions/Comparables/Conditions/BetweenAssertCondition.cs b/TUnit.Assertions/Assertions/Comparables/Conditions/BetweenAssertCondition.cs
index 6e561b17ba..96f9739403 100644
--- a/TUnit.Assertions/Assertions/Comparables/Conditions/BetweenAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Comparables/Conditions/BetweenAssertCondition.cs
@@ -5,7 +5,7 @@ public class BetweenAssertCondition(TActual minimum, TActual maximum) :
{
private bool _inclusiveBounds;
- internal protected override string GetExpectation() => $"to be between {minimum} & {maximum} ({GetRange()} Range)";
+ protected internal override string GetExpectation() => $"to be between {minimum} & {maximum} ({GetRange()} Range)";
protected override ValueTask GetResult(
TActual? actualValue, Exception? exception,
diff --git a/TUnit.Assertions/Assertions/Comparables/Conditions/NotBetweenAssertCondition.cs b/TUnit.Assertions/Assertions/Comparables/Conditions/NotBetweenAssertCondition.cs
index 6712efaaaf..0acc08b9d6 100644
--- a/TUnit.Assertions/Assertions/Comparables/Conditions/NotBetweenAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Comparables/Conditions/NotBetweenAssertCondition.cs
@@ -5,7 +5,7 @@ public class NotBetweenAssertCondition(TActual minimum, TActual maximum
{
private bool _inclusiveBounds;
- internal protected override string GetExpectation() => $"to not be between {minimum} & {minimum} ({GetRange()} Range)";
+ protected internal override string GetExpectation() => $"to not be between {minimum} & {minimum} ({GetRange()} Range)";
protected override ValueTask GetResult(
TActual? actualValue, Exception? exception,
diff --git a/TUnit.Assertions/Assertions/Delegates/Conditions/CompleteWithinAssertCondition.cs b/TUnit.Assertions/Assertions/Delegates/Conditions/CompleteWithinAssertCondition.cs
index f339ea9cb7..090d245660 100644
--- a/TUnit.Assertions/Assertions/Delegates/Conditions/CompleteWithinAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Delegates/Conditions/CompleteWithinAssertCondition.cs
@@ -6,7 +6,7 @@ namespace TUnit.Assertions.Assertions.Delegates;
public class CompleteWithinAssertCondition(TimeSpan timeSpan) : DelegateAssertCondition
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
=> $"to complete within {timeSpan.PrettyPrint()}";
protected override ValueTask GetResult(
diff --git a/TUnit.Assertions/Assertions/Enums/Conditions/EnumDoesNotHaveFlagAssertCondition.cs b/TUnit.Assertions/Assertions/Enums/Conditions/EnumDoesNotHaveFlagAssertCondition.cs
index bdbf3fbf76..45c96ee5e4 100644
--- a/TUnit.Assertions/Assertions/Enums/Conditions/EnumDoesNotHaveFlagAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Enums/Conditions/EnumDoesNotHaveFlagAssertCondition.cs
@@ -4,7 +4,7 @@ namespace TUnit.Assertions.Assertions.Enums.Conditions;
public class EnumDoesNotHaveFlagAssertCondition(TEnum expected) : BaseAssertCondition where TEnum : Enum
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
return $"to not have the flag {expected.ToString()}";
}
diff --git a/TUnit.Assertions/Assertions/Enums/Conditions/EnumDoesNotHaveSameNameAsCondition.cs b/TUnit.Assertions/Assertions/Enums/Conditions/EnumDoesNotHaveSameNameAsCondition.cs
index f33a453526..8e8c44c900 100644
--- a/TUnit.Assertions/Assertions/Enums/Conditions/EnumDoesNotHaveSameNameAsCondition.cs
+++ b/TUnit.Assertions/Assertions/Enums/Conditions/EnumDoesNotHaveSameNameAsCondition.cs
@@ -6,7 +6,7 @@ public class EnumDoesNotHaveSameNameAsCondition(TExpected expe
where TEnum : Enum
where TExpected : Enum
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
return $"to not have the same name as {Enum.GetName(typeof(TExpected), expected)}";
}
diff --git a/TUnit.Assertions/Assertions/Enums/Conditions/EnumDoesNotHaveSameValueAsCondition.cs b/TUnit.Assertions/Assertions/Enums/Conditions/EnumDoesNotHaveSameValueAsCondition.cs
index a2e85913c2..4143be7b4e 100644
--- a/TUnit.Assertions/Assertions/Enums/Conditions/EnumDoesNotHaveSameValueAsCondition.cs
+++ b/TUnit.Assertions/Assertions/Enums/Conditions/EnumDoesNotHaveSameValueAsCondition.cs
@@ -6,7 +6,7 @@ public class EnumDoesNotHaveSameValueAsCondition(TExpected exp
where TEnum : Enum
where TExpected : Enum
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
return $"to not have the same value as {Enum.GetName(typeof(TExpected), expected)}";
}
diff --git a/TUnit.Assertions/Assertions/Enums/Conditions/EnumHasFlagAssertCondition.cs b/TUnit.Assertions/Assertions/Enums/Conditions/EnumHasFlagAssertCondition.cs
index 6cd7dd39be..7b7ee25669 100644
--- a/TUnit.Assertions/Assertions/Enums/Conditions/EnumHasFlagAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Enums/Conditions/EnumHasFlagAssertCondition.cs
@@ -4,7 +4,7 @@ namespace TUnit.Assertions.Assertions.Enums.Conditions;
public class EnumHasFlagAssertCondition(TEnum expected) : BaseAssertCondition where TEnum : Enum
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
return $"to have the flag {expected.ToString()}";
}
diff --git a/TUnit.Assertions/Assertions/Enums/Conditions/EnumHasSameNameAsCondition.cs b/TUnit.Assertions/Assertions/Enums/Conditions/EnumHasSameNameAsCondition.cs
index 84c74ee6be..9344c89d05 100644
--- a/TUnit.Assertions/Assertions/Enums/Conditions/EnumHasSameNameAsCondition.cs
+++ b/TUnit.Assertions/Assertions/Enums/Conditions/EnumHasSameNameAsCondition.cs
@@ -6,7 +6,7 @@ public class EnumHasSameNameAsCondition(TExpected expected) :
where TEnum : Enum
where TExpected : Enum
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
return $"to have the same name as {Enum.GetName(typeof(TExpected), expected)}";
}
diff --git a/TUnit.Assertions/Assertions/Enums/Conditions/EnumHasSameValueAsCondition.cs b/TUnit.Assertions/Assertions/Enums/Conditions/EnumHasSameValueAsCondition.cs
index b9b7308763..42652f8fad 100644
--- a/TUnit.Assertions/Assertions/Enums/Conditions/EnumHasSameValueAsCondition.cs
+++ b/TUnit.Assertions/Assertions/Enums/Conditions/EnumHasSameValueAsCondition.cs
@@ -6,7 +6,7 @@ public class EnumHasSameValueAsCondition(TExpected expected) :
where TEnum : Enum
where TExpected : Enum
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
{
return $"to have the same value as {Enum.GetName(typeof(TExpected), expected)}";
}
diff --git a/TUnit.Assertions/Assertions/Enums/Conditions/EnumIsDefinedAssertCondition.cs b/TUnit.Assertions/Assertions/Enums/Conditions/EnumIsDefinedAssertCondition.cs
index 88e46efb68..4e716788d4 100644
--- a/TUnit.Assertions/Assertions/Enums/Conditions/EnumIsDefinedAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Enums/Conditions/EnumIsDefinedAssertCondition.cs
@@ -7,7 +7,7 @@ namespace TUnit.Assertions.Assertions.Enums.Conditions;
public class EnumIsDefinedAssertCondition : BaseAssertCondition
where TEnum : struct, Enum
{
- internal protected override string GetExpectation() => "to be defined";
+ protected internal override string GetExpectation() => "to be defined";
protected override ValueTask GetResult(
TEnum actualValue, Exception? exception,
@@ -22,7 +22,7 @@ AssertionMetadata assertionMetadata
public class EnumIsNotDefinedAssertCondition : BaseAssertCondition
where TEnum : struct, Enum
{
- internal protected override string GetExpectation() => "to not be defined";
+ protected internal override string GetExpectation() => "to not be defined";
protected override ValueTask GetResult(
TEnum actualValue, Exception? exception,
diff --git a/TUnit.Assertions/Assertions/Generics/Conditions/AssignableFromExpectedValueAssertCondition.cs b/TUnit.Assertions/Assertions/Generics/Conditions/AssignableFromExpectedValueAssertCondition.cs
index f409fbb439..5ffe74869a 100644
--- a/TUnit.Assertions/Assertions/Generics/Conditions/AssignableFromExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Generics/Conditions/AssignableFromExpectedValueAssertCondition.cs
@@ -5,7 +5,7 @@ namespace TUnit.Assertions.Assertions.Generics.Conditions;
public class AssignableFromExpectedValueAssertCondition(Type expectedType)
: BaseAssertCondition
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
=> $"to be assignable from type {expectedType.Name}";
protected override ValueTask GetResult(
diff --git a/TUnit.Assertions/Assertions/Generics/Conditions/AssignableToExpectedValueAssertCondition.cs b/TUnit.Assertions/Assertions/Generics/Conditions/AssignableToExpectedValueAssertCondition.cs
index fe4a766291..1b1030a065 100644
--- a/TUnit.Assertions/Assertions/Generics/Conditions/AssignableToExpectedValueAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Generics/Conditions/AssignableToExpectedValueAssertCondition.cs
@@ -5,7 +5,7 @@ namespace TUnit.Assertions.Assertions.Generics.Conditions;
public class AssignableToExpectedValueAssertCondition(Type expectedType)
: BaseAssertCondition
{
- internal protected override string GetExpectation()
+ protected internal override string GetExpectation()
=> $"to be assignable to type {expectedType.Name}";
protected override ValueTask GetResult(
diff --git a/TUnit.Assertions/Assertions/Generics/Conditions/ConvertExceptionToValueAssertCondition.cs b/TUnit.Assertions/Assertions/Generics/Conditions/ConvertExceptionToValueAssertCondition.cs
index 8a410cb68a..dcaf46f1d8 100644
--- a/TUnit.Assertions/Assertions/Generics/Conditions/ConvertExceptionToValueAssertCondition.cs
+++ b/TUnit.Assertions/Assertions/Generics/Conditions/ConvertExceptionToValueAssertCondition.cs
@@ -5,14 +5,14 @@ namespace TUnit.Assertions.Assertions.Generics.Conditions;
public class ConvertExceptionToValueAssertCondition : BaseAssertCondition