diff --git a/.claude/docs/workflows.md b/.claude/docs/workflows.md index a882029db0e..f3f1080e688 100644 --- a/.claude/docs/workflows.md +++ b/.claude/docs/workflows.md @@ -11,7 +11,7 @@ dotnet build TUnit.Dev.slnx --no-restore -graphBuild:True Use `TUnit.slnx` for the full solution, including Roslyn version variants. Run `dotnet test` from the relevant test project directory. Core generator snapshots live in `tests/TUnit.Core.SourceGenerator.Tests`; public API snapshots live in `tests/TUnit.PublicAPI`. -Test projects target net8.0, net9.0 and net10.0; only installed runtimes can run, so pass `--framework net10.0` (or another installed one) when the machine lacks the others. The PublicAPI and generator snapshot projects add a net472 leg on Windows only; off Windows, `.Net4_7` snapshot updates come from the `ReceivedSnapshots-windows-latest` CI artifact. +Test projects target net10.0 and net11.0; only installed runtimes can run, so pass `--framework net10.0` (or another installed one) when the machine lacks the other. The PublicAPI and generator snapshot projects add a net472 leg on Windows only; off Windows, `.Net4_7` snapshot updates come from the `ReceivedSnapshots-windows-latest` CI artifact. Scripts in `scripts/` need PowerShell 7. On Linux and macOS, quote any argument containing `*` when calling a native command from PowerShell: unquoted arguments are glob-expanded, so a treenode filter becomes a list of file paths. diff --git a/.devcontainer/install-runtimes.sh b/.devcontainer/install-runtimes.sh index af24163c675..04788d012de 100755 --- a/.devcontainer/install-runtimes.sh +++ b/.devcontainer/install-runtimes.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# The SDK image ships a single runtime, but the test projects target net8.0, net9.0 and -# net10.0 (eng/TestProject.props). Install every runtime they need next to the image's SDK. +# The SDK image ships a single runtime, but the test projects target net10.0 and net11.0 +# (eng/TestProject.props). Install every runtime they need next to the image's SDK. set -euo pipefail dotnet_root="$(dirname "$(readlink -f "$(command -v dotnet)")")" @@ -9,7 +9,7 @@ trap 'rm -f "$installer"' EXIT curl -sSL https://dot.net/v1/dotnet-install.sh -o "$installer" -for channel in 8.0 9.0 10.0; do +for channel in 10.0 11.0; do for runtime in dotnet aspnetcore; do bash "$installer" --channel "$channel" --runtime "$runtime" --install-dir "$dotnet_root" --no-path done diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 68ecd4e371f..4c0f8e961f2 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -113,11 +113,11 @@ TUnit builds and tests on Windows, Linux and macOS. ### Prerequisites - **.NET SDK** matching [`global.json`](../global.json). -- **.NET 8, 9 and 10 runtimes.** The test projects target all three, and a target framework whose +- **.NET 10 and 11 runtimes.** The test projects target both, and a target framework whose runtime is missing fails with "You must install or update .NET". Either run a single framework (`--framework net10.0`, see below) or install the others, including the ASP.NET Core runtime, with [dotnet-install](https://learn.microsoft.com/dotnet/core/tools/dotnet-install-script) - (`--channel 8.0 --runtime dotnet`, `--channel 8.0 --runtime aspnetcore`, and so on). Homebrew's + (`--channel 10.0 --runtime dotnet`, `--channel 10.0 --runtime aspnetcore`, and so on). Homebrew's `dotnet` formula ships one runtime only. - **PowerShell 7** (`pwsh`) for the scripts in `scripts/`. On Linux and macOS they run directly, e.g. `./scripts/run-reflection-tests.ps1`, or as `pwsh scripts/run-reflection-tests.ps1`. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 8581fc779de..ca40a789214 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -82,7 +82,7 @@ body: attributes: label: .NET Version description: What .NET version are you targeting? - placeholder: "e.g., .NET 8.0, .NET 9.0" + placeholder: "e.g., .NET 10.0, .NET 11.0" validations: required: true diff --git a/.github/scripts/process-benchmarks.js b/.github/scripts/process-benchmarks.js index 7c83fce5458..3acea377582 100644 --- a/.github/scripts/process-benchmarks.js +++ b/.github/scripts/process-benchmarks.js @@ -192,7 +192,7 @@ sidebar_position: ${Object.keys(categories.runtime).indexOf(testClass) + 3} :::info Last Updated This benchmark was automatically generated on **${timestamp}** from the latest CI run. -**Environment:** ${environmentInfo.os || 'Ubuntu Latest'} • ${environmentInfo.sdk || '.NET 10'} +**Environment:** ${environmentInfo.os || 'Ubuntu Latest'} • ${environmentInfo.sdk || '.NET 11'} ::: ## 📊 Results @@ -291,7 +291,7 @@ sidebar_position: ${Object.keys(categories.runtime).length + 3} :::info Last Updated This benchmark was automatically generated on **${timestamp}** from the latest CI run. -**Environment:** ${environmentInfo.os || 'Ubuntu Latest'} • ${environmentInfo.sdk || '.NET 10'} +**Environment:** ${environmentInfo.os || 'Ubuntu Latest'} • ${environmentInfo.sdk || '.NET 11'} ::: ## 📊 Results @@ -385,7 +385,7 @@ sidebar_position: 1 :::info Last Updated These benchmarks were automatically generated on **${timestamp}** from the latest CI run. -**Environment:** ${environmentInfo.os || 'Ubuntu Latest'} • ${environmentInfo.sdk || '.NET 10'} +**Environment:** ${environmentInfo.os || 'Ubuntu Latest'} • ${environmentInfo.sdk || '.NET 11'} ::: ## 🚀 Runtime Benchmarks @@ -429,8 +429,8 @@ The benchmarks measure real-world testing patterns: ### Environment - **OS**: ${environmentInfo.os || 'Ubuntu Latest (GitHub Actions)'} -- **Runtime**: ${environmentInfo.host || '.NET 10'} -- **SDK**: ${environmentInfo.sdk || '.NET 10 SDK'} +- **Runtime**: ${environmentInfo.host || '.NET 11'} +- **SDK**: ${environmentInfo.sdk || '.NET 11 SDK'} - **Hardware**: GitHub Actions Standard Runner (Ubuntu) - **Tool**: ${environmentInfo.benchmarkDotNetVersion || 'BenchmarkDotNet'} @@ -507,7 +507,7 @@ const benchmarkSummary = { runtime: Object.keys(categories.runtime), build: Object.keys(categories.build), timestamp: timestamp, - environment: `${environmentInfo.os || 'Ubuntu Latest'} • ${environmentInfo.sdk || '.NET 10'}` + environment: `${environmentInfo.os || 'Ubuntu Latest'} • ${environmentInfo.sdk || '.NET 11'}` }; fs.writeFileSync( diff --git a/.github/scripts/process-mock-benchmarks.js b/.github/scripts/process-mock-benchmarks.js index 678b6658af7..4ff364e8f86 100644 --- a/.github/scripts/process-mock-benchmarks.js +++ b/.github/scripts/process-mock-benchmarks.js @@ -310,7 +310,7 @@ sidebar_position: ${index + 2} :::info Last Updated This benchmark was automatically generated on **${timestamp}** from the latest CI run. -**Environment:** ${environmentInfo.os || 'Ubuntu Latest'} • ${environmentInfo.sdk || '.NET 10'} +**Environment:** ${environmentInfo.os || 'Ubuntu Latest'} • ${environmentInfo.sdk || '.NET 11'} ::: ## 📊 Results @@ -370,7 +370,7 @@ sidebar_position: 4 :::info Last Updated These benchmarks were automatically generated on **${timestamp}** from the latest CI run. -**Environment:** ${environmentInfo.os || 'Ubuntu Latest'} • ${environmentInfo.sdk || '.NET 10'} +**Environment:** ${environmentInfo.os || 'Ubuntu Latest'} • ${environmentInfo.sdk || '.NET 11'} ::: ## 🚀 Overview @@ -401,7 +401,7 @@ ${Object.entries(categoryDescriptions).map(([cat, desc]) => - **Tool**: ${environmentInfo.benchmarkDotNetVersion || 'BenchmarkDotNet'} - **OS**: ${environmentInfo.os || 'Ubuntu Latest (GitHub Actions)'} -- **Runtime**: ${environmentInfo.host || '.NET 10'} +- **Runtime**: ${environmentInfo.host || '.NET 11'} - **Statistical Rigor**: Multiple iterations with warm-up and outlier detection - **Memory**: Allocation tracking enabled via \`[MemoryDiagnoser]\` @@ -454,7 +454,7 @@ console.log(` ✓ Created ${STATIC_DIR}/latest.json`); const summary = { categories: Object.keys(categories), timestamp, - environment: `${environmentInfo.os || 'Ubuntu Latest'} • ${environmentInfo.sdk || '.NET 10'}`, + environment: `${environmentInfo.os || 'Ubuntu Latest'} • ${environmentInfo.sdk || '.NET 11'}`, libraries: discoveredLibraries }; diff --git a/.github/workflows/aot.yml b/.github/workflows/aot.yml index e2bf120492d..1ee0b19e316 100644 --- a/.github/workflows/aot.yml +++ b/.github/workflows/aot.yml @@ -72,6 +72,10 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v6.1.0 + with: + dotnet-version: | + 10.0.x + 11.0.x - name: Enable Long Paths on Windows if: matrix.os == 'windows-latest' @@ -181,6 +185,10 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v6.1.0 + with: + dotnet-version: | + 10.0.x + 11.0.x - name: Enable Long Paths on Windows if: matrix.os == 'windows-latest' diff --git a/.github/workflows/cloudshop-example.yml b/.github/workflows/cloudshop-example.yml index ff741f3198d..3c3cdb701ed 100644 --- a/.github/workflows/cloudshop-example.yml +++ b/.github/workflows/cloudshop-example.yml @@ -23,10 +23,12 @@ jobs: steps: - uses: actions/checkout@v7.0.1 - - name: Setup .NET 10 + - name: Setup .NET uses: actions/setup-dotnet@v6.1.0 with: - dotnet-version: 10.0.x + dotnet-version: | + 10.0.x + 11.0.x - name: Cache NuGet packages uses: actions/cache@v6 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 33ce20700eb..08de3498fba 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -65,10 +65,12 @@ jobs: with: fetch-depth: 0 - - name: Setup .NET 9 + - name: Setup .NET uses: actions/setup-dotnet@v6.1.0 with: - dotnet-version: 10.0.403 + dotnet-version: | + 10.0.x + 11.0.x # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/dotnet-build-different-locale.yml b/.github/workflows/dotnet-build-different-locale.yml index e9e52828b48..d7628fe1246 100644 --- a/.github/workflows/dotnet-build-different-locale.yml +++ b/.github/workflows/dotnet-build-different-locale.yml @@ -30,7 +30,9 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v6.1.0 with: - global-json-file: global.json + dotnet-version: | + 10.0.x + 11.0.x - name: Generate and set locale for subsequent steps run: | diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 6b499c9194e..1fe2c6a84ba 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -81,6 +81,10 @@ jobs: # then spent up to 3 minutes saving an entry that was evicted within the hour. - name: Setup .NET uses: actions/setup-dotnet@v6.1.0 + with: + dotnet-version: | + 10.0.x + 11.0.x - name: Enable Long Paths on Windows if: matrix.os == 'windows-latest' @@ -307,6 +311,10 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v6.1.0 + with: + dotnet-version: | + 10.0.x + 11.0.x # TUnit.Mocks.Aot.Tests sets TreatWarningsAsErrors, so any trim/AOT warning ILC reports # for everyday mock usage fails its publish (#7027). Every framework still runs after an @@ -315,7 +323,7 @@ jobs: shell: bash run: | failed=() - for framework in net8.0 net9.0 net10.0; do + for framework in net10.0 net11.0; do for project in TUnit.Mocks.Tests TUnit.Mocks.Aot.Tests; do echo "::group::$project ($framework)" if dotnet publish "tests/$project/$project.csproj" -c Release --use-current-runtime \ @@ -364,6 +372,10 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v6.1.0 + with: + dotnet-version: | + 10.0.x + 11.0.x - name: Enable Long Paths run: | @@ -440,6 +452,10 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v6.1.0 + with: + dotnet-version: | + 10.0.x + 11.0.x # Packing reads the Roslyn analyzer/generator variants from their own bin folders, so build # every library project, not just the packed ones. diff --git a/.github/workflows/mock-benchmarks.yml b/.github/workflows/mock-benchmarks.yml index 48defe33d5c..cfb90b4ba36 100644 --- a/.github/workflows/mock-benchmarks.yml +++ b/.github/workflows/mock-benchmarks.yml @@ -26,10 +26,10 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v6.1.0 with: - dotnet-version: 10.0.x + dotnet-version: 11.0.x - name: Run Benchmark - run: dotnet run -c Release -f net10.0 -- --filter "*${{ matrix.benchmark }}*" --exporters json github + run: dotnet run -c Release -f net11.0 -- --filter "*${{ matrix.benchmark }}*" --exporters json github working-directory: "benchmarks/TUnit.Mocks.Benchmarks" - name: Upload Results diff --git a/.github/workflows/platform-smoke.yml b/.github/workflows/platform-smoke.yml index 2c781fdbe5c..2b30abfccb7 100644 --- a/.github/workflows/platform-smoke.yml +++ b/.github/workflows/platform-smoke.yml @@ -31,15 +31,13 @@ jobs: workload: wasm-tools - platform: Android workload: android - - platform: WASI - workload: wasi-experimental env: SmokePlatform: ${{ matrix.platform }} steps: - uses: actions/checkout@v7.0.1 - uses: actions/setup-dotnet@v6.1.0 with: - dotnet-version: 11.0.100-rc.3.26522.148 + dotnet-version: 11.0.x - uses: actions/cache@v6 with: path: ~/.nuget/packages @@ -79,18 +77,6 @@ jobs: script: | mkdir -p artifacts/platform-smoke/Android bash -o pipefail -c 'dotnet test --project "$GITHUB_WORKSPACE/tests/TUnit.PlatformSmoke/TUnit.PlatformSmoke.csproj" --no-build 2>&1 | tee artifacts/platform-smoke/Android/test.log' - - uses: bytecodealliance/actions/wasmtime/setup@v1.1.3 - if: matrix.platform == 'WASI' - with: - version: v49.0.1 - - name: Execute the TUnit smoke test on WASI - if: matrix.platform == 'WASI' - working-directory: tests/TUnit.PlatformSmoke/bin/Debug/net11.0/wasi-wasm - shell: bash - run: | - mkdir -p "$GITHUB_WORKSPACE/artifacts/platform-smoke/WASI" - wasmtime run -S http --dir . dotnet.wasm TUnit.PlatformSmoke \ - 2>&1 | tee "$GITHUB_WORKSPACE/artifacts/platform-smoke/WASI/run.log" - uses: actions/upload-artifact@v7.0.2 if: always() with: @@ -112,7 +98,7 @@ jobs: - uses: actions/checkout@v7.0.1 - uses: actions/setup-dotnet@v6.1.0 with: - dotnet-version: 11.0.100-rc.3.26522.148 + dotnet-version: 11.0.x - uses: actions/cache@v6 with: path: ~/.nuget/packages diff --git a/.github/workflows/speed-comparison.yml b/.github/workflows/speed-comparison.yml index 7860bcabf55..9b744c86c03 100644 --- a/.github/workflows/speed-comparison.yml +++ b/.github/workflows/speed-comparison.yml @@ -18,7 +18,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v6.1.0 with: - dotnet-version: 10.0.x + dotnet-version: 11.0.x - name: Build All Frameworks run: | @@ -30,8 +30,8 @@ jobs: - name: Publish AOT run: | - dotnet publish -c Release -p:TestFramework=TUNIT -p:Aot=true --use-current-runtime --output bin/Release-TUNIT-AOT/net10.0 - dotnet publish -c Release -p:TestFramework=XUNIT3 -p:Aot=true --use-current-runtime --output bin/Release-XUNIT3-AOT/net10.0 + dotnet publish -c Release -p:TestFramework=TUNIT -p:Aot=true --use-current-runtime --output bin/Release-TUNIT-AOT/net11.0 + dotnet publish -c Release -p:TestFramework=XUNIT3 -p:Aot=true --use-current-runtime --output bin/Release-XUNIT3-AOT/net11.0 working-directory: "tools/speed-comparison/UnifiedTests" - name: Upload Build Artifacts @@ -61,7 +61,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v6.1.0 with: - dotnet-version: 10.0.x + dotnet-version: 11.0.x - name: Download Build Artifacts uses: actions/download-artifact@v8 @@ -76,7 +76,7 @@ jobs: working-directory: ${{ github.workspace }} - name: Run Benchmark - run: dotnet run -c Release --framework net10.0 --allCategories=Runtime + run: dotnet run -c Release --framework net11.0 --allCategories=Runtime working-directory: "tools/speed-comparison/Tests.Benchmark" env: CLASS_NAME: ${{ matrix.class }} @@ -105,7 +105,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v6.1.0 with: - dotnet-version: 10.0.x + dotnet-version: 11.0.x - name: Prepare builds run: | @@ -113,7 +113,7 @@ jobs: working-directory: "tools/speed-comparison" - name: Run Benchmark - run: dotnet run -c Release --allCategories=Build --framework net10.0 + run: dotnet run -c Release --allCategories=Build --framework net11.0 working-directory: "tools/speed-comparison/Tests.Benchmark" - name: Upload Markdown diff --git a/.oss-scanner/Dockerfile b/.oss-scanner/Dockerfile index 75116d6c80e..d5ae974fe90 100644 --- a/.oss-scanner/Dockerfile +++ b/.oss-scanner/Dockerfile @@ -20,12 +20,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY . /src WORKDIR /src -# Install the SDK pinned by global.json, plus the net8.0/net9.0 runtimes so every +# Install the SDK pinned by global.json, plus the net10.0 runtime so every # test target framework can run offline. RUN curl -sSL --retry 5 https://dot.net/v1/dotnet-install.sh -o /tmp/dotnet-install.sh \ && chmod +x /tmp/dotnet-install.sh \ && /tmp/dotnet-install.sh --jsonfile /src/global.json --install-dir "$DOTNET_ROOT" \ - && for channel in 8.0 9.0; do \ + && for channel in 10.0; do \ /tmp/dotnet-install.sh --channel "$channel" --runtime dotnet --install-dir "$DOTNET_ROOT" || exit 1; \ /tmp/dotnet-install.sh --channel "$channel" --runtime aspnetcore --install-dir "$DOTNET_ROOT" || exit 1; \ done \ diff --git a/.oss-scanner/threat_model.md b/.oss-scanner/threat_model.md index 9a366687ebd..ee028b83ee9 100644 --- a/.oss-scanner/threat_model.md +++ b/.oss-scanner/threat_model.md @@ -114,7 +114,7 @@ The boundaries are: - The image is built in Debug from `TUnit.CI.slnx`, plus `src/TUnit.Reporting.Tool`. - Test projects are TUnit apps. Run them with - `cd tests/ && dotnet run -c Debug --no-restore --framework net10.0`. net8.0 and net9.0 runtimes are + `cd tests/ && dotnet run -c Debug --no-restore --framework net10.0`. The net11.0 runtime is also installed. - `tunit-oss-test` runs the offline-safe suites for the areas above. - Relevant suites: diff --git a/Directory.Build.props b/Directory.Build.props index f05f9095d60..11650f6437b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -8,7 +8,15 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 + + + + + $(Features);runtime-async=on diff --git a/Directory.Packages.props b/Directory.Packages.props index 3b44f3079e3..b1b662d11cf 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -2,28 +2,22 @@ true - - + - - - - - - - - - - - + + + + + @@ -36,8 +30,8 @@ - - + + diff --git a/benchmarks/TUnit.Mocks.Benchmarks/TUnit.Mocks.Benchmarks.csproj b/benchmarks/TUnit.Mocks.Benchmarks/TUnit.Mocks.Benchmarks.csproj index 37b56ef761d..7d5a8831ef0 100644 --- a/benchmarks/TUnit.Mocks.Benchmarks/TUnit.Mocks.Benchmarks.csproj +++ b/benchmarks/TUnit.Mocks.Benchmarks/TUnit.Mocks.Benchmarks.csproj @@ -2,7 +2,7 @@ Exe - net8.0;net9.0;net10.0 + net10.0;net11.0 enable enable false diff --git a/benchmarks/TUnit.Performance.Tests/DataSourceBenchmarks.cs b/benchmarks/TUnit.Performance.Tests/DataSourceBenchmarks.cs index ffbf14630a8..20116caa7a3 100644 --- a/benchmarks/TUnit.Performance.Tests/DataSourceBenchmarks.cs +++ b/benchmarks/TUnit.Performance.Tests/DataSourceBenchmarks.cs @@ -8,8 +8,8 @@ namespace TUnit.Performance.Tests; -[SimpleJob(RuntimeMoniker.Net80)] -[SimpleJob(RuntimeMoniker.NativeAot80)] +[SimpleJob(RuntimeMoniker.Net11_0)] +[SimpleJob(RuntimeMoniker.NativeAot11_0)] [MemoryDiagnoser] [JsonExporterAttribute.Full] public class DataSourceBenchmarks diff --git a/benchmarks/TUnit.Performance.Tests/TUnit.Performance.Tests.csproj b/benchmarks/TUnit.Performance.Tests/TUnit.Performance.Tests.csproj index 80e06c9d675..a122145d9d9 100644 --- a/benchmarks/TUnit.Performance.Tests/TUnit.Performance.Tests.csproj +++ b/benchmarks/TUnit.Performance.Tests/TUnit.Performance.Tests.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net11.0 enable enable true diff --git a/benchmarks/TUnit.Performance.Tests/TestDiscoveryBenchmarks.cs b/benchmarks/TUnit.Performance.Tests/TestDiscoveryBenchmarks.cs index fab383330d4..0ecf3844e69 100644 --- a/benchmarks/TUnit.Performance.Tests/TestDiscoveryBenchmarks.cs +++ b/benchmarks/TUnit.Performance.Tests/TestDiscoveryBenchmarks.cs @@ -7,8 +7,8 @@ namespace TUnit.Performance.Tests; -[SimpleJob(RuntimeMoniker.Net80)] -[SimpleJob(RuntimeMoniker.NativeAot80)] +[SimpleJob(RuntimeMoniker.Net11_0)] +[SimpleJob(RuntimeMoniker.NativeAot11_0)] [MemoryDiagnoser] [JsonExporterAttribute.Full] public class TestDiscoveryBenchmarks diff --git a/benchmarks/TUnit.Performance.Tests/TestExecutionBenchmarks.cs b/benchmarks/TUnit.Performance.Tests/TestExecutionBenchmarks.cs index ff23a729a9c..588b5650d5f 100644 --- a/benchmarks/TUnit.Performance.Tests/TestExecutionBenchmarks.cs +++ b/benchmarks/TUnit.Performance.Tests/TestExecutionBenchmarks.cs @@ -7,8 +7,8 @@ namespace TUnit.Performance.Tests; -[SimpleJob(RuntimeMoniker.Net80)] -[SimpleJob(RuntimeMoniker.NativeAot80)] +[SimpleJob(RuntimeMoniker.Net11_0)] +[SimpleJob(RuntimeMoniker.NativeAot11_0)] [MemoryDiagnoser] [JsonExporterAttribute.Full] public class TestExecutionBenchmarks diff --git a/benchmarks/TUnit.Performance.Tests/run-benchmarks.ps1 b/benchmarks/TUnit.Performance.Tests/run-benchmarks.ps1 index 7245fe3b237..0cc3b7d7189 100755 --- a/benchmarks/TUnit.Performance.Tests/run-benchmarks.ps1 +++ b/benchmarks/TUnit.Performance.Tests/run-benchmarks.ps1 @@ -8,7 +8,7 @@ Runs the TUnit performance benchmarks with various configurations Filter to apply to benchmark selection (e.g., "*Discovery*", "*Execution*", "*DataSource*") .PARAMETER Job -Specify which runtime to benchmark ("Net80", "NativeAot80", or "All") +Specify which runtime to benchmark ("Net11_0", "NativeAot11_0", or "All") .PARAMETER Quick Run quick benchmarks with reduced iterations @@ -16,7 +16,7 @@ Run quick benchmarks with reduced iterations .EXAMPLE ./run-benchmarks.ps1 ./run-benchmarks.ps1 -Filter "*Discovery*" -./run-benchmarks.ps1 -Job NativeAot80 +./run-benchmarks.ps1 -Job NativeAot11_0 ./run-benchmarks.ps1 -Quick #> @@ -41,12 +41,12 @@ if ($Filter -ne "*") { $args += $Filter } -if ($Job -eq "Net80") { +if ($Job -eq "Net11_0") { $args += "--job" - $args += "Net80" -} elseif ($Job -eq "NativeAot80") { + $args += "Net11_0" +} elseif ($Job -eq "NativeAot11_0") { $args += "--job" - $args += "NativeAot80" + $args += "NativeAot11_0" } if ($Quick) { diff --git a/benchmarks/TUnit.Performance.Tests/run-benchmarks.sh b/benchmarks/TUnit.Performance.Tests/run-benchmarks.sh index 0583a0ef5b0..51240b8ced0 100755 --- a/benchmarks/TUnit.Performance.Tests/run-benchmarks.sh +++ b/benchmarks/TUnit.Performance.Tests/run-benchmarks.sh @@ -4,7 +4,7 @@ # Usage: ./run-benchmarks.sh [options] # Options: # -f, --filter Filter benchmarks (e.g., "*Discovery*") -# -j, --job Specify runtime (Net80, NativeAot80, or All) +# -j, --job Specify runtime (Net11_0, NativeAot11_0, or All) # -q, --quick Run quick benchmarks with reduced iterations # -h, --help Show help @@ -34,7 +34,7 @@ while [[ $# -gt 0 ]]; do echo "Usage: $0 [options]" echo "Options:" echo " -f, --filter Filter benchmarks (e.g., '*Discovery*')" - echo " -j, --job Specify runtime (Net80, NativeAot80, or All)" + echo " -j, --job Specify runtime (Net11_0, NativeAot11_0, or All)" echo " -q, --quick Run quick benchmarks with reduced iterations" echo " -h, --help Show this help message" exit 0 @@ -60,10 +60,10 @@ if [ "$FILTER" != "*" ]; then ARGS+=("--filter" "$FILTER") fi -if [ "$JOB" = "Net80" ]; then - ARGS+=("--job" "Net80") -elif [ "$JOB" = "NativeAot80" ]; then - ARGS+=("--job" "NativeAot80") +if [ "$JOB" = "Net11_0" ]; then + ARGS+=("--job" "Net11_0") +elif [ "$JOB" = "NativeAot11_0" ]; then + ARGS+=("--job" "NativeAot11_0") fi if [ "$QUICK" = true ]; then diff --git a/benchmarks/TUnit.PerformanceBenchmarks/TUnit.PerformanceBenchmarks.csproj b/benchmarks/TUnit.PerformanceBenchmarks/TUnit.PerformanceBenchmarks.csproj index f69e82b22ec..cdd63e12ef8 100644 --- a/benchmarks/TUnit.PerformanceBenchmarks/TUnit.PerformanceBenchmarks.csproj +++ b/benchmarks/TUnit.PerformanceBenchmarks/TUnit.PerformanceBenchmarks.csproj @@ -3,9 +3,9 @@ - + - net9.0 + net11.0 enable enable diff --git a/benchmarks/TUnit.PerformanceBenchmarks/count-generated-methods.ps1 b/benchmarks/TUnit.PerformanceBenchmarks/count-generated-methods.ps1 index 462e4f46f87..2c65493964a 100755 --- a/benchmarks/TUnit.PerformanceBenchmarks/count-generated-methods.ps1 +++ b/benchmarks/TUnit.PerformanceBenchmarks/count-generated-methods.ps1 @@ -15,7 +15,7 @@ $ErrorActionPreference = "Stop" $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path if (-not $AssemblyPath) { - $AssemblyPath = Join-Path $scriptDir "bin" $Configuration "net9.0" "TUnit.PerformanceBenchmarks.dll" + $AssemblyPath = Join-Path $scriptDir "bin" $Configuration "net11.0" "TUnit.PerformanceBenchmarks.dll" } if (-not (Test-Path $AssemblyPath)) { diff --git a/benchmarks/TUnit.PerformanceBenchmarks/measure-jit.ps1 b/benchmarks/TUnit.PerformanceBenchmarks/measure-jit.ps1 index 3c5da964971..68e3cbd6980 100755 --- a/benchmarks/TUnit.PerformanceBenchmarks/measure-jit.ps1 +++ b/benchmarks/TUnit.PerformanceBenchmarks/measure-jit.ps1 @@ -43,7 +43,7 @@ if (-not $SkipBuild) { } # Find executable -$tfm = "net9.0" +$tfm = "net11.0" $exeDir = Join-Path $scriptDir "bin" $Configuration $tfm $exeName = "TUnit.PerformanceBenchmarks" if ($IsWindows -or $env:OS -match "Windows") { diff --git a/benchmarks/TUnit.PerformanceBenchmarks/measure-startup.ps1 b/benchmarks/TUnit.PerformanceBenchmarks/measure-startup.ps1 index 779728b121b..c1b7bff7c6e 100755 --- a/benchmarks/TUnit.PerformanceBenchmarks/measure-startup.ps1 +++ b/benchmarks/TUnit.PerformanceBenchmarks/measure-startup.ps1 @@ -52,7 +52,7 @@ if (-not $SkipBuild) { } # Step 2: Find the built executable -$tfm = "net9.0" +$tfm = "net11.0" $exeDir = Join-Path $projectDir "bin" $Configuration $tfm $exeName = "TUnit.PerformanceBenchmarks" if ($IsWindows -or $env:OS -match "Windows") { diff --git a/benchmarks/TUnit.Profile/TUnit.Profile.csproj b/benchmarks/TUnit.Profile/TUnit.Profile.csproj index 79dd6306c4a..0101b5dc212 100644 --- a/benchmarks/TUnit.Profile/TUnit.Profile.csproj +++ b/benchmarks/TUnit.Profile/TUnit.Profile.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 enable enable diff --git a/benchmarks/TUnit.SourceGenerator.Benchmarks/TUnit.SourceGenerator.Benchmarks.csproj b/benchmarks/TUnit.SourceGenerator.Benchmarks/TUnit.SourceGenerator.Benchmarks.csproj index 2885d1295fb..a1837cae72c 100644 --- a/benchmarks/TUnit.SourceGenerator.Benchmarks/TUnit.SourceGenerator.Benchmarks.csproj +++ b/benchmarks/TUnit.SourceGenerator.Benchmarks/TUnit.SourceGenerator.Benchmarks.csproj @@ -1,7 +1,7 @@  Exe - net10.0 + net11.0 enable enable true @@ -14,11 +14,11 @@ - - - - - + + + + + diff --git a/docs/docs/assertions/datetime.md b/docs/docs/assertions/datetime.md index c4937e93483..840651c4cf0 100644 --- a/docs/docs/assertions/datetime.md +++ b/docs/docs/assertions/datetime.md @@ -207,7 +207,7 @@ public async Task DateTimeOffset_Comparison() } ``` -## DateOnly (.NET 8+) +## DateOnly (.NET 10+) DateOnly represents just a date without time: @@ -249,7 +249,7 @@ public async Task DateOnly_Comparison() } ``` -## TimeOnly (.NET 8+) +## TimeOnly (.NET 10+) TimeOnly represents just time without a date: diff --git a/docs/docs/assertions/tasks-and-async.md b/docs/docs/assertions/tasks-and-async.md index b5ac9b79fa8..50334130ee6 100644 --- a/docs/docs/assertions/tasks-and-async.md +++ b/docs/docs/assertions/tasks-and-async.md @@ -94,7 +94,7 @@ public async Task Task_Not_Faulted() } ``` -### IsCompletedSuccessfully / IsNotCompletedSuccessfully (.NET 8+) +### IsCompletedSuccessfully / IsNotCompletedSuccessfully (.NET 10+) Tests whether a task completed successfully (not faulted or canceled): diff --git a/docs/docs/examples/aspire.md b/docs/docs/examples/aspire.md index 3746ba2d231..29d4210fd16 100644 --- a/docs/docs/examples/aspire.md +++ b/docs/docs/examples/aspire.md @@ -24,7 +24,7 @@ dotnet add package TUnit.Aspire.Core - An Aspire AppHost project in your solution - Docker running (Aspire uses containers for infrastructure resources) -- .NET 8.0 or later +- .NET 10.0 or later ::: ## Quick Start @@ -617,7 +617,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v4 with: - dotnet-version: 9.0.x + dotnet-version: 10.0.x - run: dotnet build MyApp.Tests -c Release - run: dotnet run --project MyApp.Tests -c Release --no-build diff --git a/docs/docs/examples/opentelemetry.md b/docs/docs/examples/opentelemetry.md index db972be22ba..b609054ba8d 100644 --- a/docs/docs/examples/opentelemetry.md +++ b/docs/docs/examples/opentelemetry.md @@ -4,7 +4,7 @@ TUnit emits `System.Diagnostics.Activity` trace spans at every level of the test lifecycle. When you configure an OpenTelemetry exporter (or any `ActivityListener`), you get distributed tracing for your test runs automatically. When no listener is attached, the cost is zero. :::note -Activity tracing requires .NET 8 or later. It is not available on .NET Framework or .NET Standard targets. +Activity tracing requires .NET 10 or later. It is not available on .NET Framework or .NET Standard targets. ::: ## Setup diff --git a/docs/docs/examples/tunit-ci-pipeline.md b/docs/docs/examples/tunit-ci-pipeline.md index 72bb94fa79e..3191cf97818 100644 --- a/docs/docs/examples/tunit-ci-pipeline.md +++ b/docs/docs/examples/tunit-ci-pipeline.md @@ -29,7 +29,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - dotnet-version: ['8.0.x', '9.0.x'] + dotnet-version: ['10.0.x', '11.0.x'] fail-fast: false # Continue running other jobs if one fails steps: @@ -102,7 +102,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: '9.0.x' + dotnet-version: '10.0.x' - name: Restore run: dotnet restore @@ -111,7 +111,7 @@ jobs: run: dotnet publish -c Release -p:PublishAot=true --use-current-runtime - name: Run AOT tests - run: ./bin/Release/net9.0/linux-x64/publish/YourTestProject + run: ./bin/Release/net10.0/linux-x64/publish/YourTestProject ``` ### PR Comment with Test Results @@ -137,7 +137,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: '9.0.x' + dotnet-version: '10.0.x' - name: Run tests run: dotnet test --configuration Release --results-directory ./TestResults -- --report-trx @@ -171,7 +171,7 @@ pool: variables: buildConfiguration: 'Release' - dotnetSdkVersion: '9.0.x' + dotnetSdkVersion: '10.0.x' stages: - stage: Build @@ -248,21 +248,21 @@ stages: ```yaml strategy: matrix: - linux_net8: + linux_net11: vmImage: 'ubuntu-latest' - dotnetVersion: '8.0.x' - linux_net9: + dotnetVersion: '11.0.x' + linux_net10: vmImage: 'ubuntu-latest' - dotnetVersion: '9.0.x' - windows_net8: + dotnetVersion: '10.0.x' + windows_net11: vmImage: 'windows-latest' - dotnetVersion: '8.0.x' - windows_net9: + dotnetVersion: '11.0.x' + windows_net10: vmImage: 'windows-latest' - dotnetVersion: '9.0.x' - macos_net9: + dotnetVersion: '10.0.x' + macos_net10: vmImage: 'macos-latest' - dotnetVersion: '9.0.x' + dotnetVersion: '10.0.x' pool: vmImage: $(vmImage) @@ -281,7 +281,7 @@ steps: ### Complete Pipeline with Stages ```yaml -image: mcr.microsoft.com/dotnet/sdk:9.0 +image: mcr.microsoft.com/dotnet/sdk:10.0 variables: BUILD_CONFIGURATION: Release @@ -365,13 +365,13 @@ coverage-report: script: - dotnet test --configuration Release -- --report-trx -test:net8: +test:net11: extends: .test-template - image: mcr.microsoft.com/dotnet/sdk:8.0 + image: mcr.microsoft.com/dotnet/sdk:11.0 -test:net9: +test:net10: extends: .test-template - image: mcr.microsoft.com/dotnet/sdk:9.0 + image: mcr.microsoft.com/dotnet/sdk:10.0 ``` ## CircleCI @@ -387,7 +387,7 @@ orbs: executors: dotnet-executor: docker: - - image: mcr.microsoft.com/dotnet/sdk:9.0 + - image: mcr.microsoft.com/dotnet/sdk:10.0 jobs: build: @@ -457,11 +457,11 @@ workflows: requires: - build - test-matrix: - name: test-net8 - dotnet-version: "8.0" + name: test-net11 + dotnet-version: "11.0" - test-matrix: - name: test-net9 - dotnet-version: "9.0" + name: test-net10 + dotnet-version: "10.0" ``` ## Docker @@ -469,7 +469,7 @@ workflows: ### Dockerfile for Running Tests ```dockerfile -FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build WORKDIR /src # Copy solution and project files diff --git a/docs/docs/execution/ci-cd-reporting.md b/docs/docs/execution/ci-cd-reporting.md index 0ece67b4339..445c42ff22f 100644 --- a/docs/docs/execution/ci-cd-reporting.md +++ b/docs/docs/execution/ci-cd-reporting.md @@ -120,7 +120,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: '9.0.x' + dotnet-version: '10.0.x' - name: Run Tests with Collapsible Reporter run: dotnet test -- --output Detailed diff --git a/docs/docs/extending/libraries.md b/docs/docs/extending/libraries.md index 81e44a3858b..7fa5ea19f69 100644 --- a/docs/docs/extending/libraries.md +++ b/docs/docs/extending/libraries.md @@ -16,7 +16,7 @@ When building a reusable library that defines shared hooks, custom attributes, b - net8.0;net9.0;net10.0 + net10.0;net11.0 @@ -60,7 +60,7 @@ In a test project, reference both `TUnit` (for the runner) and the library proje - net8.0;net9.0;net10.0 + net10.0;net11.0 Exe diff --git a/docs/docs/extending/logging.md b/docs/docs/extending/logging.md index d1222a268e5..a16b96b7b7b 100644 --- a/docs/docs/extending/logging.md +++ b/docs/docs/extending/logging.md @@ -104,7 +104,7 @@ public async Task HandleProcess() ``` :::note -This requires .NET 8+ and an active OpenTelemetry `TracerProvider` (or `ActivityListener`) subscribed to the `"TUnit"` source **on the test runner side**. The baggage is only set when the test runner's ActivitySource has listeners — without this, no Activity is created and the baggage cannot propagate. See [OpenTelemetry Tracing](/docs/examples/opentelemetry) for setup instructions. +This requires .NET 10+ and an active OpenTelemetry `TracerProvider` (or `ActivityListener`) subscribed to the `"TUnit"` source **on the test runner side**. The baggage is only set when the test runner's ActivitySource has listeners — without this, no Activity is created and the baggage cannot propagate. See [OpenTelemetry Tracing](/docs/examples/opentelemetry) for setup instructions. ::: For applications **without** Activity propagation, use the manual `MakeCurrent()` approach described below. diff --git a/docs/docs/getting-started/installation.md b/docs/docs/getting-started/installation.md index 2d8fd7a8bed..4d273e48f2a 100644 --- a/docs/docs/getting-started/installation.md +++ b/docs/docs/getting-started/installation.md @@ -95,7 +95,7 @@ Your `.csproj` should be as simple as something like: Exe - net8.0 + net10.0 enable enable @@ -114,6 +114,13 @@ This should NOT be used with TUnit. It'll stop test discovery from working prope ::: +## Mono and WebAssembly on .NET 11 +TUnit's `net11.0` assemblies are compiled with Runtime Async, which the Mono runtime cannot run. A `net11.0` test project that runs on Mono fails at startup. + +- **Browser:** set `false` to run on the CoreCLR browser runtime that ships with .NET 11, or target `net10.0`. +- **Android, iOS, tvOS and Mac Catalyst:** .NET 11 uses CoreCLR by default. If you opt back into Mono, target `net10.0`. +- **WASI:** not supported. It needs .NET 11 and only runs on Mono. + ## .NET Framework If you are still targeting .NET Framework, TUnit's generated code needs `ModuleInitializerAttribute`, which isn't in the base class library. When nothing in your project provides it, TUnit's source generator declares it for you as an internal type, so no extra package is required. diff --git a/docs/docs/getting-started/running-your-tests.md b/docs/docs/getting-started/running-your-tests.md index fbbee910a53..7364194494e 100644 --- a/docs/docs/getting-started/running-your-tests.md +++ b/docs/docs/getting-started/running-your-tests.md @@ -35,7 +35,7 @@ dotnet test -c Release -- --report-trx --coverage If your test project has already been built, you can use `dotnet exec` or just `dotnet` with the `.dll` path ```sh -cd path/to/YourTestProject/bin/Release/net8.0 +cd path/to/YourTestProject/bin/Release/net10.0 dotnet exec YourTestProject.dll # or with flags dotnet exec YourTestProject.dll --report-trx --coverage @@ -44,7 +44,7 @@ dotnet exec YourTestProject.dll --report-trx --coverage or ```sh -cd path/to/YourTestProject/bin/Release/net8.0 +cd path/to/YourTestProject/bin/Release/net10.0 dotnet YourTestProject.dll # or with flags dotnet YourTestProject.dll --report-trx --coverage @@ -60,7 +60,7 @@ This can be invoked directly and passed any flags. The publish folder sits under the runtime identifier you published for, such as `win-x64`, `linux-x64` or `osx-arm64`. Replace `linux-x64` below with yours. ```sh -cd path/to/YourTestProject/bin/Release/net8.0/linux-x64/publish +cd path/to/YourTestProject/bin/Release/net10.0/linux-x64/publish ./YourTestProject # or with flags ./YourTestProject --report-trx --coverage @@ -69,7 +69,7 @@ cd path/to/YourTestProject/bin/Release/net8.0/linux-x64/publish On Windows, from the `win-x64` publish folder: ```powershell -cd path/to/YourTestProject/bin/Release/net8.0/win-x64/publish +cd path/to/YourTestProject/bin/Release/net10.0/win-x64/publish .\YourTestProject.exe --report-trx --coverage ``` diff --git a/docs/docs/guides/distributed-tracing.md b/docs/docs/guides/distributed-tracing.md index 8be3e56b3fd..33545fbd717 100644 --- a/docs/docs/guides/distributed-tracing.md +++ b/docs/docs/guides/distributed-tracing.md @@ -8,7 +8,7 @@ sidebar_position: 20 This page is for users wiring TUnit up to a tracing backend like Seq, Jaeger, Tempo, or the Aspire dashboard. If you just want a working setup, start with [OpenTelemetry Tracing](/docs/examples/opentelemetry). If you're hitting problems, jump straight to its [Troubleshooting](/docs/examples/opentelemetry#troubleshooting) section. :::note -Distributed tracing requires .NET 8 or later. +Distributed tracing requires .NET 10 or later. ::: ## What TUnit emits diff --git a/docs/docs/guides/html-report.md b/docs/docs/guides/html-report.md index ae767c67ec0..433a01c353c 100644 --- a/docs/docs/guides/html-report.md +++ b/docs/docs/guides/html-report.md @@ -170,7 +170,7 @@ After the workflow run completes: ## Distributed Tracing :::note -Distributed tracing requires .NET 8 or later. +Distributed tracing requires .NET 10 or later. ::: The HTML report automatically captures trace spans from **all** instrumented .NET libraries — not just TUnit's own spans. TUnit collects both per-test traces (`"TUnit"`) and runner lifecycle traces (`"TUnit.Lifecycle"`). When your test code calls HttpClient, ASP.NET Core, EF Core, or any library that emits `System.Diagnostics.Activity` spans, those spans appear as children in the test's trace timeline with no extra configuration. @@ -268,12 +268,12 @@ For test suites with 1,000+ tests, the report uses client-side rendering from em ### Trace Timeline Not Showing -The trace timeline requires `System.Diagnostics.Activity` spans to be active during the test run. If your tests don't create activities, the trace section won't appear. TUnit's internal activities are captured automatically on .NET 8.0+. +The trace timeline requires `System.Diagnostics.Activity` spans to be active during the test run. If your tests don't create activities, the trace section won't appear. TUnit's internal activities are captured automatically on .NET 10.0+. ### External Library Spans Not Appearing If spans from HttpClient, ASP.NET Core, or other libraries aren't showing in the trace timeline: -- **Ensure .NET 8+** — distributed trace collection is not available on .NET Framework or .NET Standard targets +- **Ensure .NET 10+** — distributed trace collection is not available on .NET Framework or .NET Standard targets - **Check the library is instrumented** — the library must use `System.Diagnostics.Activity` (most modern .NET libraries do) - **Verify async context flow** — the library call must happen within the test's async context (i.e., awaited from the test method or a hook). Fire-and-forget calls (`Task.Run` without await) may lose the `Activity.Current` context diff --git a/docs/docs/guides/report-aggregation.md b/docs/docs/guides/report-aggregation.md index f399d78b215..d0da3831642 100644 --- a/docs/docs/guides/report-aggregation.md +++ b/docs/docs/guides/report-aggregation.md @@ -172,7 +172,7 @@ tunit-report merge --directory [options] - Aggregation is driven by the HTML reporter's data pipeline — if you set `TUNIT_DISABLE_HTML_REPORTER` or `context.Settings.Reporting.HtmlReportEnabled = false`, no sidecars are produced and there is nothing to merge. - With cooperative mode (the default) across *multiple steps in the same job*, each step appends its own progressively-larger block (earlier steps' blocks can't be rewritten). Use `defer` + the tool for that layout, or `off` to restore per-suite blocks. -- Suites are identified per assembly + OS + TFM, so multi-targeted projects appear as separate rows (e.g. `MyTests (.NET 8.0.x)` / `MyTests (.NET 9.0.x)`). +- Suites are identified per assembly + OS + TFM, so multi-targeted projects appear as separate rows (e.g. `MyTests (.NET 10.0.x)` / `MyTests (.NET 11.0.x)`). - The GitHub step summary is capped at 1 MB by GitHub; the aggregated block replaces N per-suite blocks, so it usually *reduces* summary size. ## See Also diff --git a/docs/docs/migration/mstest.md b/docs/docs/migration/mstest.md index daa40e99b06..8118b009b87 100644 --- a/docs/docs/migration/mstest.md +++ b/docs/docs/migration/mstest.md @@ -132,7 +132,7 @@ dotnet format analyzers --severity info --diagnostics TUMS0001 This command applies all available fixes for the `TUMS0001` diagnostic. You'll see output indicating which files were modified. :::warning Multi-targeting Projects -If your project targets multiple .NET versions (e.g., `net8.0;net9.0;net10.0`), you **must** specify a single target framework when running the code fixer. Multi-targeting can cause the code fixer to crash with the error `Changes must be within bounds of SourceText` due to a limitation in Roslyn's linked file handling. +If your project targets multiple .NET versions (e.g., `net10.0;net11.0`), you **must** specify a single target framework when running the code fixer. Multi-targeting can cause the code fixer to crash with the error `Changes must be within bounds of SourceText` due to a limitation in Roslyn's linked file handling. **Option 1:** Specify a single framework via command line: ```bash @@ -143,7 +143,7 @@ dotnet format analyzers --severity info --diagnostics TUMS0001 --framework net10 ```xml net10.0 - + ``` Run the code fixer, then restore multi-targeting afterward. Replace `net10.0` with your project's highest supported target framework. diff --git a/docs/docs/migration/nunit.md b/docs/docs/migration/nunit.md index 05dbf51fb38..0f664d8a871 100644 --- a/docs/docs/migration/nunit.md +++ b/docs/docs/migration/nunit.md @@ -120,7 +120,7 @@ dotnet format analyzers --severity info --diagnostics TUNU0001 This command applies all available fixes for the `TUNU0001` diagnostic. You'll see output indicating which files were modified. :::warning Multi-targeting Projects -If your project targets multiple .NET versions (e.g., `net8.0;net9.0;net10.0`), you **must** specify a single target framework when running the code fixer. Multi-targeting can cause the code fixer to crash with the error `Changes must be within bounds of SourceText` due to a limitation in Roslyn's linked file handling. +If your project targets multiple .NET versions (e.g., `net10.0;net11.0`), you **must** specify a single target framework when running the code fixer. Multi-targeting can cause the code fixer to crash with the error `Changes must be within bounds of SourceText` due to a limitation in Roslyn's linked file handling. **Option 1:** Specify a single framework via command line: ```bash @@ -131,7 +131,7 @@ dotnet format analyzers --severity info --diagnostics TUNU0001 --framework net10 ```xml net10.0 - + ``` Run the code fixer, then restore multi-targeting afterward. Replace `net10.0` with your project's highest supported target framework. diff --git a/docs/docs/migration/xunit.md b/docs/docs/migration/xunit.md index b45f5ce4f52..77f6bcbb81a 100644 --- a/docs/docs/migration/xunit.md +++ b/docs/docs/migration/xunit.md @@ -113,7 +113,7 @@ dotnet format analyzers --severity info --diagnostics TUXU0001 This command applies all available fixes for the `TUXU0001` diagnostic. You'll see output indicating which files were modified. :::warning Multi-targeting Projects -If your project targets multiple .NET versions (e.g., `net8.0;net9.0;net10.0`), you **must** specify a single target framework when running the code fixer. Multi-targeting can cause the code fixer to crash with the error `Changes must be within bounds of SourceText` due to a limitation in Roslyn's linked file handling. +If your project targets multiple .NET versions (e.g., `net10.0;net11.0`), you **must** specify a single target framework when running the code fixer. Multi-targeting can cause the code fixer to crash with the error `Changes must be within bounds of SourceText` due to a limitation in Roslyn's linked file handling. **Option 1:** Specify a single framework via command line: ```bash @@ -124,7 +124,7 @@ dotnet format analyzers --severity info --diagnostics TUXU0001 --framework net10 ```xml net10.0 - + ``` Run the code fixer, then restore multi-targeting afterward. Replace `net10.0` with your project's highest supported target framework. diff --git a/docs/docs/reference/programmatic-configuration.md b/docs/docs/reference/programmatic-configuration.md index 3b04cdacd3a..f412548a150 100644 --- a/docs/docs/reference/programmatic-configuration.md +++ b/docs/docs/reference/programmatic-configuration.md @@ -57,7 +57,7 @@ Settings are accessed exclusively through `context.Settings` in the discovery ho | `ForcefulExitTimeout` | `TimeSpan` | 30 seconds | Grace period before the process is forcefully terminated after a cancellation. | | `ProcessExitHookDelay` | `TimeSpan` | 500 ms | Delay before process-exit hooks run, allowing pending I/O to flush. | -On Linux and macOS with .NET 8 or later, SIGTERM (sent by `docker stop`, Kubernetes, and CI cancellation) cancels the run the same way as Ctrl+C: After hooks run within `ForcefulExitTimeout`, and the run ends as a failed test session with exit code 10. .NET Framework test projects running on Mono keep the runtime's default handling, so After hooks there only get `ProcessExitHookDelay`. +On Linux and macOS with .NET 10 or later, SIGTERM (sent by `docker stop`, Kubernetes, and CI cancellation) cancels the run the same way as Ctrl+C: After hooks run within `ForcefulExitTimeout`, and the run ends as a failed test session with exit code 10. .NET Framework test projects running on Mono keep the runtime's default handling, so After hooks there only get `ProcessExitHookDelay`. ### `context.Settings.Parallelism` diff --git a/docs/docs/writing-tests/event-subscribing.md b/docs/docs/writing-tests/event-subscribing.md index 45866a2c594..8d9269deacd 100644 --- a/docs/docs/writing-tests/event-subscribing.md +++ b/docs/docs/writing-tests/event-subscribing.md @@ -37,7 +37,7 @@ An explicit `[ParallelLimiter]` takes precedence over a limiter set through ` ## Execution Stage Control -> **Note**: This feature is available on .NET 8.0+ only due to default interface member requirements. +> **Note**: This feature is available on .NET 10.0+ only due to default interface member requirements. For `ITestStartEventReceiver` and `ITestEndEventReceiver`, you can control when your event receivers execute relative to instance-level hooks (`[Before(Test)]` and `[After(Test)]`) by setting the `Stage` property. diff --git a/docs/docs/writing-tests/lifecycle.md b/docs/docs/writing-tests/lifecycle.md index eaeaa90b717..c717263b887 100644 --- a/docs/docs/writing-tests/lifecycle.md +++ b/docs/docs/writing-tests/lifecycle.md @@ -299,7 +299,7 @@ sequenceDiagram ### Early vs Late Stage -For `ITestStartEventReceiver` and `ITestEndEventReceiver` on .NET 8 and later. On older target frameworks (`netstandard2.0`, for example .NET Framework), `Stage` is ignored and every receiver runs at the late stage: +For `ITestStartEventReceiver` and `ITestEndEventReceiver` on .NET 10 and later. On older target frameworks (`netstandard2.0`, for example .NET Framework), `Stage` is ignored and every receiver runs at the late stage: ```mermaid flowchart LR diff --git a/docs/docs/writing-tests/mocking/advanced.md b/docs/docs/writing-tests/mocking/advanced.md index ab0ca524c7c..50916ea23e8 100644 --- a/docs/docs/writing-tests/mocking/advanced.md +++ b/docs/docs/writing-tests/mocking/advanced.md @@ -225,7 +225,7 @@ Notes and limits: calls keep returning default values. - The `netstandard2.0` asset (used by .NET Framework test projects) does not include the runtime emitter — unconfigured calls return default values there too. Runtime stubs require - the `net8.0`+ assets. + the `net10.0`+ assets. - Opt out globally with `settings.Mocks.RuntimeAutoStubs = false;` in a `[Before(HookType.TestDiscovery)]` hook. diff --git a/eng/AnalyzerTestReferencePacks.props b/eng/AnalyzerTestReferencePacks.props index 4f8bc311ed9..9d85eea3282 100644 --- a/eng/AnalyzerTestReferencePacks.props +++ b/eng/AnalyzerTestReferencePacks.props @@ -11,12 +11,12 @@ tripped the hang dump (#7575). Keep the versions in step with the ReferenceAssemblies the tests use: ReferenceAssemblies.Net.Net80 - and .Net90 (8.0.0, 9.0.0), the explicit net10.0 pack (10.0.0), ReferenceAssemblies.NetFramework.Net472 + and .Net90 (8.0.0, 9.0.0), the explicit net10.0 and net11.0 packs (10.0.0, 11.0.0), ReferenceAssemblies.NetFramework.Net472 (1.0.2), the explicit net48 pack (1.0.3), and every PackageIdentity passed to AddPackages. A version missing here still works; it is just downloaded at test time again. --> - + diff --git a/eng/Library.props b/eng/Library.props index c5a6e3b88cc..1a0727d54d9 100644 --- a/eng/Library.props +++ b/eng/Library.props @@ -1,6 +1,6 @@ - netstandard2.0;net8.0;net9.0;net10.0 + netstandard2.0;net10.0;net11.0 true @@ -13,11 +13,6 @@ false - - $(NoWarn);AD0001 true diff --git a/eng/TestProject.props b/eng/TestProject.props index 8e7c8f8bdb5..7c4bda61b6e 100644 --- a/eng/TestProject.props +++ b/eng/TestProject.props @@ -9,7 +9,7 @@ Condition="'$(MSBuildProjectExtension)' == '.fsproj'" /> - - net8.0;net9.0;net10.0 + net10.0;net11.0 Exe diff --git a/global.json b/global.json index 039d44c58a9..785b5081b57 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.403", + "version": "11.0.100", "rollForward": "latestMajor", "allowPrerelease": true }, diff --git a/renovate.json b/renovate.json index f34ebd930da..5c773a29ccc 100644 --- a/renovate.json +++ b/renovate.json @@ -40,29 +40,7 @@ "allowedVersions": "<18.12.0" }, { - "description": "Per-TFM versions in Directory.Packages.props: keep the net8.0 entries on 8.x.", - "matchPackageNames": [ - "Microsoft.AspNetCore.Mvc.Testing", - "Microsoft.Extensions.Http", - "Microsoft.Extensions.Logging", - "Microsoft.Extensions.Logging.Abstractions" - ], - "matchCurrentVersion": "/^8\\./", - "allowedVersions": "<9.0.0" - }, - { - "description": "Per-TFM versions in Directory.Packages.props: keep the net9.0 entries on 9.x.", - "matchPackageNames": [ - "Microsoft.AspNetCore.Mvc.Testing", - "Microsoft.Extensions.Http", - "Microsoft.Extensions.Logging", - "Microsoft.Extensions.Logging.Abstractions" - ], - "matchCurrentVersion": "/^9\\./", - "allowedVersions": "<10.0.0" - }, - { - "description": "Per-TFM versions in Directory.Packages.props: keep the net10.0/default entries on 10.x. Raise alongside adding a net11.0 group.", + "description": "Per-TFM versions in Directory.Packages.props: keep the net10.0/default entries on 10.x; the net11.0 entries are uncapped.", "matchPackageNames": [ "Microsoft.AspNetCore.Mvc.Testing", "Microsoft.Extensions.Http", diff --git a/scripts/profile-tunit.ps1 b/scripts/profile-tunit.ps1 index 71ec285fc3b..6243ccc7a3d 100755 --- a/scripts/profile-tunit.ps1 +++ b/scripts/profile-tunit.ps1 @@ -32,8 +32,8 @@ .\scripts\profile-tunit.ps1 -Project benchmarks/TUnit.PerformanceBenchmarks -Dump .EXAMPLE - # Use GC-verbose tracing on net9.0 - .\scripts\profile-tunit.ps1 -TraceProfile gc-verbose -Framework net9.0 + # Use GC-verbose tracing on net10.0 + .\scripts\profile-tunit.ps1 -TraceProfile gc-verbose -Framework net10.0 .EXAMPLE # Show top 50 hot functions @@ -43,7 +43,7 @@ [CmdletBinding()] param( [string]$Project = "benchmarks/TUnit.Profile", - [string]$Framework = "net10.0", + [string]$Framework = "net11.0", [string]$Configuration = "Release", [string]$Filter = "", [string]$OutputDir = "", diff --git a/scripts/profile-tunit.sh b/scripts/profile-tunit.sh index 43c72f05469..230b70a04f2 100755 --- a/scripts/profile-tunit.sh +++ b/scripts/profile-tunit.sh @@ -32,7 +32,7 @@ # ./scripts/profile-tunit.sh --dump --top 50 # # # Use a specific framework -# ./scripts/profile-tunit.sh --framework net9.0 +# ./scripts/profile-tunit.sh --framework net10.0 set -euo pipefail @@ -40,7 +40,7 @@ set -euo pipefail REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" PROJECT="benchmarks/TUnit.Profile" -FRAMEWORK="net10.0" +FRAMEWORK="net11.0" CONFIGURATION="Release" FILTER="" OUTPUT_DIR="" @@ -60,7 +60,7 @@ Usage: profile-tunit.sh [options] [-- extra-test-args...] Options: --project Test project to profile (default: TUnit.Profile) - --framework Target framework (default: net10.0) + --framework Target framework (default: net11.0) --configuration Build configuration (default: Release) --filter Test treenode filter (e.g. "/*/*/BasicTests/*") --output Output directory (default: .profile/-) diff --git a/scripts/run-all-engine-tests.ps1 b/scripts/run-all-engine-tests.ps1 index 463d98b0feb..686da457321 100755 --- a/scripts/run-all-engine-tests.ps1 +++ b/scripts/run-all-engine-tests.ps1 @@ -2,7 +2,7 @@ [CmdletBinding()] param( - [string]$Framework = "net9.0", + [string]$Framework = "net10.0", [string]$Configuration = "Release", [string]$Filter = "/*/*/*/*[EngineTest=Pass]" # Changed to include all EngineTest tests ) diff --git a/scripts/run-aot-tests.ps1 b/scripts/run-aot-tests.ps1 index 946bad36c7f..9b5623a54d5 100755 --- a/scripts/run-aot-tests.ps1 +++ b/scripts/run-aot-tests.ps1 @@ -2,7 +2,7 @@ [CmdletBinding()] param( - [string]$Framework = "net9.0", + [string]$Framework = "net10.0", [string]$Configuration = "Release", [string]$Filter = "/*/*/*/*[EngineTest=Pass]" ) diff --git a/scripts/run-reflection-tests.ps1 b/scripts/run-reflection-tests.ps1 index 93ab8cb1d24..fd7fb525fbf 100755 --- a/scripts/run-reflection-tests.ps1 +++ b/scripts/run-reflection-tests.ps1 @@ -2,7 +2,7 @@ [CmdletBinding()] param( - [string]$Framework = "net9.0", + [string]$Framework = "net10.0", [string]$Configuration = "Release", [string]$Filter = "/*/*/*/*[EngineTest=Pass]" ) diff --git a/scripts/run-singlefile-tests.ps1 b/scripts/run-singlefile-tests.ps1 index 35796de95e5..20bcc41773d 100755 --- a/scripts/run-singlefile-tests.ps1 +++ b/scripts/run-singlefile-tests.ps1 @@ -2,7 +2,7 @@ [CmdletBinding()] param( - [string]$Framework = "net9.0", + [string]$Framework = "net10.0", [string]$Configuration = "Release", [string]$Filter = "/*/*/*/*[EngineTest=Pass]" ) diff --git a/scripts/run-source-generation-tests-verbose.ps1 b/scripts/run-source-generation-tests-verbose.ps1 index 3ef5e3d0d8d..053c97f97bb 100755 --- a/scripts/run-source-generation-tests-verbose.ps1 +++ b/scripts/run-source-generation-tests-verbose.ps1 @@ -2,7 +2,7 @@ [CmdletBinding()] param( - [string]$Framework = "net9.0", + [string]$Framework = "net10.0", [string]$Configuration = "Release", [string]$Filter = "/*/*/*/*[EngineTest=Pass]" ) diff --git a/scripts/run-source-generation-tests.ps1 b/scripts/run-source-generation-tests.ps1 index 405d6aec54b..5800cc4af56 100755 --- a/scripts/run-source-generation-tests.ps1 +++ b/scripts/run-source-generation-tests.ps1 @@ -2,7 +2,7 @@ [CmdletBinding()] param( - [string]$Framework = "net9.0", + [string]$Framework = "net10.0", [string]$Configuration = "Release", [string]$Filter = "/*/*/*/*[EngineTest=Pass]" ) diff --git a/src/TUnit.AspNetCore.Core/TUnit.AspNetCore.Core.csproj b/src/TUnit.AspNetCore.Core/TUnit.AspNetCore.Core.csproj index 837f1ca4338..5671f47b416 100644 --- a/src/TUnit.AspNetCore.Core/TUnit.AspNetCore.Core.csproj +++ b/src/TUnit.AspNetCore.Core/TUnit.AspNetCore.Core.csproj @@ -4,7 +4,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 TUnit.AspNetCore diff --git a/src/TUnit.AspNetCore/TUnit.AspNetCore.csproj b/src/TUnit.AspNetCore/TUnit.AspNetCore.csproj index ec5437ed5ae..4f0588b7f62 100644 --- a/src/TUnit.AspNetCore/TUnit.AspNetCore.csproj +++ b/src/TUnit.AspNetCore/TUnit.AspNetCore.csproj @@ -4,7 +4,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 diff --git a/src/TUnit.Aspire.Core/TUnit.Aspire.Core.csproj b/src/TUnit.Aspire.Core/TUnit.Aspire.Core.csproj index 81f8a313dc4..f0bff9ceab8 100644 --- a/src/TUnit.Aspire.Core/TUnit.Aspire.Core.csproj +++ b/src/TUnit.Aspire.Core/TUnit.Aspire.Core.csproj @@ -3,7 +3,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 TUnit.Aspire diff --git a/src/TUnit.Aspire/TUnit.Aspire.csproj b/src/TUnit.Aspire/TUnit.Aspire.csproj index 1c79a303819..df711cc1696 100644 --- a/src/TUnit.Aspire/TUnit.Aspire.csproj +++ b/src/TUnit.Aspire/TUnit.Aspire.csproj @@ -3,7 +3,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 diff --git a/src/TUnit.Core/Helpers/ArgumentFormatter.cs b/src/TUnit.Core/Helpers/ArgumentFormatter.cs index c83cbaefaf6..66c44e56acf 100644 --- a/src/TUnit.Core/Helpers/ArgumentFormatter.cs +++ b/src/TUnit.Core/Helpers/ArgumentFormatter.cs @@ -169,6 +169,9 @@ private static bool IsNumeric(object o, Type type) || o is decimal or BigInteger or Complex #if NET || o is Half or Int128 or UInt128 or System.Runtime.InteropServices.NFloat +#endif +#if NET11_0_OR_GREATER + || o is Decimal32 or Decimal64 or Decimal128 or BFloat16 #endif ; } diff --git a/src/TUnit.Logging.Microsoft/TUnit.Logging.Microsoft.csproj b/src/TUnit.Logging.Microsoft/TUnit.Logging.Microsoft.csproj index 208eae20d3b..a5f04a1bce5 100644 --- a/src/TUnit.Logging.Microsoft/TUnit.Logging.Microsoft.csproj +++ b/src/TUnit.Logging.Microsoft/TUnit.Logging.Microsoft.csproj @@ -3,7 +3,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 diff --git a/src/TUnit.Mocks.Http/TUnit.Mocks.Http.csproj b/src/TUnit.Mocks.Http/TUnit.Mocks.Http.csproj index 8957ca57d89..89e25475364 100644 --- a/src/TUnit.Mocks.Http/TUnit.Mocks.Http.csproj +++ b/src/TUnit.Mocks.Http/TUnit.Mocks.Http.csproj @@ -3,7 +3,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 HttpClient mocking helpers for TUnit.Mocks. Provides MockHttpHandler with fluent request matching and response configuration. diff --git a/src/TUnit.Mocks.Logging/TUnit.Mocks.Logging.csproj b/src/TUnit.Mocks.Logging/TUnit.Mocks.Logging.csproj index e2333850bd9..bdc9b9774f9 100644 --- a/src/TUnit.Mocks.Logging/TUnit.Mocks.Logging.csproj +++ b/src/TUnit.Mocks.Logging/TUnit.Mocks.Logging.csproj @@ -3,7 +3,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 ILogger verification helpers for TUnit.Mocks. Enables fluent verification of log calls without dealing with the complex Log<TState>() signature. diff --git a/src/TUnit.OpenTelemetry/TUnit.OpenTelemetry.csproj b/src/TUnit.OpenTelemetry/TUnit.OpenTelemetry.csproj index 7a0cf090367..f418c761f23 100644 --- a/src/TUnit.OpenTelemetry/TUnit.OpenTelemetry.csproj +++ b/src/TUnit.OpenTelemetry/TUnit.OpenTelemetry.csproj @@ -3,7 +3,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 Auto-wires an OpenTelemetry TracerProvider for TUnit test processes. Install to get distributed tracing with zero configuration. diff --git a/src/TUnit.Reporting.Tool/TUnit.Reporting.Tool.csproj b/src/TUnit.Reporting.Tool/TUnit.Reporting.Tool.csproj index dbd31f18eda..0061ff8aea4 100644 --- a/src/TUnit.Reporting.Tool/TUnit.Reporting.Tool.csproj +++ b/src/TUnit.Reporting.Tool/TUnit.Reporting.Tool.csproj @@ -5,7 +5,7 @@ - net8.0 + net10.0 LatestMajor true diff --git a/src/TUnit.Templates/README.md b/src/TUnit.Templates/README.md index 1735dbbb97d..5230e179b61 100644 --- a/src/TUnit.Templates/README.md +++ b/src/TUnit.Templates/README.md @@ -12,7 +12,7 @@ The C#, F# and VB variants of the `TUnit` template support: The C# `TUnit` template additionally supports: -- `--framework ` - Target framework. Default `net10.0`; also `net9.0`, `net8.0`, `net481`, `net48`, `net472` and `net462`. +- `--framework ` - Target framework. Default `net10.0`; also `net11.0`, `net481`, `net48`, `net472` and `net462`. ```bash dotnet new TUnit -n MyTests --enable-dotcover diff --git a/src/TUnit.Templates/content/TUnit/.template.config/template.json b/src/TUnit.Templates/content/TUnit/.template.config/template.json index 575736efc88..bb570256522 100644 --- a/src/TUnit.Templates/content/TUnit/.template.config/template.json +++ b/src/TUnit.Templates/content/TUnit/.template.config/template.json @@ -22,9 +22,8 @@ "description": "The target framework for the project.", "datatype": "choice", "choices": [ + { "choice": "net11.0", "description": "Target .NET 11.0" }, { "choice": "net10.0", "description": "Target .NET 10.0" }, - { "choice": "net9.0", "description": "Target .NET 9.0" }, - { "choice": "net8.0", "description": "Target .NET 8.0" }, { "choice": "net481", "description": "Target .NET Framework 4.8.1" }, { "choice": "net48", "description": "Target .NET Framework 4.8" }, { "choice": "net472", "description": "Target .NET Framework 4.7.2" }, diff --git a/tests/SharedTestHelpers/AnalyzerTestCompatibility.cs b/tests/SharedTestHelpers/AnalyzerTestCompatibility.cs index 32655efae99..7756f2b0abf 100644 --- a/tests/SharedTestHelpers/AnalyzerTestCompatibility.cs +++ b/tests/SharedTestHelpers/AnalyzerTestCompatibility.cs @@ -66,18 +66,15 @@ public static string GetNet8DllPath(string assemblyName) return path; } - public static string GetSystemTextJson9DllPath() - { - const string fileName = "System.Text.Json.9.0.dll"; - var path = Path.Combine(AppContext.BaseDirectory, fileName); - if (!File.Exists(path)) - { - throw new FileNotFoundException( - $"System.Text.Json 9.0 reference not found at '{path}'. " + - "Run 'dotnet build' before running analyzer tests.", - path); - } - - return path; - } + /// + /// Reference assemblies for tests that reference TUnit's runtime-loaded builds + /// (typeof(...).Assembly): at least as new as the newest target framework those builds + /// compile for, so they never reference a higher System.Runtime than the compilation (CS1705). + /// + public static Microsoft.CodeAnalysis.Testing.ReferenceAssemblies RuntimeReferenceAssemblies { get; } = +#if NET11_0_OR_GREATER + new("net11.0", new Microsoft.CodeAnalysis.Testing.PackageIdentity("Microsoft.NETCore.App.Ref", "11.0.0"), Path.Combine("ref", "net11.0")); +#else + new("net10.0", new Microsoft.CodeAnalysis.Testing.PackageIdentity("Microsoft.NETCore.App.Ref", "10.0.0"), Path.Combine("ref", "net10.0")); +#endif } diff --git a/tests/TUnit.Analyzers.Tests/AnalyzerTestHelpers.cs b/tests/TUnit.Analyzers.Tests/AnalyzerTestHelpers.cs index 69925e508fc..d1aaa435b20 100644 --- a/tests/TUnit.Analyzers.Tests/AnalyzerTestHelpers.cs +++ b/tests/TUnit.Analyzers.Tests/AnalyzerTestHelpers.cs @@ -34,9 +34,6 @@ public static CSharpAnalyzerTest CreateAnalyzerTest< .AddRange( [ MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetCompatibleDllPath("TUnit.Core", typeof(TUnitAttribute).Assembly)), -#if NET8_0 - MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetSystemTextJson9DllPath()), -#endif MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetNet8DllPath("Polly.Core")), MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetCompatibleDllPath("TUnit.TestProject.Library", typeof(ProjectReferenceEnum).Assembly)) ] @@ -148,9 +145,6 @@ public static CSharpSuppressorTest CreateSuppresso test.TestState.AdditionalReferences .AddRange([ MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetCompatibleDllPath("TUnit.Core", typeof(TUnitAttribute).Assembly)), -#if NET8_0 - MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetSystemTextJson9DllPath()), -#endif MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetNet8DllPath("Polly.Core")), MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetCompatibleDllPath("TUnit.TestProject.Library", typeof(ProjectReferenceEnum).Assembly)) ]); diff --git a/tests/TUnit.Analyzers.Tests/TUnit.Analyzers.Tests.csproj b/tests/TUnit.Analyzers.Tests/TUnit.Analyzers.Tests.csproj index 692df517eab..42152755ed5 100644 --- a/tests/TUnit.Analyzers.Tests/TUnit.Analyzers.Tests.csproj +++ b/tests/TUnit.Analyzers.Tests/TUnit.Analyzers.Tests.csproj @@ -14,7 +14,6 @@ - @@ -56,11 +55,6 @@ Link="TUnit.TestProject.Library.netstandard2.0.dll" CopyToOutputDirectory="PreserveNewest" Visible="false" /> - - - - - - - - - - - - - - + diff --git a/tests/TUnit.Analyzers.Tests/XUnitMigrationAnalyzerTests.cs b/tests/TUnit.Analyzers.Tests/XUnitMigrationAnalyzerTests.cs index bfe859e1d71..e95e7cb7de9 100644 --- a/tests/TUnit.Analyzers.Tests/XUnitMigrationAnalyzerTests.cs +++ b/tests/TUnit.Analyzers.Tests/XUnitMigrationAnalyzerTests.cs @@ -103,8 +103,7 @@ public async Task MyTest() { ConfigureXUnitTest(test); test.CompilerDiagnostics = CompilerDiagnostics.Errors; - test.ReferenceAssemblies = new ReferenceAssemblies("net10.0", - new PackageIdentity("Microsoft.NETCore.App.Ref", "10.0.0"), "ref/net10.0"); + test.ReferenceAssemblies = TUnit.Tests.Shared.AnalyzerTestCompatibility.RuntimeReferenceAssemblies; test.TestState.AdditionalReferences.Add(typeof(TUnit.Assertions.Assert).Assembly); test.TestState.Sources.Add(("GlobalUsings.cs", "global using TUnit.Core; global using TUnit.Assertions; global using TUnit.Assertions.Extensions;")); test.FixedState.Sources.Add(("GlobalUsings.cs", "global using TUnit.Core; global using TUnit.Assertions; global using TUnit.Assertions.Extensions;")); @@ -154,8 +153,7 @@ public async Task MyTest() ConfigureXUnitTest(test); // The shared verifier promotes all nullable warnings to errors. test.CompilerDiagnostics = CompilerDiagnostics.Errors; - test.ReferenceAssemblies = new ReferenceAssemblies("net10.0", - new PackageIdentity("Microsoft.NETCore.App.Ref", "10.0.0"), "ref/net10.0"); + test.ReferenceAssemblies = TUnit.Tests.Shared.AnalyzerTestCompatibility.RuntimeReferenceAssemblies; test.TestState.AdditionalReferences.Add(typeof(TUnit.Assertions.Assert).Assembly); test.TestState.Sources.Add(("GlobalUsings.cs", "global using TUnit.Core; global using TUnit.Assertions; global using TUnit.Assertions.Extensions;")); test.FixedState.Sources.Add(("GlobalUsings.cs", "global using TUnit.Core; global using TUnit.Assertions; global using TUnit.Assertions.Extensions;")); @@ -1819,8 +1817,7 @@ public async Task MyTest() { ConfigureXUnitTest(test); test.CompilerDiagnostics = CompilerDiagnostics.Errors; - test.ReferenceAssemblies = new ReferenceAssemblies("net10.0", - new PackageIdentity("Microsoft.NETCore.App.Ref", "10.0.0"), "ref/net10.0"); + test.ReferenceAssemblies = TUnit.Tests.Shared.AnalyzerTestCompatibility.RuntimeReferenceAssemblies; test.TestState.AdditionalReferences.Add(typeof(TUnit.Assertions.Assert).Assembly); test.TestState.Sources.Add(("CustomSet.cs", customSet)); test.FixedState.Sources.Add(("CustomSet.cs", customSet)); diff --git a/tests/TUnit.AspNetCore.Analyzers.Tests/TUnit.AspNetCore.Analyzers.Tests.csproj b/tests/TUnit.AspNetCore.Analyzers.Tests/TUnit.AspNetCore.Analyzers.Tests.csproj index 79e53564816..7f72c75a65c 100644 --- a/tests/TUnit.AspNetCore.Analyzers.Tests/TUnit.AspNetCore.Analyzers.Tests.csproj +++ b/tests/TUnit.AspNetCore.Analyzers.Tests/TUnit.AspNetCore.Analyzers.Tests.csproj @@ -4,7 +4,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 diff --git a/tests/TUnit.AspNetCore.Tests.MinimalApi/TUnit.AspNetCore.Tests.MinimalApi.csproj b/tests/TUnit.AspNetCore.Tests.MinimalApi/TUnit.AspNetCore.Tests.MinimalApi.csproj index d32749f4511..59704ec961a 100644 --- a/tests/TUnit.AspNetCore.Tests.MinimalApi/TUnit.AspNetCore.Tests.MinimalApi.csproj +++ b/tests/TUnit.AspNetCore.Tests.MinimalApi/TUnit.AspNetCore.Tests.MinimalApi.csproj @@ -1,7 +1,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 enable enable false diff --git a/tests/TUnit.AspNetCore.Tests.WebApp/TUnit.AspNetCore.Tests.WebApp.csproj b/tests/TUnit.AspNetCore.Tests.WebApp/TUnit.AspNetCore.Tests.WebApp.csproj index ff70c90a2d4..c8f01e4347b 100644 --- a/tests/TUnit.AspNetCore.Tests.WebApp/TUnit.AspNetCore.Tests.WebApp.csproj +++ b/tests/TUnit.AspNetCore.Tests.WebApp/TUnit.AspNetCore.Tests.WebApp.csproj @@ -1,7 +1,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 enable enable false diff --git a/tests/TUnit.AspNetCore.Tests/ActivityPropagationHandlerTests.cs b/tests/TUnit.AspNetCore.Tests/ActivityPropagationHandlerTests.cs index f75906e16a8..25417feaf30 100644 --- a/tests/TUnit.AspNetCore.Tests/ActivityPropagationHandlerTests.cs +++ b/tests/TUnit.AspNetCore.Tests/ActivityPropagationHandlerTests.cs @@ -139,7 +139,8 @@ private static async Task AssertValidW3CTraceparent(string traceparent) await Assert.That(parts[1].All(static c => Uri.IsHexDigit(c))).IsTrue(); await Assert.That(parts[2].Length).IsEqualTo(16); await Assert.That(parts[2].All(static c => Uri.IsHexDigit(c))).IsTrue(); - await Assert.That(parts[3] is "00" or "01").IsTrue(); + // .NET 11 also sets the W3C random-trace-id flag (0x02), so a sampled trace ends in "03". + await Assert.That(parts[3] is "00" or "01" or "02" or "03").IsTrue(); } private sealed class CaptureHandler( diff --git a/tests/TUnit.AspNetCore.Tests/TUnit.AspNetCore.Tests.csproj b/tests/TUnit.AspNetCore.Tests/TUnit.AspNetCore.Tests.csproj index b0eba12a975..d1ce5a58cdb 100644 --- a/tests/TUnit.AspNetCore.Tests/TUnit.AspNetCore.Tests.csproj +++ b/tests/TUnit.AspNetCore.Tests/TUnit.AspNetCore.Tests.csproj @@ -4,7 +4,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 true ..\..\eng\strongname.snk diff --git a/tests/TUnit.Assertions.Analyzers.CodeFixers.Tests/Verifiers/CSharpCodeFixVerifier`2.cs b/tests/TUnit.Assertions.Analyzers.CodeFixers.Tests/Verifiers/CSharpCodeFixVerifier`2.cs index c05da31c84c..30da770870b 100644 --- a/tests/TUnit.Assertions.Analyzers.CodeFixers.Tests/Verifiers/CSharpCodeFixVerifier`2.cs +++ b/tests/TUnit.Assertions.Analyzers.CodeFixers.Tests/Verifiers/CSharpCodeFixVerifier`2.cs @@ -18,8 +18,6 @@ private static ReferenceAssemblies GetReferenceAssemblies() { #if NET472 return ReferenceAssemblies.NetFramework.Net472.Default; -#elif NET8_0 - return ReferenceAssemblies.Net.Net80; #elif NET9_0 || NET10_0_OR_GREATER return ReferenceAssemblies.Net.Net90; #else diff --git a/tests/TUnit.Assertions.Analyzers.Tests/AnalyzerTestHelpers.cs b/tests/TUnit.Assertions.Analyzers.Tests/AnalyzerTestHelpers.cs index e7fd49d332a..bdbfc93fc80 100644 --- a/tests/TUnit.Assertions.Analyzers.Tests/AnalyzerTestHelpers.cs +++ b/tests/TUnit.Assertions.Analyzers.Tests/AnalyzerTestHelpers.cs @@ -35,9 +35,6 @@ public static CSharpAnalyzerTest CreateAnalyzerTest< MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetCompatibleDllPath("TUnit.Core", typeof(TUnitAttribute).Assembly)), MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetCompatibleDllPath("TUnit.Assertions", typeof(Assert).Assembly)), MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetCompatibleDllPath("TUnit.Assertions.Should", typeof(TUnit.Assertions.Should.ShouldExtensions).Assembly)), -#if NET8_0 - MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetSystemTextJson9DllPath()), -#endif ] ); @@ -146,9 +143,6 @@ public static CSharpSuppressorTest CreateSuppresso MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetCompatibleDllPath("TUnit.Core", typeof(TUnitAttribute).Assembly)), MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetCompatibleDllPath("TUnit.Assertions", typeof(Assert).Assembly)), MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetCompatibleDllPath("TUnit.Assertions.Should", typeof(TUnit.Assertions.Should.ShouldExtensions).Assembly)), -#if NET8_0 - MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetSystemTextJson9DllPath()), -#endif ]); return test; @@ -158,8 +152,6 @@ private static ReferenceAssemblies GetReferenceAssemblies() { #if NET472 return ReferenceAssemblies.NetFramework.Net472.Default; -#elif NET8_0 - return ReferenceAssemblies.Net.Net80; #elif NET9_0_OR_GREATER return ReferenceAssemblies.Net.Net90; #else diff --git a/tests/TUnit.Assertions.Analyzers.Tests/IsNotNullAssertionSuppressorTests.cs b/tests/TUnit.Assertions.Analyzers.Tests/IsNotNullAssertionSuppressorTests.cs index b5bf614f0f2..d57afe9dab5 100644 --- a/tests/TUnit.Assertions.Analyzers.Tests/IsNotNullAssertionSuppressorTests.cs +++ b/tests/TUnit.Assertions.Analyzers.Tests/IsNotNullAssertionSuppressorTests.cs @@ -119,21 +119,11 @@ public async Task TestMethod({{valueType}}? value) var test = new AnalyzerTestHelpers.CSharpSuppressorTest { TestCode = code, -#if NET10_0_OR_GREATER - ReferenceAssemblies = new ReferenceAssemblies("net10.0", - new PackageIdentity("Microsoft.NETCore.App.Ref", "10.0.0"), Path.Combine("ref", "net10.0")), -#elif NET9_0_OR_GREATER - ReferenceAssemblies = ReferenceAssemblies.Net.Net90, -#else - ReferenceAssemblies = ReferenceAssemblies.Net.Net80, -#endif + ReferenceAssemblies = TUnit.Tests.Shared.AnalyzerTestCompatibility.RuntimeReferenceAssemblies, }; test.TestState.AdditionalReferences.AddRange([ MetadataReference.CreateFromFile(typeof(TUnitAttribute).Assembly.Location), MetadataReference.CreateFromFile(typeof(Assert).Assembly.Location), -#if NET8_0 - MetadataReference.CreateFromFile(TUnit.Tests.Shared.AnalyzerTestCompatibility.GetSystemTextJson9DllPath()), -#endif ]); await test diff --git a/tests/TUnit.Assertions.Analyzers.Tests/TUnit.Assertions.Analyzers.Tests.csproj b/tests/TUnit.Assertions.Analyzers.Tests/TUnit.Assertions.Analyzers.Tests.csproj index a211f44f3a2..26bc444c2d0 100644 --- a/tests/TUnit.Assertions.Analyzers.Tests/TUnit.Assertions.Analyzers.Tests.csproj +++ b/tests/TUnit.Assertions.Analyzers.Tests/TUnit.Assertions.Analyzers.Tests.csproj @@ -43,11 +43,6 @@ Link="TUnit.Assertions.Should.netstandard2.0.dll" CopyToOutputDirectory="PreserveNewest" Visible="false" /> - - diff --git a/tests/TUnit.Assertions.Analyzers.Tests/Verifiers/CSharpAnalyzerVerifier`1.cs b/tests/TUnit.Assertions.Analyzers.Tests/Verifiers/CSharpAnalyzerVerifier`1.cs index ee60e301d6f..92b3ab3390c 100644 --- a/tests/TUnit.Assertions.Analyzers.Tests/Verifiers/CSharpAnalyzerVerifier`1.cs +++ b/tests/TUnit.Assertions.Analyzers.Tests/Verifiers/CSharpAnalyzerVerifier`1.cs @@ -16,8 +16,6 @@ private static ReferenceAssemblies GetReferenceAssemblies() { #if NET472 return ReferenceAssemblies.NetFramework.Net472.Default; -#elif NET8_0 - return ReferenceAssemblies.Net.Net80; #elif NET9_0 || NET10_0_OR_GREATER return ReferenceAssemblies.Net.Net90; #else @@ -144,9 +142,6 @@ private static Test CreateTest(string source) TUnit.Tests.Shared.AnalyzerTestCompatibility.GetCompatibleDllPath("TUnit.Core", typeof(TUnitAttribute).Assembly), TUnit.Tests.Shared.AnalyzerTestCompatibility.GetCompatibleDllPath("TUnit.Assertions", typeof(Assert).Assembly), TUnit.Tests.Shared.AnalyzerTestCompatibility.GetCompatibleDllPath("TUnit.Assertions.Should", typeof(TUnit.Assertions.Should.ShouldExtensions).Assembly), -#if NET8_0 - TUnit.Tests.Shared.AnalyzerTestCompatibility.GetSystemTextJson9DllPath(), -#endif }, }, CompilerDiagnostics = CompilerDiagnostics.None diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Assert_That_dictionary_specialization_emits_matching_Should_overload.DotNet8_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Assert_That_dictionary_specialization_emits_matching_Should_overload.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Assert_That_dictionary_specialization_emits_matching_Should_overload.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Assert_That_dictionary_specialization_emits_matching_Should_overload.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Assert_That_dictionary_specialization_emits_matching_Should_overload.DotNet9_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Assert_That_dictionary_specialization_emits_matching_Should_overload.DotNet9_0.verified.txt deleted file mode 100644 index 2c66b59bde5..00000000000 --- a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Assert_That_dictionary_specialization_emits_matching_Should_overload.DotNet9_0.verified.txt +++ /dev/null @@ -1,25 +0,0 @@ -// -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions; -using TUnit.Assertions.Should.Core; - -namespace TUnit.Assertions.Should; - -public static partial class ShouldExtensions -{ - - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(2)] - public static global::TUnit.Assertions.Should.Core.ShouldSource> Should(this System.Collections.Generic.IReadOnlyDictionary? value, string? expression = default) - where TKey : notnull - { - var source = global::TUnit.Assertions.Assert.That(value, expression); - var innerContext = ((global::TUnit.Assertions.Core.IAssertionSource>)source).Context; - innerContext.ExpressionBuilder.Clear(); - innerContext.ExpressionBuilder.Append(expression ?? "?").Append(".Should()"); - return new global::TUnit.Assertions.Should.Core.ShouldSource>(innerContext); - } -} diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Assert_That_set_specialization_emits_matching_Should_overload.DotNet8_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Assert_That_set_specialization_emits_matching_Should_overload.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Assert_That_set_specialization_emits_matching_Should_overload.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Assert_That_set_specialization_emits_matching_Should_overload.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Assert_That_set_specialization_emits_matching_Should_overload.DotNet9_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Assert_That_set_specialization_emits_matching_Should_overload.DotNet9_0.verified.txt deleted file mode 100644 index 9c7c9c381cc..00000000000 --- a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Assert_That_set_specialization_emits_matching_Should_overload.DotNet9_0.verified.txt +++ /dev/null @@ -1,24 +0,0 @@ -// -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions; -using TUnit.Assertions.Should.Core; - -namespace TUnit.Assertions.Should; - -public static partial class ShouldExtensions -{ - - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(3)] - public static global::TUnit.Assertions.Should.Core.ShouldSource> Should(this System.Collections.Generic.ISet? value, string? expression = default) - { - var source = global::TUnit.Assertions.Assert.That(value, expression); - var innerContext = ((global::TUnit.Assertions.Core.IAssertionSource>)source).Context; - innerContext.ExpressionBuilder.Clear(); - innerContext.ExpressionBuilder.Append(expression ?? "?").Append(".Should()"); - return new global::TUnit.Assertions.Should.Core.ShouldSource>(innerContext); - } -} diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.CallerArgumentExpression_attribute_is_propagated.DotNet8_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.CallerArgumentExpression_attribute_is_propagated.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.CallerArgumentExpression_attribute_is_propagated.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.CallerArgumentExpression_attribute_is_propagated.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.CallerArgumentExpression_attribute_is_propagated.DotNet9_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.CallerArgumentExpression_attribute_is_propagated.DotNet9_0.verified.txt deleted file mode 100644 index 8ad982a2fb2..00000000000 --- a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.CallerArgumentExpression_attribute_is_propagated.DotNet9_0.verified.txt +++ /dev/null @@ -1,41 +0,0 @@ -// -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Should.Core; - -namespace TUnit.Assertions.Should.Extensions; - -public static partial class ShouldMyBetweenExtensions -{ - - public static global::TUnit.Assertions.Should.Core.ShouldAssertion BeBetween(this global::TUnit.Assertions.Should.Core.IShouldSource source, TValue min, TValue max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - { - var innerContext = source.Context; - innerContext.ExpressionBuilder.Append(".BeBetween("); - var __added = false; - if (minExpression is not null) - { - if (__added) innerContext.ExpressionBuilder.Append(", "); - innerContext.ExpressionBuilder.Append(minExpression); - __added = true; - } - if (maxExpression is not null) - { - if (__added) innerContext.ExpressionBuilder.Append(", "); - innerContext.ExpressionBuilder.Append(maxExpression); - __added = true; - } - innerContext.ExpressionBuilder.Append(")"); - var inner = new global::MyNamespace.MyBetweenAssertion(innerContext, min, max); - var __tunit_should_because = source.ConsumeBecauseMessage(); - if (__tunit_should_because is not null) - { - inner.Because(__tunit_should_because); - } - return new global::TUnit.Assertions.Should.Core.ShouldAssertion(innerContext, inner); - } -} diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.GenericAssertionExtension_emits_method_generic_param.DotNet8_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.GenericAssertionExtension_emits_method_generic_param.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.GenericAssertionExtension_emits_method_generic_param.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.GenericAssertionExtension_emits_method_generic_param.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.GenericAssertionExtension_emits_method_generic_param.DotNet9_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.GenericAssertionExtension_emits_method_generic_param.DotNet9_0.verified.txt deleted file mode 100644 index e49299b23bb..00000000000 --- a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.GenericAssertionExtension_emits_method_generic_param.DotNet9_0.verified.txt +++ /dev/null @@ -1,29 +0,0 @@ -// -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Should.Core; - -namespace TUnit.Assertions.Should.Extensions; - -public static partial class ShouldMyEqualsExtensions -{ - - public static global::TUnit.Assertions.Should.Core.ShouldAssertion BeEqualTo(this global::TUnit.Assertions.Should.Core.IShouldSource source, TValue expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null) - { - var innerContext = source.Context; - innerContext.ExpressionBuilder.Append(".BeEqualTo("); - innerContext.ExpressionBuilder.Append(expectedExpression); - innerContext.ExpressionBuilder.Append(")"); - var inner = new global::MyNamespace.MyEqualsAssertion(innerContext, expected); - var __tunit_should_because = source.ConsumeBecauseMessage(); - if (__tunit_should_because is not null) - { - inner.Because(__tunit_should_because); - } - return new global::TUnit.Assertions.Should.Core.ShouldAssertion(innerContext, inner); - } -} diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.IsNot_prefix_conjugates_to_NotBe.DotNet8_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.IsNot_prefix_conjugates_to_NotBe.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.IsNot_prefix_conjugates_to_NotBe.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.IsNot_prefix_conjugates_to_NotBe.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.IsNot_prefix_conjugates_to_NotBe.DotNet9_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.IsNot_prefix_conjugates_to_NotBe.DotNet9_0.verified.txt deleted file mode 100644 index 93dd2f5b982..00000000000 --- a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.IsNot_prefix_conjugates_to_NotBe.DotNet9_0.verified.txt +++ /dev/null @@ -1,28 +0,0 @@ -// -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Should.Core; - -namespace TUnit.Assertions.Should.Extensions; - -public static partial class ShouldNotEmptyExtensions -{ - - public static global::TUnit.Assertions.Should.Core.ShouldAssertion NotBeEmpty(this global::TUnit.Assertions.Should.Core.IShouldSource source) - { - var innerContext = source.Context; - innerContext.ExpressionBuilder.Append(".NotBeEmpty("); - innerContext.ExpressionBuilder.Append(")"); - var inner = new global::MyNamespace.NotEmptyAssertion(innerContext); - var __tunit_should_because = source.ConsumeBecauseMessage(); - if (__tunit_should_because is not null) - { - inner.Because(__tunit_should_because); - } - return new global::TUnit.Assertions.Should.Core.ShouldAssertion(innerContext, inner); - } -} diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Obsolete_attribute_is_forwarded.DotNet8_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Obsolete_attribute_is_forwarded.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Obsolete_attribute_is_forwarded.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Obsolete_attribute_is_forwarded.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Obsolete_attribute_is_forwarded.DotNet9_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Obsolete_attribute_is_forwarded.DotNet9_0.verified.txt deleted file mode 100644 index f5730a4bbbb..00000000000 --- a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Obsolete_attribute_is_forwarded.DotNet9_0.verified.txt +++ /dev/null @@ -1,29 +0,0 @@ -// -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Should.Core; - -namespace TUnit.Assertions.Should.Extensions; - -public static partial class ShouldLegacyExtensions -{ - - [global::System.Obsolete("Use IsModern instead.")] - public static global::TUnit.Assertions.Should.Core.ShouldAssertion BeLegacy(this global::TUnit.Assertions.Should.Core.IShouldSource source) - { - var innerContext = source.Context; - innerContext.ExpressionBuilder.Append(".BeLegacy("); - innerContext.ExpressionBuilder.Append(")"); - var inner = new global::MyNamespace.LegacyAssertion(innerContext); - var __tunit_should_because = source.ConsumeBecauseMessage(); - if (__tunit_should_because is not null) - { - inner.Because(__tunit_should_because); - } - return new global::TUnit.Assertions.Should.Core.ShouldAssertion(innerContext, inner); - } -} diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Overload_with_trailing_optional_constructor_parameter_is_emitted.DotNet8_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Overload_with_trailing_optional_constructor_parameter_is_emitted.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Overload_with_trailing_optional_constructor_parameter_is_emitted.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Overload_with_trailing_optional_constructor_parameter_is_emitted.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Overload_with_trailing_optional_constructor_parameter_is_emitted.DotNet9_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Overload_with_trailing_optional_constructor_parameter_is_emitted.DotNet9_0.verified.txt deleted file mode 100644 index 6517a8c7fae..00000000000 --- a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Overload_with_trailing_optional_constructor_parameter_is_emitted.DotNet9_0.verified.txt +++ /dev/null @@ -1,46 +0,0 @@ -// -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Should.Core; - -namespace TUnit.Assertions.Should.Extensions; - -public static partial class ShouldExceptionExtensions -{ - - public static global::TUnit.Assertions.Should.Core.ShouldAssertion WithMessage(this global::TUnit.Assertions.Should.Core.IShouldSource source, string expectedMessage, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedMessage")] string? expression = null) - where TException : System.Exception - { - var innerContext = source.Context; - innerContext.ExpressionBuilder.Append(".WithMessage("); - innerContext.ExpressionBuilder.Append(expression); - innerContext.ExpressionBuilder.Append(")"); - var inner = new global::MyNamespace.ExceptionMessageEqualsAssertion(innerContext, expectedMessage); - var __tunit_should_because = source.ConsumeBecauseMessage(); - if (__tunit_should_because is not null) - { - inner.Because(__tunit_should_because); - } - return new global::TUnit.Assertions.Should.Core.ShouldAssertion(innerContext, inner); - } - - public static global::TUnit.Assertions.Should.Core.ShouldAssertion WithMessage(this global::TUnit.Assertions.Should.Core.IShouldSource source, string expectedMessage, System.StringComparison comparison, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedMessage")] string? expression = null) - where TException : System.Exception - { - var innerContext = source.Context; - innerContext.ExpressionBuilder.Append(".WithMessage("); - innerContext.ExpressionBuilder.Append(expression); - innerContext.ExpressionBuilder.Append(")"); - var inner = new global::MyNamespace.ExceptionMessageEqualsAssertion(innerContext, expectedMessage, comparison); - var __tunit_should_because = source.ConsumeBecauseMessage(); - if (__tunit_should_because is not null) - { - inner.Because(__tunit_should_because); - } - return new global::TUnit.Assertions.Should.Core.ShouldAssertion(innerContext, inner); - } -} diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.RequiresUnreferencedCode_is_not_forwarded_to_overloads_with_AOT_safe_ctor.DotNet8_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.RequiresUnreferencedCode_is_not_forwarded_to_overloads_with_AOT_safe_ctor.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.RequiresUnreferencedCode_is_not_forwarded_to_overloads_with_AOT_safe_ctor.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.RequiresUnreferencedCode_is_not_forwarded_to_overloads_with_AOT_safe_ctor.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.RequiresUnreferencedCode_is_not_forwarded_to_overloads_with_AOT_safe_ctor.DotNet9_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.RequiresUnreferencedCode_is_not_forwarded_to_overloads_with_AOT_safe_ctor.DotNet9_0.verified.txt deleted file mode 100644 index c7038618fe1..00000000000 --- a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.RequiresUnreferencedCode_is_not_forwarded_to_overloads_with_AOT_safe_ctor.DotNet9_0.verified.txt +++ /dev/null @@ -1,45 +0,0 @@ -// -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Should.Core; - -namespace TUnit.Assertions.Should.Extensions; - -public static partial class ShouldEquivalentExtensions -{ - - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Reflection-based equivalency")] - public static global::TUnit.Assertions.Should.Core.ShouldAssertion> BeEquivalentTo(this global::TUnit.Assertions.Should.Core.IShouldSource> source, System.Collections.Generic.IEnumerable expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - { - var innerContext = source.Context; - innerContext.ExpressionBuilder.Append(".BeEquivalentTo("); - innerContext.ExpressionBuilder.Append(expression); - innerContext.ExpressionBuilder.Append(")"); - var inner = new global::MyNamespace.EquivalentToAssertion(innerContext, expected); - var __tunit_should_because = source.ConsumeBecauseMessage(); - if (__tunit_should_because is not null) - { - inner.Because(__tunit_should_because); - } - return new global::TUnit.Assertions.Should.Core.ShouldAssertion>(innerContext, inner); - } - - public static global::TUnit.Assertions.Should.Core.ShouldAssertion> BeEquivalentTo(this global::TUnit.Assertions.Should.Core.IShouldSource> source, System.Collections.Generic.IEnumerable expected, System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - { - var innerContext = source.Context; - innerContext.ExpressionBuilder.Append(".BeEquivalentTo("); - innerContext.ExpressionBuilder.Append(expression); - innerContext.ExpressionBuilder.Append(")"); - var inner = new global::MyNamespace.EquivalentToAssertion(innerContext, expected, comparer); - var __tunit_should_because = source.ConsumeBecauseMessage(); - if (__tunit_should_because is not null) - { - inner.Because(__tunit_should_because); - } - return new global::TUnit.Assertions.Should.Core.ShouldAssertion>(innerContext, inner); - } -} diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.ShouldNameAttribute_overrides_conjugation.DotNet8_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.ShouldNameAttribute_overrides_conjugation.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.ShouldNameAttribute_overrides_conjugation.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.ShouldNameAttribute_overrides_conjugation.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.ShouldNameAttribute_overrides_conjugation.DotNet9_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.ShouldNameAttribute_overrides_conjugation.DotNet9_0.verified.txt deleted file mode 100644 index 9da2af3511e..00000000000 --- a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.ShouldNameAttribute_overrides_conjugation.DotNet9_0.verified.txt +++ /dev/null @@ -1,28 +0,0 @@ -// -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Should.Core; - -namespace TUnit.Assertions.Should.Extensions; - -public static partial class ShouldOddExtensions -{ - - public static global::TUnit.Assertions.Should.Core.ShouldAssertion BeAnOddNumber(this global::TUnit.Assertions.Should.Core.IShouldSource source) - { - var innerContext = source.Context; - innerContext.ExpressionBuilder.Append(".BeAnOddNumber("); - innerContext.ExpressionBuilder.Append(")"); - var inner = new global::MyNamespace.OddAssertion(innerContext); - var __tunit_should_because = source.ConsumeBecauseMessage(); - if (__tunit_should_because is not null) - { - inner.Because(__tunit_should_because); - } - return new global::TUnit.Assertions.Should.Core.ShouldAssertion(innerContext, inner); - } -} diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.SimpleAssertionExtension_emits_conjugated_extension_method.DotNet8_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.SimpleAssertionExtension_emits_conjugated_extension_method.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.SimpleAssertionExtension_emits_conjugated_extension_method.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.SimpleAssertionExtension_emits_conjugated_extension_method.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.SimpleAssertionExtension_emits_conjugated_extension_method.DotNet9_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.SimpleAssertionExtension_emits_conjugated_extension_method.DotNet9_0.verified.txt deleted file mode 100644 index 64987a067d6..00000000000 --- a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.SimpleAssertionExtension_emits_conjugated_extension_method.DotNet9_0.verified.txt +++ /dev/null @@ -1,28 +0,0 @@ -// -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Should.Core; - -namespace TUnit.Assertions.Should.Extensions; - -public static partial class ShouldStringIsEmptyExtensions -{ - - public static global::TUnit.Assertions.Should.Core.ShouldAssertion BeEmpty(this global::TUnit.Assertions.Should.Core.IShouldSource source) - { - var innerContext = source.Context; - innerContext.ExpressionBuilder.Append(".BeEmpty("); - innerContext.ExpressionBuilder.Append(")"); - var inner = new global::MyNamespace.StringIsEmptyAssertion(innerContext); - var __tunit_should_because = source.ConsumeBecauseMessage(); - if (__tunit_should_because is not null) - { - inner.Because(__tunit_should_because); - } - return new global::TUnit.Assertions.Should.Core.ShouldAssertion(innerContext, inner); - } -} diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Wrapper_generation_deduplicates_overridden_instance_methods.DotNet8_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Wrapper_generation_deduplicates_overridden_instance_methods.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Wrapper_generation_deduplicates_overridden_instance_methods.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Wrapper_generation_deduplicates_overridden_instance_methods.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Wrapper_generation_deduplicates_overridden_instance_methods.DotNet9_0.verified.txt b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Wrapper_generation_deduplicates_overridden_instance_methods.DotNet9_0.verified.txt deleted file mode 100644 index 3649b2d4286..00000000000 --- a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.Wrapper_generation_deduplicates_overridden_instance_methods.DotNet9_0.verified.txt +++ /dev/null @@ -1,26 +0,0 @@ -// -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; - -namespace MyNamespace; - -partial class ShouldDerivedSource -{ - - public global::TUnit.Assertions.Should.Core.ShouldAssertion BeReady() - { - Context.ExpressionBuilder.Append(".BeReady("); - Context.ExpressionBuilder.Append(")"); - var inner = new global::MyNamespace.BaseWrappedAssertion(Context); - var __tunit_should_because = ((global::TUnit.Assertions.Should.Core.IShouldSource)this).ConsumeBecauseMessage(); - if (__tunit_should_because is not null) - { - inner.Because(__tunit_should_because); - } - return new global::TUnit.Assertions.Should.Core.ShouldAssertion(Context, inner); - } -} diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.cs b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.cs index 61cfac7be06..ed0ce3bb617 100644 --- a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.cs +++ b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/ShouldExtensionGeneratorTests.cs @@ -429,22 +429,7 @@ public static SetAssertion That( /// private static async Task RunGenerator(string userSource, [CallerMemberName] string testName = "") { - // On net8.0 hosts, OverloadResolutionPriorityAttribute is missing from the BCL and the - // Polyfill copy compiled into this test assembly is internal — invisible to the synthetic - // GeneratorTest compilation. Inject a public copy so the attribute resolves consistently - // across all TFMs the test multi-targets. var inputTrees = new List { GeneratorTestInput.Parse(userSource) }; -#if NET8_0 - inputTrees.Add(GeneratorTestInput.Parse(""" - namespace System.Runtime.CompilerServices; - [System.AttributeUsage(System.AttributeTargets.Method | System.AttributeTargets.Constructor | System.AttributeTargets.Property, Inherited = false)] - public sealed class OverloadResolutionPriorityAttribute : System.Attribute - { - public OverloadResolutionPriorityAttribute(int priority) => Priority = priority; - public int Priority { get; } - } - """)); -#endif var compilation = CSharpCompilation.Create( assemblyName: "GeneratorTest", diff --git a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/TUnit.Assertions.Should.SourceGenerator.Tests.csproj b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/TUnit.Assertions.Should.SourceGenerator.Tests.csproj index ae0f969e66e..676e6e72c8c 100644 --- a/tests/TUnit.Assertions.Should.SourceGenerator.Tests/TUnit.Assertions.Should.SourceGenerator.Tests.csproj +++ b/tests/TUnit.Assertions.Should.SourceGenerator.Tests/TUnit.Assertions.Should.SourceGenerator.Tests.csproj @@ -3,12 +3,12 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/ArrayAssertionGeneratorTests.GeneratesArrayAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/ArrayAssertionGeneratorTests.GeneratesArrayAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/ArrayAssertionGeneratorTests.GeneratesArrayAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/ArrayAssertionGeneratorTests.GeneratesArrayAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/ArrayAssertionGeneratorTests.GeneratesArrayAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/ArrayAssertionGeneratorTests.GeneratesArrayAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 8c9e20b63c7..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/ArrayAssertionGeneratorTests.GeneratesArrayAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,318 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsEmpty -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class TArray_IsEmpty_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public TArray_IsEmpty_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.Length == 0; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be an empty array"; - } -} - -/// -/// Generated assertion for IsNotEmpty -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class TArray_IsNotEmpty_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public TArray_IsNotEmpty_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value != null && value!.Length > 0; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to not be an empty array"; - } -} - -/// -/// Generated assertion for IsSingleElement -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class TArray_IsSingleElement_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public TArray_IsSingleElement_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.Length == 1; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be a single-element array"; - } -} - -/// -/// Generated assertion for IsNotSingleElement -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class TArray_IsNotSingleElement_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public TArray_IsNotSingleElement_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.Length != 1; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to not be a single-element array"; - } -} - -/// -/// Generated assertion for IsSingleElement -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class IEnumerableT_IsSingleElement_Assertion : Assertion> -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public IEnumerableT_IsSingleElement_Assertion(AssertionContext> context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata> metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value != null && value!.Skip(1).Take(1).Any() == false && value!.Any(); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be a single-element collection"; - } -} - -/// -/// Generated assertion for IsNotSingleElement -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class IEnumerableT_IsNotSingleElement_Assertion : Assertion> -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public IEnumerableT_IsNotSingleElement_Assertion(AssertionContext> context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata> metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value == null || value!.Skip(1).Take(1).Any() || !value!.Any(); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to not be a single-element collection"; - } -} - -public static partial class ArrayAssertionExtensions -{ - /// - /// Generated extension method for IsEmpty - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static TArray_IsEmpty_Assertion IsEmpty(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsEmpty()"); - return new TArray_IsEmpty_Assertion(source.Context); - } - - /// - /// Generated extension method for IsNotEmpty - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static TArray_IsNotEmpty_Assertion IsNotEmpty(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotEmpty()"); - return new TArray_IsNotEmpty_Assertion(source.Context); - } - - /// - /// Generated extension method for IsSingleElement - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static TArray_IsSingleElement_Assertion IsSingleElement(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsSingleElement()"); - return new TArray_IsSingleElement_Assertion(source.Context); - } - - /// - /// Generated extension method for IsNotSingleElement - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static TArray_IsNotSingleElement_Assertion IsNotSingleElement(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotSingleElement()"); - return new TArray_IsNotSingleElement_Assertion(source.Context); - } - - /// - /// Generated extension method for IsSingleElement - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static IEnumerableT_IsSingleElement_Assertion IsSingleElement(this IAssertionSource> source) - { - source.Context.ExpressionBuilder.Append(".IsSingleElement()"); - return new IEnumerableT_IsSingleElement_Assertion(source.Context); - } - - /// - /// Generated extension method for IsNotSingleElement - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static IEnumerableT_IsNotSingleElement_Assertion IsNotSingleElement(this IAssertionSource> source) - { - source.Context.ExpressionBuilder.Append(".IsNotSingleElement()"); - return new IEnumerableT_IsNotSingleElement_Assertion(source.Context); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssemblyAssertionGeneratorTests.GeneratesAssemblyAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssemblyAssertionGeneratorTests.GeneratesAssemblyAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssemblyAssertionGeneratorTests.GeneratesAssemblyAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssemblyAssertionGeneratorTests.GeneratesAssemblyAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssemblyAssertionGeneratorTests.GeneratesAssemblyAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssemblyAssertionGeneratorTests.GeneratesAssemblyAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 9fd25097b08..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssemblyAssertionGeneratorTests.GeneratesAssemblyAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,114 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -public class AssemblyIsDynamicAssertion : Assertion -{ - private readonly bool _negated; - - public AssemblyIsDynamicAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsDynamic; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsDynamic")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be dynamic"; - } -} - -public class AssemblyIsFullyTrustedAssertion : Assertion -{ - private readonly bool _negated; - - public AssemblyIsFullyTrustedAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsFullyTrusted; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsFullyTrusted")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be fully trusted"; - } -} - -public static partial class AssemblyAssertionExtensions -{ - public static AssemblyIsDynamicAssertion IsDynamic(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsDynamic()"); - return new AssemblyIsDynamicAssertion(source.Context, false); - } - - public static AssemblyIsDynamicAssertion IsNotDynamic(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotDynamic()"); - return new AssemblyIsDynamicAssertion(source.Context, true); - } - - public static AssemblyIsFullyTrustedAssertion IsFullyTrusted(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsFullyTrusted()"); - return new AssemblyIsFullyTrustedAssertion(source.Context, false); - } - - public static AssemblyIsFullyTrustedAssertion IsNotFullyTrusted(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotFullyTrusted()"); - return new AssemblyIsFullyTrustedAssertion(source.Context, true); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithDefaultValues.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithDefaultValues.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithDefaultValues.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithDefaultValues.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithDefaultValues.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithDefaultValues.DotNet9_0.verified.txt deleted file mode 100644 index 9e536fb827f..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithDefaultValues.DotNet9_0.verified.txt +++ /dev/null @@ -1,48 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for DefaultValuesAssertion. -/// -public static partial class DefaultValuesAssertionExtensions -{ - - /// - public static DefaultValuesAssertion HasDefaultValues(this IAssertionSource source, bool boolValue = true, int intValue = 0, string stringValue = "default", [CallerArgumentExpression(nameof(boolValue))] string? boolValueExpression = null, [CallerArgumentExpression(nameof(intValue))] string? intValueExpression = null, [CallerArgumentExpression(nameof(stringValue))] string? stringValueExpression = null) - { - source.Context.ExpressionBuilder.Append(".HasDefaultValues("); - var added = false; - if (boolValueExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(boolValueExpression); - added = true; - } - if (intValueExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(intValueExpression); - added = true; - } - if (stringValueExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(stringValueExpression); - added = true; - } - source.Context.ExpressionBuilder.Append(")"); - return new DefaultValuesAssertion(source.Context, boolValue, intValue, stringValue); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithEnumDefault.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithEnumDefault.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithEnumDefault.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithEnumDefault.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithEnumDefault.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithEnumDefault.DotNet9_0.verified.txt deleted file mode 100644 index 25841241ba8..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithEnumDefault.DotNet9_0.verified.txt +++ /dev/null @@ -1,42 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for StringComparisonAssertion. -/// -public static partial class StringComparisonAssertionExtensions -{ - - /// - public static StringComparisonAssertion IsEqualToWithComparison(this IAssertionSource source, string expected, System.StringComparison comparison = StringComparison.Ordinal, [CallerArgumentExpression(nameof(expected))] string? expectedExpression = null, [CallerArgumentExpression(nameof(comparison))] string? comparisonExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsEqualToWithComparison("); - var added = false; - if (expectedExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(expectedExpression); - added = true; - } - if (comparisonExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(comparisonExpression); - added = true; - } - source.Context.ExpressionBuilder.Append(")"); - return new StringComparisonAssertion(source.Context, expected, comparison); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithGenericConstraints.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithGenericConstraints.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithGenericConstraints.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithGenericConstraints.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithGenericConstraints.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithGenericConstraints.DotNet9_0.verified.txt deleted file mode 100644 index c5961e18b76..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithGenericConstraints.DotNet9_0.verified.txt +++ /dev/null @@ -1,31 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for GreaterThanAssertion. -/// -public static partial class GreaterThanAssertionExtensions -{ - - /// - public static GreaterThanAssertion IsGreaterThan(this IAssertionSource source, TValue expected, [CallerArgumentExpression(nameof(expected))] string? expectedExpression = null) - where TValue : System.IComparable - { - source.Context.ExpressionBuilder.Append(".IsGreaterThan("); - source.Context.ExpressionBuilder.Append(expectedExpression); - source.Context.ExpressionBuilder.Append(")"); - return new GreaterThanAssertion(source.Context, expected); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithMultipleConstructors.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithMultipleConstructors.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithMultipleConstructors.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithMultipleConstructors.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithMultipleConstructors.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithMultipleConstructors.DotNet9_0.verified.txt deleted file mode 100644 index 047e233964c..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithMultipleConstructors.DotNet9_0.verified.txt +++ /dev/null @@ -1,51 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for EqualsAssertion. -/// -public static partial class EqualsAssertionExtensions -{ - - /// - public static EqualsAssertion IsEqualTo(this IAssertionSource source, TValue expected, [CallerArgumentExpression(nameof(expected))] string? expectedExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsEqualTo("); - source.Context.ExpressionBuilder.Append(expectedExpression); - source.Context.ExpressionBuilder.Append(")"); - return new EqualsAssertion(source.Context, expected); - } - - /// - public static EqualsAssertion IsEqualTo(this IAssertionSource source, TValue expected, System.Collections.Generic.IEqualityComparer comparer, [CallerArgumentExpression(nameof(expected))] string? expectedExpression = null, [CallerArgumentExpression(nameof(comparer))] string? comparerExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsEqualTo("); - var added = false; - if (expectedExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(expectedExpression); - added = true; - } - if (comparerExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(comparerExpression); - added = true; - } - source.Context.ExpressionBuilder.Append(")"); - return new EqualsAssertion(source.Context, expected, comparer); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithMultipleParameters.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithMultipleParameters.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithMultipleParameters.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithMultipleParameters.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithMultipleParameters.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithMultipleParameters.DotNet9_0.verified.txt deleted file mode 100644 index 45300f8487e..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithMultipleParameters.DotNet9_0.verified.txt +++ /dev/null @@ -1,43 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for BetweenAssertion. -/// -public static partial class BetweenAssertionExtensions -{ - - /// - public static BetweenAssertion IsBetween(this IAssertionSource source, TValue lowerBound, TValue upperBound, [CallerArgumentExpression(nameof(lowerBound))] string? lowerBoundExpression = null, [CallerArgumentExpression(nameof(upperBound))] string? upperBoundExpression = null) - where TValue : System.IComparable - { - source.Context.ExpressionBuilder.Append(".IsBetween("); - var added = false; - if (lowerBoundExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(lowerBoundExpression); - added = true; - } - if (upperBoundExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(upperBoundExpression); - added = true; - } - source.Context.ExpressionBuilder.Append(")"); - return new BetweenAssertion(source.Context, lowerBound, upperBound); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithNegatedMethod.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithNegatedMethod.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithNegatedMethod.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithNegatedMethod.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithNegatedMethod.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithNegatedMethod.DotNet9_0.verified.txt deleted file mode 100644 index 9810711e14c..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithNegatedMethod.DotNet9_0.verified.txt +++ /dev/null @@ -1,37 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for TrueAssertion. -/// -public static partial class TrueAssertionExtensions -{ - - /// - public static TrueAssertion IsTrue(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsTrue("); source.Context.ExpressionBuilder.Append(")"); - return new TrueAssertion(source.Context); - } - - /// - /// Extension method for TrueAssertion. - /// - public static TrueAssertion IsFalse(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsFalse("); source.Context.ExpressionBuilder.Append(")"); - return new TrueAssertion(source.Context); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithOptionalParameter.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithOptionalParameter.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithOptionalParameter.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithOptionalParameter.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithOptionalParameter.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithOptionalParameter.DotNet9_0.verified.txt deleted file mode 100644 index 8a20a9aa7de..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.AssertionWithOptionalParameter.DotNet9_0.verified.txt +++ /dev/null @@ -1,42 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for NotEqualsAssertion. -/// -public static partial class NotEqualsAssertionExtensions -{ - - /// - public static NotEqualsAssertion IsNotEqualTo(this IAssertionSource source, TValue notExpected, System.Collections.Generic.IEqualityComparer? comparer = null, [CallerArgumentExpression(nameof(notExpected))] string? notExpectedExpression = null, [CallerArgumentExpression(nameof(comparer))] string? comparerExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsNotEqualTo("); - var added = false; - if (notExpectedExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(notExpectedExpression); - added = true; - } - if (comparerExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(comparerExpression); - added = true; - } - source.Context.ExpressionBuilder.Append(")"); - return new NotEqualsAssertion(source.Context, notExpected, comparer); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ConcreteReceiverWithExtraGeneric.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ConcreteReceiverWithExtraGeneric.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ConcreteReceiverWithExtraGeneric.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ConcreteReceiverWithExtraGeneric.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ConcreteReceiverWithExtraGeneric.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ConcreteReceiverWithExtraGeneric.DotNet9_0.verified.txt deleted file mode 100644 index 64005198f73..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ConcreteReceiverWithExtraGeneric.DotNet9_0.verified.txt +++ /dev/null @@ -1,40 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for ConcreteReceiverWithExtraGenericAssertion. -/// -public static partial class ConcreteReceiverWithExtraGenericAssertionExtensions -{ - - /// - public static ConcreteReceiverWithExtraGenericAssertion ConcreteReceiverWithExtraGenericMatches(this IAssertionSource source, System.Func predicate, [CallerArgumentExpression(nameof(predicate))] string? predicateExpression = null) - where TActual : System.Exception - { - source.Context.ExpressionBuilder.Append(".ConcreteReceiverWithExtraGenericMatches("); - source.Context.ExpressionBuilder.Append(predicateExpression); - source.Context.ExpressionBuilder.Append(")"); - return new ConcreteReceiverWithExtraGenericAssertion(source.Context.Map(static x => (System.Exception?)x), predicate); - } - - /// - public static ConcreteReceiverWithExtraGenericAssertion ConcreteReceiverWithExtraGenericMatches(this IAssertionSource source, System.Func predicate, [CallerArgumentExpression(nameof(predicate))] string? predicateExpression = null) - { - source.Context.ExpressionBuilder.Append(".ConcreteReceiverWithExtraGenericMatches("); - source.Context.ExpressionBuilder.Append(predicateExpression); - source.Context.ExpressionBuilder.Append(")"); - return new ConcreteReceiverWithExtraGenericAssertion(source.Context, predicate); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ConcreteReceiverWithInferableGeneric.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ConcreteReceiverWithInferableGeneric.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ConcreteReceiverWithInferableGeneric.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ConcreteReceiverWithInferableGeneric.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ConcreteReceiverWithInferableGeneric.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ConcreteReceiverWithInferableGeneric.DotNet9_0.verified.txt deleted file mode 100644 index 2cbd30cf19a..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ConcreteReceiverWithInferableGeneric.DotNet9_0.verified.txt +++ /dev/null @@ -1,31 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for ConcreteReceiverWithInferableGenericAssertion. -/// -public static partial class ConcreteReceiverWithInferableGenericAssertionExtensions -{ - - /// - public static ConcreteReceiverWithInferableGenericAssertion ConcreteReceiverWithInferableGenericTagged(this IAssertionSource source, T tag, [CallerArgumentExpression(nameof(tag))] string? tagExpression = null) - where TActual : System.Exception - { - source.Context.ExpressionBuilder.Append(".ConcreteReceiverWithInferableGenericTagged("); - source.Context.ExpressionBuilder.Append(tagExpression); - source.Context.ExpressionBuilder.Append(")"); - return new ConcreteReceiverWithInferableGenericAssertion(source.Context.Map(static x => (System.Exception?)x), tag); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.DocumentedAssertionClasses.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.DocumentedAssertionClasses.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.DocumentedAssertionClasses.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.DocumentedAssertionClasses.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.MultipleGenericParameters.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.MultipleGenericParameters.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.MultipleGenericParameters.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.MultipleGenericParameters.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.MultipleGenericParameters.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.MultipleGenericParameters.DotNet9_0.verified.txt deleted file mode 100644 index a9c5989ee26..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.MultipleGenericParameters.DotNet9_0.verified.txt +++ /dev/null @@ -1,28 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for IsAssignableToAssertion. -/// -public static partial class IsAssignableToAssertionExtensions -{ - - /// - public static IsAssignableToAssertion IsAssignableTo(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsAssignableTo("); source.Context.ExpressionBuilder.Append(")"); - return new IsAssignableToAssertion(source.Context); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.NonGenericAssertion.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.NonGenericAssertion.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.NonGenericAssertion.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.NonGenericAssertion.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.NonGenericAssertion.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.NonGenericAssertion.DotNet9_0.verified.txt deleted file mode 100644 index b33a35f8d5c..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.NonGenericAssertion.DotNet9_0.verified.txt +++ /dev/null @@ -1,28 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for StringIsEmptyAssertion. -/// -public static partial class StringIsEmptyAssertionExtensions -{ - - /// - public static StringIsEmptyAssertion IsEmpty(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsEmpty("); source.Context.ExpressionBuilder.Append(")"); - return new StringIsEmptyAssertion(source.Context); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.SingleGenericParameter.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.SingleGenericParameter.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.SingleGenericParameter.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.SingleGenericParameter.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.SingleGenericParameter.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.SingleGenericParameter.DotNet9_0.verified.txt deleted file mode 100644 index 4367383e8b3..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.SingleGenericParameter.DotNet9_0.verified.txt +++ /dev/null @@ -1,28 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for NullAssertion. -/// -public static partial class NullAssertionExtensions -{ - - /// - public static NullAssertion IsNull(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNull("); source.Context.ExpressionBuilder.Append(")"); - return new NullAssertion(source.Context); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ValueTypeDefaultParameter.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ValueTypeDefaultParameter.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ValueTypeDefaultParameter.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ValueTypeDefaultParameter.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ValueTypeDefaultParameter.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ValueTypeDefaultParameter.DotNet9_0.verified.txt deleted file mode 100644 index 8245951279c..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.ValueTypeDefaultParameter.DotNet9_0.verified.txt +++ /dev/null @@ -1,30 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for StringRespectsTokenAssertion. -/// -public static partial class StringRespectsTokenAssertionExtensions -{ - - /// - public static StringRespectsTokenAssertion RespectsToken(this IAssertionSource source, System.Threading.CancellationToken token = default, [CallerArgumentExpression(nameof(token))] string? tokenExpression = null) - { - source.Context.ExpressionBuilder.Append(".RespectsToken("); - source.Context.ExpressionBuilder.Append(tokenExpression); - source.Context.ExpressionBuilder.Append(")"); - return new StringRespectsTokenAssertion(source.Context, token); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.DocumentedAssertionClasses.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionXmlDocsTests.DocumentedAssertionExtension_InheritdocCrefsResolveFromPackage.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionGeneratorTests.DocumentedAssertionClasses.DotNet9_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionXmlDocsTests.DocumentedAssertionExtension_InheritdocCrefsResolveFromPackage.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionXmlDocsTests.DocumentedAssertionExtension_InheritdocCrefsResolveFromPackage.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionXmlDocsTests.DocumentedAssertionExtension_InheritdocCrefsResolveFromPackage.DotNet9_0.verified.txt deleted file mode 100644 index 44a848f8883..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionXmlDocsTests.DocumentedAssertionExtension_InheritdocCrefsResolveFromPackage.DotNet9_0.verified.txt +++ /dev/null @@ -1,243 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for DocumentedRangeAssertion. -/// -public static partial class DocumentedRangeAssertionExtensions -{ - - /// - /// - public static DocumentedRangeAssertion IsInDocumentedRange(this IAssertionSource source, int minimum, int maximum, [CallerArgumentExpression(nameof(minimum))] string? minimumExpression = null, [CallerArgumentExpression(nameof(maximum))] string? maximumExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsInDocumentedRange("); - var added = false; - if (minimumExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(minimumExpression); - added = true; - } - if (maximumExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(maximumExpression); - added = true; - } - source.Context.ExpressionBuilder.Append(")"); - return new DocumentedRangeAssertion(source.Context, minimum, maximum); - } - - /// - /// - public static DocumentedRangeAssertion IsInDocumentedRange(this IAssertionSource source, int maximum, [CallerArgumentExpression(nameof(maximum))] string? maximumExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsInDocumentedRange("); - source.Context.ExpressionBuilder.Append(maximumExpression); - source.Context.ExpressionBuilder.Append(")"); - return new DocumentedRangeAssertion(source.Context, maximum); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for DocumentedTagAssertion. -/// -public static partial class DocumentedTagAssertionExtensions -{ - - /// - /// - public static DocumentedTagAssertion HasDocumentedTag(this IAssertionSource source, TTag tag, [CallerArgumentExpression(nameof(tag))] string? tagExpression = null) - where TActual : TUnit.Assertions.Tests.TestData.DocumentedSubject - { - source.Context.ExpressionBuilder.Append(".HasDocumentedTag("); - source.Context.ExpressionBuilder.Append(tagExpression); - source.Context.ExpressionBuilder.Append(")"); - return new DocumentedTagAssertion(source.Context.Map(static x => (TUnit.Assertions.Tests.TestData.DocumentedSubject?)x), tag); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for DocumentedTagOfTypeAssertion. -/// -public static partial class DocumentedTagOfTypeAssertionExtensions -{ - - /// - /// - public static DocumentedTagOfTypeAssertion HasDocumentedTagOfType(this IAssertionSource source) - where TActual : TUnit.Assertions.Tests.TestData.DocumentedSubject - { - source.Context.ExpressionBuilder.Append(".HasDocumentedTagOfType("); source.Context.ExpressionBuilder.Append(")"); - return new DocumentedTagOfTypeAssertion(source.Context.Map(static x => (TUnit.Assertions.Tests.TestData.DocumentedSubject?)x)); - } - - /// - /// - public static DocumentedTagOfTypeAssertion HasDocumentedTagOfType(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".HasDocumentedTagOfType("); source.Context.ExpressionBuilder.Append(")"); - return new DocumentedTagOfTypeAssertion(source.Context); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for ClassOnlyDocumentedAssertion. -/// -public static partial class ClassOnlyDocumentedAssertionExtensions -{ - - /// - public static ClassOnlyDocumentedAssertion IsClassOnlyDocumented(this IAssertionSource source, string expected, [CallerArgumentExpression(nameof(expected))] string? expectedExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsClassOnlyDocumented("); - source.Context.ExpressionBuilder.Append(expectedExpression); - source.Context.ExpressionBuilder.Append(")"); - return new ClassOnlyDocumentedAssertion(source.Context, expected); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for UndocumentedAssertion. -/// -public static partial class UndocumentedAssertionExtensions -{ - - /// - /// Extension method for UndocumentedAssertion. - /// - public static UndocumentedAssertion IsUndocumented(this IAssertionSource source, string expected, [CallerArgumentExpression(nameof(expected))] string? expectedExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsUndocumented("); - source.Context.ExpressionBuilder.Append(expectedExpression); - source.Context.ExpressionBuilder.Append(")"); - return new UndocumentedAssertion(source.Context, expected); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for ConstructorOnlyDocumentedAssertion. -/// -public static partial class ConstructorOnlyDocumentedAssertionExtensions -{ - - /// - /// Extension method for ConstructorOnlyDocumentedAssertion. - /// - public static ConstructorOnlyDocumentedAssertion IsConstructorOnlyDocumented(this IAssertionSource source, string expected, [CallerArgumentExpression(nameof(expected))] string? expectedExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsConstructorOnlyDocumented("); - source.Context.ExpressionBuilder.Append(expectedExpression); - source.Context.ExpressionBuilder.Append(")"); - return new ConstructorOnlyDocumentedAssertion(source.Context, expected); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for NegatableDocumentedAssertion. -/// -public static partial class NegatableDocumentedAssertionExtensions -{ - - /// - /// - public static NegatableDocumentedAssertion IsDocumentedTrue(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsDocumentedTrue("); source.Context.ExpressionBuilder.Append(")"); - return new NegatableDocumentedAssertion(source.Context); - } - - /// - /// Extension method for NegatableDocumentedAssertion. - /// - public static NegatableDocumentedAssertion IsDocumentedFalse(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsDocumentedFalse("); source.Context.ExpressionBuilder.Append(")"); - return new NegatableDocumentedAssertion(source.Context); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionXmlDocsTests.DocumentedAssertionExtension_InheritdocCrefsResolveFromPackage.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionXmlDocsTests.DocumentedAssertionExtension_InheritdocCrefsResolveToSource.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionXmlDocsTests.DocumentedAssertionExtension_InheritdocCrefsResolveFromPackage.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionXmlDocsTests.DocumentedAssertionExtension_InheritdocCrefsResolveToSource.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionXmlDocsTests.DocumentedAssertionExtension_InheritdocCrefsResolveToSource.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionXmlDocsTests.DocumentedAssertionExtension_InheritdocCrefsResolveToSource.DotNet8_0.verified.txt deleted file mode 100644 index 44a848f8883..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionXmlDocsTests.DocumentedAssertionExtension_InheritdocCrefsResolveToSource.DotNet8_0.verified.txt +++ /dev/null @@ -1,243 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for DocumentedRangeAssertion. -/// -public static partial class DocumentedRangeAssertionExtensions -{ - - /// - /// - public static DocumentedRangeAssertion IsInDocumentedRange(this IAssertionSource source, int minimum, int maximum, [CallerArgumentExpression(nameof(minimum))] string? minimumExpression = null, [CallerArgumentExpression(nameof(maximum))] string? maximumExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsInDocumentedRange("); - var added = false; - if (minimumExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(minimumExpression); - added = true; - } - if (maximumExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(maximumExpression); - added = true; - } - source.Context.ExpressionBuilder.Append(")"); - return new DocumentedRangeAssertion(source.Context, minimum, maximum); - } - - /// - /// - public static DocumentedRangeAssertion IsInDocumentedRange(this IAssertionSource source, int maximum, [CallerArgumentExpression(nameof(maximum))] string? maximumExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsInDocumentedRange("); - source.Context.ExpressionBuilder.Append(maximumExpression); - source.Context.ExpressionBuilder.Append(")"); - return new DocumentedRangeAssertion(source.Context, maximum); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for DocumentedTagAssertion. -/// -public static partial class DocumentedTagAssertionExtensions -{ - - /// - /// - public static DocumentedTagAssertion HasDocumentedTag(this IAssertionSource source, TTag tag, [CallerArgumentExpression(nameof(tag))] string? tagExpression = null) - where TActual : TUnit.Assertions.Tests.TestData.DocumentedSubject - { - source.Context.ExpressionBuilder.Append(".HasDocumentedTag("); - source.Context.ExpressionBuilder.Append(tagExpression); - source.Context.ExpressionBuilder.Append(")"); - return new DocumentedTagAssertion(source.Context.Map(static x => (TUnit.Assertions.Tests.TestData.DocumentedSubject?)x), tag); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for DocumentedTagOfTypeAssertion. -/// -public static partial class DocumentedTagOfTypeAssertionExtensions -{ - - /// - /// - public static DocumentedTagOfTypeAssertion HasDocumentedTagOfType(this IAssertionSource source) - where TActual : TUnit.Assertions.Tests.TestData.DocumentedSubject - { - source.Context.ExpressionBuilder.Append(".HasDocumentedTagOfType("); source.Context.ExpressionBuilder.Append(")"); - return new DocumentedTagOfTypeAssertion(source.Context.Map(static x => (TUnit.Assertions.Tests.TestData.DocumentedSubject?)x)); - } - - /// - /// - public static DocumentedTagOfTypeAssertion HasDocumentedTagOfType(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".HasDocumentedTagOfType("); source.Context.ExpressionBuilder.Append(")"); - return new DocumentedTagOfTypeAssertion(source.Context); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for ClassOnlyDocumentedAssertion. -/// -public static partial class ClassOnlyDocumentedAssertionExtensions -{ - - /// - public static ClassOnlyDocumentedAssertion IsClassOnlyDocumented(this IAssertionSource source, string expected, [CallerArgumentExpression(nameof(expected))] string? expectedExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsClassOnlyDocumented("); - source.Context.ExpressionBuilder.Append(expectedExpression); - source.Context.ExpressionBuilder.Append(")"); - return new ClassOnlyDocumentedAssertion(source.Context, expected); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for UndocumentedAssertion. -/// -public static partial class UndocumentedAssertionExtensions -{ - - /// - /// Extension method for UndocumentedAssertion. - /// - public static UndocumentedAssertion IsUndocumented(this IAssertionSource source, string expected, [CallerArgumentExpression(nameof(expected))] string? expectedExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsUndocumented("); - source.Context.ExpressionBuilder.Append(expectedExpression); - source.Context.ExpressionBuilder.Append(")"); - return new UndocumentedAssertion(source.Context, expected); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for ConstructorOnlyDocumentedAssertion. -/// -public static partial class ConstructorOnlyDocumentedAssertionExtensions -{ - - /// - /// Extension method for ConstructorOnlyDocumentedAssertion. - /// - public static ConstructorOnlyDocumentedAssertion IsConstructorOnlyDocumented(this IAssertionSource source, string expected, [CallerArgumentExpression(nameof(expected))] string? expectedExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsConstructorOnlyDocumented("); - source.Context.ExpressionBuilder.Append(expectedExpression); - source.Context.ExpressionBuilder.Append(")"); - return new ConstructorOnlyDocumentedAssertion(source.Context, expected); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for NegatableDocumentedAssertion. -/// -public static partial class NegatableDocumentedAssertionExtensions -{ - - /// - /// - public static NegatableDocumentedAssertion IsDocumentedTrue(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsDocumentedTrue("); source.Context.ExpressionBuilder.Append(")"); - return new NegatableDocumentedAssertion(source.Context); - } - - /// - /// Extension method for NegatableDocumentedAssertion. - /// - public static NegatableDocumentedAssertion IsDocumentedFalse(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsDocumentedFalse("); source.Context.ExpressionBuilder.Append(")"); - return new NegatableDocumentedAssertion(source.Context); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionXmlDocsTests.DocumentedAssertionExtension_InheritdocCrefsResolveToSource.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionXmlDocsTests.DocumentedAssertionExtension_InheritdocCrefsResolveToSource.DotNet9_0.verified.txt deleted file mode 100644 index 44a848f8883..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/AssertionExtensionXmlDocsTests.DocumentedAssertionExtension_InheritdocCrefsResolveToSource.DotNet9_0.verified.txt +++ /dev/null @@ -1,243 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for DocumentedRangeAssertion. -/// -public static partial class DocumentedRangeAssertionExtensions -{ - - /// - /// - public static DocumentedRangeAssertion IsInDocumentedRange(this IAssertionSource source, int minimum, int maximum, [CallerArgumentExpression(nameof(minimum))] string? minimumExpression = null, [CallerArgumentExpression(nameof(maximum))] string? maximumExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsInDocumentedRange("); - var added = false; - if (minimumExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(minimumExpression); - added = true; - } - if (maximumExpression != null) - { - source.Context.ExpressionBuilder.Append(added ? ", " : ""); - source.Context.ExpressionBuilder.Append(maximumExpression); - added = true; - } - source.Context.ExpressionBuilder.Append(")"); - return new DocumentedRangeAssertion(source.Context, minimum, maximum); - } - - /// - /// - public static DocumentedRangeAssertion IsInDocumentedRange(this IAssertionSource source, int maximum, [CallerArgumentExpression(nameof(maximum))] string? maximumExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsInDocumentedRange("); - source.Context.ExpressionBuilder.Append(maximumExpression); - source.Context.ExpressionBuilder.Append(")"); - return new DocumentedRangeAssertion(source.Context, maximum); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for DocumentedTagAssertion. -/// -public static partial class DocumentedTagAssertionExtensions -{ - - /// - /// - public static DocumentedTagAssertion HasDocumentedTag(this IAssertionSource source, TTag tag, [CallerArgumentExpression(nameof(tag))] string? tagExpression = null) - where TActual : TUnit.Assertions.Tests.TestData.DocumentedSubject - { - source.Context.ExpressionBuilder.Append(".HasDocumentedTag("); - source.Context.ExpressionBuilder.Append(tagExpression); - source.Context.ExpressionBuilder.Append(")"); - return new DocumentedTagAssertion(source.Context.Map(static x => (TUnit.Assertions.Tests.TestData.DocumentedSubject?)x), tag); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for DocumentedTagOfTypeAssertion. -/// -public static partial class DocumentedTagOfTypeAssertionExtensions -{ - - /// - /// - public static DocumentedTagOfTypeAssertion HasDocumentedTagOfType(this IAssertionSource source) - where TActual : TUnit.Assertions.Tests.TestData.DocumentedSubject - { - source.Context.ExpressionBuilder.Append(".HasDocumentedTagOfType("); source.Context.ExpressionBuilder.Append(")"); - return new DocumentedTagOfTypeAssertion(source.Context.Map(static x => (TUnit.Assertions.Tests.TestData.DocumentedSubject?)x)); - } - - /// - /// - public static DocumentedTagOfTypeAssertion HasDocumentedTagOfType(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".HasDocumentedTagOfType("); source.Context.ExpressionBuilder.Append(")"); - return new DocumentedTagOfTypeAssertion(source.Context); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for ClassOnlyDocumentedAssertion. -/// -public static partial class ClassOnlyDocumentedAssertionExtensions -{ - - /// - public static ClassOnlyDocumentedAssertion IsClassOnlyDocumented(this IAssertionSource source, string expected, [CallerArgumentExpression(nameof(expected))] string? expectedExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsClassOnlyDocumented("); - source.Context.ExpressionBuilder.Append(expectedExpression); - source.Context.ExpressionBuilder.Append(")"); - return new ClassOnlyDocumentedAssertion(source.Context, expected); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for UndocumentedAssertion. -/// -public static partial class UndocumentedAssertionExtensions -{ - - /// - /// Extension method for UndocumentedAssertion. - /// - public static UndocumentedAssertion IsUndocumented(this IAssertionSource source, string expected, [CallerArgumentExpression(nameof(expected))] string? expectedExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsUndocumented("); - source.Context.ExpressionBuilder.Append(expectedExpression); - source.Context.ExpressionBuilder.Append(")"); - return new UndocumentedAssertion(source.Context, expected); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for ConstructorOnlyDocumentedAssertion. -/// -public static partial class ConstructorOnlyDocumentedAssertionExtensions -{ - - /// - /// Extension method for ConstructorOnlyDocumentedAssertion. - /// - public static ConstructorOnlyDocumentedAssertion IsConstructorOnlyDocumented(this IAssertionSource source, string expected, [CallerArgumentExpression(nameof(expected))] string? expectedExpression = null) - { - source.Context.ExpressionBuilder.Append(".IsConstructorOnlyDocumented("); - source.Context.ExpressionBuilder.Append(expectedExpression); - source.Context.ExpressionBuilder.Append(")"); - return new ConstructorOnlyDocumentedAssertion(source.Context, expected); - } -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for NegatableDocumentedAssertion. -/// -public static partial class NegatableDocumentedAssertionExtensions -{ - - /// - /// - public static NegatableDocumentedAssertion IsDocumentedTrue(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsDocumentedTrue("); source.Context.ExpressionBuilder.Append(")"); - return new NegatableDocumentedAssertion(source.Context); - } - - /// - /// Extension method for NegatableDocumentedAssertion. - /// - public static NegatableDocumentedAssertion IsDocumentedFalse(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsDocumentedFalse("); source.Context.ExpressionBuilder.Append(")"); - return new NegatableDocumentedAssertion(source.Context); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/BooleanAssertionGeneratorTests.GeneratesBooleanAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/BooleanAssertionGeneratorTests.GeneratesBooleanAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/BooleanAssertionGeneratorTests.GeneratesBooleanAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/BooleanAssertionGeneratorTests.GeneratesBooleanAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/BooleanAssertionGeneratorTests.GeneratesBooleanAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/BooleanAssertionGeneratorTests.GeneratesBooleanAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 506208c2972..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/BooleanAssertionGeneratorTests.GeneratesBooleanAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,200 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsTrue -/// -public sealed class Bool_IsTrue_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Bool_IsTrue_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value == true; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be true"; - } -} - -/// -/// Generated assertion for IsFalse -/// -public sealed class Bool_IsFalse_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Bool_IsFalse_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value == false; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be false"; - } -} - -/// -/// Generated assertion for IsTrue -/// -public sealed class NullableBool_IsTrue_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public NullableBool_IsTrue_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value! == true; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be true"; - } -} - -/// -/// Generated assertion for IsFalse -/// -public sealed class NullableBool_IsFalse_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public NullableBool_IsFalse_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value! == false; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be false"; - } -} - -public static partial class BooleanAssertionExtensions -{ - /// - /// Generated extension method for IsTrue - /// - public static Bool_IsTrue_Assertion IsTrue(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsTrue()"); - return new Bool_IsTrue_Assertion(source.Context); - } - - /// - /// Generated extension method for IsFalse - /// - public static Bool_IsFalse_Assertion IsFalse(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsFalse()"); - return new Bool_IsFalse_Assertion(source.Context); - } - - /// - /// Generated extension method for IsTrue - /// - public static NullableBool_IsTrue_Assertion IsTrue(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsTrue()"); - return new NullableBool_IsTrue_Assertion(source.Context); - } - - /// - /// Generated extension method for IsFalse - /// - public static NullableBool_IsFalse_Assertion IsFalse(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsFalse()"); - return new NullableBool_IsFalse_Assertion(source.Context); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/CancellationTokenAssertionGeneratorTests.GeneratesCancellationTokenAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/CancellationTokenAssertionGeneratorTests.GeneratesCancellationTokenAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/CancellationTokenAssertionGeneratorTests.GeneratesCancellationTokenAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/CancellationTokenAssertionGeneratorTests.GeneratesCancellationTokenAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/CancellationTokenAssertionGeneratorTests.GeneratesCancellationTokenAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/CancellationTokenAssertionGeneratorTests.GeneratesCancellationTokenAssertions.DotNet9_0.verified.txt deleted file mode 100644 index b4fc6cbe04b..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/CancellationTokenAssertionGeneratorTests.GeneratesCancellationTokenAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,104 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -public class CancellationTokenCanBeCanceledAssertion : Assertion -{ - private readonly bool _negated; - - public CancellationTokenCanBeCanceledAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = actualValue.CanBeCanceled; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy CanBeCanceled")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be cancellable"; - } -} - -public class CancellationTokenIsCancellationRequestedAssertion : Assertion -{ - private readonly bool _negated; - - public CancellationTokenIsCancellationRequestedAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = actualValue.IsCancellationRequested; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsCancellationRequested")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}have cancellation requested"; - } -} - -public static partial class CancellationTokenAssertionExtensions -{ - public static CancellationTokenCanBeCanceledAssertion CanBeCanceled(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".CanBeCanceled()"); - return new CancellationTokenCanBeCanceledAssertion(source.Context, false); - } - - public static CancellationTokenCanBeCanceledAssertion CannotBeCanceled(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".CannotBeCanceled()"); - return new CancellationTokenCanBeCanceledAssertion(source.Context, true); - } - - public static CancellationTokenIsCancellationRequestedAssertion IsCancellationRequested(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsCancellationRequested()"); - return new CancellationTokenIsCancellationRequestedAssertion(source.Context, false); - } - - public static CancellationTokenIsCancellationRequestedAssertion IsNotCancellationRequested(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotCancellationRequested()"); - return new CancellationTokenIsCancellationRequestedAssertion(source.Context, true); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/CharAssertionGeneratorTests.GeneratesCharAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/CharAssertionGeneratorTests.GeneratesCharAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/CharAssertionGeneratorTests.GeneratesCharAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/CharAssertionGeneratorTests.GeneratesCharAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/CharAssertionGeneratorTests.GeneratesCharAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/CharAssertionGeneratorTests.GeneratesCharAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 3e7877ad611..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/CharAssertionGeneratorTests.GeneratesCharAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,620 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -public class CharIsLetterWithCharAssertion : Assertion -{ - private readonly bool _negated; - - public CharIsLetterWithCharAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = char.IsLetter(actualValue); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLetter")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a letter"; - } -} - -public class CharIsDigitWithCharAssertion : Assertion -{ - private readonly bool _negated; - - public CharIsDigitWithCharAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = char.IsDigit(actualValue); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsDigit")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a digit"; - } -} - -public class CharIsWhiteSpaceWithCharAssertion : Assertion -{ - private readonly bool _negated; - - public CharIsWhiteSpaceWithCharAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = char.IsWhiteSpace(actualValue); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsWhiteSpace")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be whitespace"; - } -} - -public class CharIsUpperWithCharAssertion : Assertion -{ - private readonly bool _negated; - - public CharIsUpperWithCharAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = char.IsUpper(actualValue); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsUpper")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be uppercase"; - } -} - -public class CharIsLowerWithCharAssertion : Assertion -{ - private readonly bool _negated; - - public CharIsLowerWithCharAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = char.IsLower(actualValue); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLower")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be lowercase"; - } -} - -public class CharIsControlWithCharAssertion : Assertion -{ - private readonly bool _negated; - - public CharIsControlWithCharAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = char.IsControl(actualValue); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsControl")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a control character"; - } -} - -public class CharIsPunctuationWithCharAssertion : Assertion -{ - private readonly bool _negated; - - public CharIsPunctuationWithCharAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = char.IsPunctuation(actualValue); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsPunctuation")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be punctuation"; - } -} - -public class CharIsSymbolWithCharAssertion : Assertion -{ - private readonly bool _negated; - - public CharIsSymbolWithCharAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = char.IsSymbol(actualValue); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsSymbol")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a symbol"; - } -} - -public class CharIsNumberWithCharAssertion : Assertion -{ - private readonly bool _negated; - - public CharIsNumberWithCharAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = char.IsNumber(actualValue); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsNumber")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a number"; - } -} - -public class CharIsSeparatorWithCharAssertion : Assertion -{ - private readonly bool _negated; - - public CharIsSeparatorWithCharAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = char.IsSeparator(actualValue); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsSeparator")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a separator"; - } -} - -public class CharIsSurrogateWithCharAssertion : Assertion -{ - private readonly bool _negated; - - public CharIsSurrogateWithCharAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = char.IsSurrogate(actualValue); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsSurrogate")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a surrogate"; - } -} - -public class CharIsHighSurrogateWithCharAssertion : Assertion -{ - private readonly bool _negated; - - public CharIsHighSurrogateWithCharAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = char.IsHighSurrogate(actualValue); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsHighSurrogate")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a high surrogate"; - } -} - -public class CharIsLowSurrogateWithCharAssertion : Assertion -{ - private readonly bool _negated; - - public CharIsLowSurrogateWithCharAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = char.IsLowSurrogate(actualValue); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLowSurrogate")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a low surrogate"; - } -} - -public class CharIsLetterOrDigitWithCharAssertion : Assertion -{ - private readonly bool _negated; - - public CharIsLetterOrDigitWithCharAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = char.IsLetterOrDigit(actualValue); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLetterOrDigit")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a letter or digit"; - } -} - -public static partial class CharAssertionExtensions -{ - public static CharIsLetterWithCharAssertion IsLetter(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsLetter()"); - return new CharIsLetterWithCharAssertion(source.Context, false); - } - - public static CharIsLetterWithCharAssertion IsNotLetter(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotLetter()"); - return new CharIsLetterWithCharAssertion(source.Context, true); - } - - public static CharIsDigitWithCharAssertion IsDigit(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsDigit()"); - return new CharIsDigitWithCharAssertion(source.Context, false); - } - - public static CharIsDigitWithCharAssertion IsNotDigit(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotDigit()"); - return new CharIsDigitWithCharAssertion(source.Context, true); - } - - public static CharIsWhiteSpaceWithCharAssertion IsWhiteSpace(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsWhiteSpace()"); - return new CharIsWhiteSpaceWithCharAssertion(source.Context, false); - } - - public static CharIsWhiteSpaceWithCharAssertion IsNotWhiteSpace(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotWhiteSpace()"); - return new CharIsWhiteSpaceWithCharAssertion(source.Context, true); - } - - public static CharIsUpperWithCharAssertion IsUpper(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsUpper()"); - return new CharIsUpperWithCharAssertion(source.Context, false); - } - - public static CharIsUpperWithCharAssertion IsNotUpper(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotUpper()"); - return new CharIsUpperWithCharAssertion(source.Context, true); - } - - public static CharIsLowerWithCharAssertion IsLower(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsLower()"); - return new CharIsLowerWithCharAssertion(source.Context, false); - } - - public static CharIsLowerWithCharAssertion IsNotLower(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotLower()"); - return new CharIsLowerWithCharAssertion(source.Context, true); - } - - public static CharIsControlWithCharAssertion IsControl(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsControl()"); - return new CharIsControlWithCharAssertion(source.Context, false); - } - - public static CharIsControlWithCharAssertion IsNotControl(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotControl()"); - return new CharIsControlWithCharAssertion(source.Context, true); - } - - public static CharIsPunctuationWithCharAssertion IsPunctuation(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsPunctuation()"); - return new CharIsPunctuationWithCharAssertion(source.Context, false); - } - - public static CharIsPunctuationWithCharAssertion IsNotPunctuation(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotPunctuation()"); - return new CharIsPunctuationWithCharAssertion(source.Context, true); - } - - public static CharIsSymbolWithCharAssertion IsSymbol(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsSymbol()"); - return new CharIsSymbolWithCharAssertion(source.Context, false); - } - - public static CharIsSymbolWithCharAssertion IsNotSymbol(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotSymbol()"); - return new CharIsSymbolWithCharAssertion(source.Context, true); - } - - public static CharIsNumberWithCharAssertion IsNumber(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNumber()"); - return new CharIsNumberWithCharAssertion(source.Context, false); - } - - public static CharIsNumberWithCharAssertion IsNotNumber(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotNumber()"); - return new CharIsNumberWithCharAssertion(source.Context, true); - } - - public static CharIsSeparatorWithCharAssertion IsSeparator(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsSeparator()"); - return new CharIsSeparatorWithCharAssertion(source.Context, false); - } - - public static CharIsSeparatorWithCharAssertion IsNotSeparator(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotSeparator()"); - return new CharIsSeparatorWithCharAssertion(source.Context, true); - } - - public static CharIsSurrogateWithCharAssertion IsSurrogate(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsSurrogate()"); - return new CharIsSurrogateWithCharAssertion(source.Context, false); - } - - public static CharIsSurrogateWithCharAssertion IsNotSurrogate(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotSurrogate()"); - return new CharIsSurrogateWithCharAssertion(source.Context, true); - } - - public static CharIsHighSurrogateWithCharAssertion IsHighSurrogate(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsHighSurrogate()"); - return new CharIsHighSurrogateWithCharAssertion(source.Context, false); - } - - public static CharIsHighSurrogateWithCharAssertion IsNotHighSurrogate(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotHighSurrogate()"); - return new CharIsHighSurrogateWithCharAssertion(source.Context, true); - } - - public static CharIsLowSurrogateWithCharAssertion IsLowSurrogate(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsLowSurrogate()"); - return new CharIsLowSurrogateWithCharAssertion(source.Context, false); - } - - public static CharIsLowSurrogateWithCharAssertion IsNotLowSurrogate(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotLowSurrogate()"); - return new CharIsLowSurrogateWithCharAssertion(source.Context, true); - } - - public static CharIsLetterOrDigitWithCharAssertion IsLetterOrDigit(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsLetterOrDigit()"); - return new CharIsLetterOrDigitWithCharAssertion(source.Context, false); - } - - public static CharIsLetterOrDigitWithCharAssertion IsNotLetterOrDigit(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotLetterOrDigit()"); - return new CharIsLetterOrDigitWithCharAssertion(source.Context, true); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/CollectionShapeAssertionGeneratorTests.Emits_Full_Per_Shape_Assertion_Surface.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/CollectionShapeAssertionGeneratorTests.Emits_Full_Per_Shape_Assertion_Surface.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/CollectionShapeAssertionGeneratorTests.Emits_Full_Per_Shape_Assertion_Surface.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/CollectionShapeAssertionGeneratorTests.Emits_Full_Per_Shape_Assertion_Surface.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/CollectionShapeAssertionGeneratorTests.Emits_Full_Per_Shape_Assertion_Surface.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/CollectionShapeAssertionGeneratorTests.Emits_Full_Per_Shape_Assertion_Surface.DotNet9_0.verified.txt deleted file mode 100644 index 3e6ec18d843..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/CollectionShapeAssertionGeneratorTests.Emits_Full_Per_Shape_Assertion_Surface.DotNet9_0.verified.txt +++ /dev/null @@ -1,765 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -namespace TUnit.Assertions.Extensions; - -public static partial class CollectionShapeAssertionSourceCollectionShapeAssertions -{ - - // global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).Contains(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).Count(); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).IsOrderedBy(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).IsOrderedBy(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).IsOrderedByDescending(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).IsOrderedByDescending(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsEmptyAssertion, TItem> IsEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Conditions.CollectionIsNotEmptyAssertion, TItem> IsNotEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.HasSingleItemAssertion, TItem> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Conditions.HasSingleItemPredicateAssertion, TItem> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtLeastAssertion, TItem> HasAtLeast(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtMostAssertion, TItem> HasAtMost(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasCountBetweenAssertion, TItem> HasCountBetween(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, TItem> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, TItem> Any(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> ContainsOnly(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, TItem> IsInOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, TItem> IsInDescendingOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).IsInDescendingOrder(); - - // global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> - public static global::TUnit.Assertions.Conditions.ReadOnlyListHasItemAtAssertion, TItem> HasItemAt(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int index, TItem expected, global::System.Collections.Generic.IEqualityComparer? comparer = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("index")] string? indexExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).HasItemAt(index, expected, comparer, indexExpression, expectedExpression); - public static global::TUnit.Assertions.Conditions.ReadOnlyListItemAtSource, TItem> ItemAt(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int index, [global::System.Runtime.CompilerServices.CallerArgumentExpression("index")] string? indexExpression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).ItemAt(index, indexExpression); - public static global::TUnit.Assertions.Conditions.ReadOnlyListItemAtSource, TItem> FirstItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).FirstItem(); - public static global::TUnit.Assertions.Conditions.ReadOnlyListLastItemSource, TItem> LastItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).LastItem(); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).Contains(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).Count(); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).IsOrderedBy(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).IsOrderedBy(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).IsOrderedByDescending(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).IsOrderedByDescending(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsEmptyAssertion, TItem> IsEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Conditions.CollectionIsNotEmptyAssertion, TItem> IsNotEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.HasSingleItemAssertion, TItem> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Conditions.HasSingleItemPredicateAssertion, TItem> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtLeastAssertion, TItem> HasAtLeast(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtMostAssertion, TItem> HasAtMost(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasCountBetweenAssertion, TItem> HasCountBetween(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, TItem> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, TItem> Any(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> ContainsOnly(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, TItem> IsInOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, TItem> IsInDescendingOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).IsInDescendingOrder(); - - // global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> - public static global::TUnit.Assertions.Conditions.ListHasItemAtAssertion, TItem> HasItemAt(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int index, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("index")] string? indexExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).HasItemAt(index, expected, indexExpression, expectedExpression); - public static global::TUnit.Assertions.Conditions.ListItemAtSource, TItem> ItemAt(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int index, [global::System.Runtime.CompilerServices.CallerArgumentExpression("index")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).ItemAt(index, expression); - public static global::TUnit.Assertions.Conditions.ListItemAtSource, TItem> FirstItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).FirstItem(); - public static global::TUnit.Assertions.Conditions.ListLastItemSource, TItem> LastItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).LastItem(); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).Contains(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).Count(); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).IsOrderedBy(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).IsOrderedBy(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).IsOrderedByDescending(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).IsOrderedByDescending(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsEmptyAssertion, TItem> IsEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Conditions.CollectionIsNotEmptyAssertion, TItem> IsNotEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.HasSingleItemAssertion, TItem> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Conditions.HasSingleItemPredicateAssertion, TItem> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtLeastAssertion, TItem> HasAtLeast(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtMostAssertion, TItem> HasAtMost(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasCountBetweenAssertion, TItem> HasCountBetween(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, TItem> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, TItem> Any(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> ContainsOnly(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, TItem> IsInOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, TItem> IsInDescendingOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).IsInDescendingOrder(); - - // global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> - public static global::TUnit.Assertions.Conditions.ListHasItemAtAssertion, TItem> HasItemAt(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int index, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("index")] string? indexExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).HasItemAt(index, expected, indexExpression, expectedExpression); - public static global::TUnit.Assertions.Conditions.ListItemAtSource, TItem> ItemAt(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int index, [global::System.Runtime.CompilerServices.CallerArgumentExpression("index")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).ItemAt(index, expression); - public static global::TUnit.Assertions.Conditions.ListItemAtSource, TItem> FirstItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).FirstItem(); - public static global::TUnit.Assertions.Conditions.ListLastItemSource, TItem> LastItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).LastItem(); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).Contains(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).Count(); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).IsOrderedBy(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).IsOrderedBy(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).IsOrderedByDescending(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).IsOrderedByDescending(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsEmptyAssertion, TItem> IsEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).IsEmpty(); - public static global::TUnit.Assertions.Conditions.CollectionIsNotEmptyAssertion, TItem> IsNotEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.HasSingleItemAssertion, TItem> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).HasSingleItem(); - public static global::TUnit.Assertions.Conditions.HasSingleItemPredicateAssertion, TItem> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtLeastAssertion, TItem> HasAtLeast(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtMostAssertion, TItem> HasAtMost(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasCountBetweenAssertion, TItem> HasCountBetween(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, TItem> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, TItem> Any(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> ContainsOnly(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, TItem> IsInOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, TItem> IsInDescendingOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).IsInDescendingOrder(); - - // global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).Contains(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).Count(); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, global::System.Func, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion IsOrderedBy(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).IsOrderedBy(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion IsOrderedBy(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).IsOrderedBy(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion IsOrderedByDescending(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).IsOrderedByDescending(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion IsOrderedByDescending(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).IsOrderedByDescending(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsEmptyAssertion IsEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Conditions.CollectionIsNotEmptyAssertion IsNotEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.HasSingleItemAssertion HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Conditions.HasSingleItemPredicateAssertion HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtLeastAssertion HasAtLeast(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtMostAssertion HasAtMost(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasCountBetweenAssertion HasCountBetween(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion Any(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion ContainsOnly(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion IsInOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion IsInDescendingOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource source) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).IsInDescendingOrder(); - - // global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> - public static global::TUnit.Assertions.Conditions.SetIsSubsetOfAssertion, TItem> IsSubsetOf(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsSubsetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsSupersetOfAssertion, TItem> IsSupersetOf(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsSupersetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsProperSubsetOfAssertion, TItem> IsProperSubsetOf(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsProperSubsetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsProperSupersetOfAssertion, TItem> IsProperSupersetOf(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsProperSupersetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetOverlapsAssertion, TItem> Overlaps(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).Overlaps(other, expression); - public static global::TUnit.Assertions.Conditions.SetDoesNotOverlapAssertion, TItem> DoesNotOverlap(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).DoesNotOverlap(other, expression); - public static global::TUnit.Assertions.Conditions.SetEqualsAssertion, TItem> SetEquals(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).SetEquals(other, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).Contains(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).Count(); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsOrderedBy(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsOrderedBy(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsOrderedByDescending(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsOrderedByDescending(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsEmptyAssertion, TItem> IsEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Conditions.CollectionIsNotEmptyAssertion, TItem> IsNotEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.HasSingleItemAssertion, TItem> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Conditions.HasSingleItemPredicateAssertion, TItem> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtLeastAssertion, TItem> HasAtLeast(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtMostAssertion, TItem> HasAtMost(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasCountBetweenAssertion, TItem> HasCountBetween(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, TItem> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, TItem> Any(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> ContainsOnly(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, TItem> IsInOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, TItem> IsInDescendingOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsInDescendingOrder(); - - // global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> - public static global::TUnit.Assertions.Conditions.SetIsSubsetOfAssertion, TItem> IsSubsetOf(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsSubsetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsSupersetOfAssertion, TItem> IsSupersetOf(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsSupersetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsProperSubsetOfAssertion, TItem> IsProperSubsetOf(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsProperSubsetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsProperSupersetOfAssertion, TItem> IsProperSupersetOf(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsProperSupersetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetOverlapsAssertion, TItem> Overlaps(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).Overlaps(other, expression); - public static global::TUnit.Assertions.Conditions.SetDoesNotOverlapAssertion, TItem> DoesNotOverlap(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).DoesNotOverlap(other, expression); - public static global::TUnit.Assertions.Conditions.SetEqualsAssertion, TItem> SetEquals(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).SetEquals(other, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).Contains(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).Count(); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsOrderedBy(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsOrderedBy(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsOrderedByDescending(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsOrderedByDescending(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsEmptyAssertion, TItem> IsEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Conditions.CollectionIsNotEmptyAssertion, TItem> IsNotEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.HasSingleItemAssertion, TItem> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Conditions.HasSingleItemPredicateAssertion, TItem> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtLeastAssertion, TItem> HasAtLeast(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtMostAssertion, TItem> HasAtMost(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasCountBetweenAssertion, TItem> HasCountBetween(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, TItem> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, TItem> Any(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> ContainsOnly(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, TItem> IsInOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, TItem> IsInDescendingOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsInDescendingOrder(); - -#if NET5_0_OR_GREATER - // global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> - public static global::TUnit.Assertions.Conditions.SetIsSubsetOfAssertion, TItem> IsSubsetOf(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsSubsetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsSupersetOfAssertion, TItem> IsSupersetOf(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsSupersetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsProperSubsetOfAssertion, TItem> IsProperSubsetOf(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsProperSubsetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsProperSupersetOfAssertion, TItem> IsProperSupersetOf(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsProperSupersetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetOverlapsAssertion, TItem> Overlaps(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).Overlaps(other, expression); - public static global::TUnit.Assertions.Conditions.SetDoesNotOverlapAssertion, TItem> DoesNotOverlap(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).DoesNotOverlap(other, expression); - public static global::TUnit.Assertions.Conditions.SetEqualsAssertion, TItem> SetEquals(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).SetEquals(other, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, TItem> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).Contains(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).Count(); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsOrderedBy(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsOrderedBy(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsOrderedByDescending(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsOrderedByDescending(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsEmptyAssertion, TItem> IsEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Conditions.CollectionIsNotEmptyAssertion, TItem> IsNotEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.HasSingleItemAssertion, TItem> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Conditions.HasSingleItemPredicateAssertion, TItem> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtLeastAssertion, TItem> HasAtLeast(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtMostAssertion, TItem> HasAtMost(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasCountBetweenAssertion, TItem> HasCountBetween(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, TItem> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, TItem> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, TItem> Any(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> ContainsOnly(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, TItem> IsInOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, TItem> IsInDescendingOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsInDescendingOrder(); -#endif - - // global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> - public static global::TUnit.Assertions.Sources.DictionaryAssertionBase, TKey, TValue> IsEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Sources.DictionaryAssertionBase, TKey, TValue> IsNotEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.DictionaryCountSource, TKey, TValue> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).Count(); - public static global::TUnit.Assertions.Sources.DictionaryAssertionBase, TKey, TValue> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Sources.DictionaryAssertionBase, TKey, TValue> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Sources.DictionaryAssertionBase, TKey, TValue> HasAtLeast(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Sources.DictionaryAssertionBase, TKey, TValue> HasAtMost(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Sources.DictionaryAssertionBase, TKey, TValue> HasCountBetween(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.DictionaryContainsKeyAssertion, TKey, TValue> ContainsKey(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TKey expectedKey, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).ContainsKey(expectedKey, expression); - public static global::TUnit.Assertions.Conditions.DictionaryContainsKeyAssertion, TKey, TValue> ContainsKey(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TKey expectedKey, global::System.Collections.Generic.IEqualityComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? keyExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).ContainsKey(expectedKey, comparer, keyExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.DictionaryDoesNotContainKeyAssertion, TKey, TValue> DoesNotContainKey(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TKey expectedKey, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).DoesNotContainKey(expectedKey, expression); - public static global::TUnit.Assertions.Conditions.DictionaryContainsValueAssertion, TKey, TValue> ContainsValue(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).ContainsValue(expectedValue, expression); - public static global::TUnit.Assertions.Conditions.DictionaryDoesNotContainValueAssertion, TKey, TValue> DoesNotContainValue(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).DoesNotContainValue(expectedValue, expression); - public static global::TUnit.Assertions.Conditions.DictionaryContainsKeyWithValueAssertion, TKey, TValue> ContainsKeyWithValue(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TKey expectedKey, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? keyExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? valueExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).ContainsKeyWithValue(expectedKey, expectedValue, keyExpression, valueExpression); - public static global::TUnit.Assertions.Conditions.DictionaryAllKeysAssertion, TKey, TValue> AllKeys(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).AllKeys(predicate, expression); - public static global::TUnit.Assertions.Conditions.DictionaryAllValuesAssertion, TKey, TValue> AllValues(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).AllValues(predicate, expression); - public static global::TUnit.Assertions.Conditions.DictionaryAnyKeyAssertion, TKey, TValue> AnyKey(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).AnyKey(predicate, expression); - public static global::TUnit.Assertions.Conditions.DictionaryAnyValueAssertion, TKey, TValue> AnyValue(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).AnyValue(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).Contains(predicate, expression); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, global::System.Collections.Generic.KeyValuePair> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, global::System.Collections.Generic.KeyValuePair> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func>, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, global::System.Collections.Generic.KeyValuePair> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, global::System.Collections.Generic.KeyValuePair> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, global::System.Collections.Generic.KeyValuePair> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, global::System.Collections.Generic.KeyValuePair> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, global::System.Collections.Generic.KeyValuePair> Any(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, global::System.Collections.Generic.KeyValuePair> ContainsOnly(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, global::System.Collections.Generic.KeyValuePair> IsInOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, global::System.Collections.Generic.KeyValuePair> IsInDescendingOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).IsInDescendingOrder(); - - // global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> IsEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> IsNotEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.MutableDictionaryCountSource, TKey, TValue> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).Count(); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasAtLeast(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasAtMost(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasCountBetween(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryContainsKeyAssertion, TKey, TValue> ContainsKey(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TKey expectedKey, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).ContainsKey(expectedKey, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryContainsKeyAssertion, TKey, TValue> ContainsKey(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TKey expectedKey, global::System.Collections.Generic.IEqualityComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? keyExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).ContainsKey(expectedKey, comparer, keyExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryDoesNotContainKeyAssertion, TKey, TValue> DoesNotContainKey(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TKey expectedKey, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).DoesNotContainKey(expectedKey, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryContainsValueAssertion, TKey, TValue> ContainsValue(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).ContainsValue(expectedValue, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryDoesNotContainValueAssertion, TKey, TValue> DoesNotContainValue(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).DoesNotContainValue(expectedValue, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryContainsKeyWithValueAssertion, TKey, TValue> ContainsKeyWithValue(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TKey expectedKey, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? keyExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? valueExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).ContainsKeyWithValue(expectedKey, expectedValue, keyExpression, valueExpression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryAllKeysAssertion, TKey, TValue> AllKeys(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).AllKeys(predicate, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryAllValuesAssertion, TKey, TValue> AllValues(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).AllValues(predicate, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryAnyKeyAssertion, TKey, TValue> AnyKey(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).AnyKey(predicate, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryAnyValueAssertion, TKey, TValue> AnyValue(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).AnyValue(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).Contains(predicate, expression); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, global::System.Collections.Generic.KeyValuePair> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, global::System.Collections.Generic.KeyValuePair> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func>, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, global::System.Collections.Generic.KeyValuePair> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, global::System.Collections.Generic.KeyValuePair> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, global::System.Collections.Generic.KeyValuePair> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, global::System.Collections.Generic.KeyValuePair> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, global::System.Collections.Generic.KeyValuePair> Any(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, global::System.Collections.Generic.KeyValuePair> ContainsOnly(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, global::System.Collections.Generic.KeyValuePair> IsInOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, global::System.Collections.Generic.KeyValuePair> IsInDescendingOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).IsInDescendingOrder(); - - // global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> IsEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).IsEmpty(); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> IsNotEmpty(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.MutableDictionaryCountSource, TKey, TValue> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).Count(); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).HasSingleItem(); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasSingleItem(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasAtLeast(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasAtMost(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasCountBetween(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryContainsKeyAssertion, TKey, TValue> ContainsKey(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TKey expectedKey, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).ContainsKey(expectedKey, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryContainsKeyAssertion, TKey, TValue> ContainsKey(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TKey expectedKey, global::System.Collections.Generic.IEqualityComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? keyExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).ContainsKey(expectedKey, comparer, keyExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryDoesNotContainKeyAssertion, TKey, TValue> DoesNotContainKey(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TKey expectedKey, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).DoesNotContainKey(expectedKey, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryContainsValueAssertion, TKey, TValue> ContainsValue(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).ContainsValue(expectedValue, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryDoesNotContainValueAssertion, TKey, TValue> DoesNotContainValue(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).DoesNotContainValue(expectedValue, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryContainsKeyWithValueAssertion, TKey, TValue> ContainsKeyWithValue(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, TKey expectedKey, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? keyExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? valueExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).ContainsKeyWithValue(expectedKey, expectedValue, keyExpression, valueExpression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryAllKeysAssertion, TKey, TValue> AllKeys(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).AllKeys(predicate, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryAllValuesAssertion, TKey, TValue> AllValues(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).AllValues(predicate, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryAnyKeyAssertion, TKey, TValue> AnyKey(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).AnyKey(predicate, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryAnyValueAssertion, TKey, TValue> AnyValue(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).AnyValue(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).Contains(predicate, expression); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, global::System.Collections.Generic.KeyValuePair> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, global::System.Collections.Generic.KeyValuePair> Count(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func>, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, global::System.Collections.Generic.KeyValuePair> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, global::System.Collections.Generic.KeyValuePair> HasDistinctItems(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, global::System.Collections.Generic.KeyValuePair> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, global::System.Collections.Generic.KeyValuePair> All(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, global::System.Collections.Generic.KeyValuePair> Any(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, global::System.Collections.Generic.KeyValuePair> ContainsOnly(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, global::System.Collections.Generic.KeyValuePair> IsInOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, global::System.Collections.Generic.KeyValuePair> IsInDescendingOrder(this global::TUnit.Assertions.SourceGenerator.Tests.TestData.CollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).IsInDescendingOrder(); -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/CultureInfoAssertionGeneratorTests.GeneratesCultureInfoAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/CultureInfoAssertionGeneratorTests.GeneratesCultureInfoAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/CultureInfoAssertionGeneratorTests.GeneratesCultureInfoAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/CultureInfoAssertionGeneratorTests.GeneratesCultureInfoAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/CultureInfoAssertionGeneratorTests.GeneratesCultureInfoAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/CultureInfoAssertionGeneratorTests.GeneratesCultureInfoAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 6d98165ab97..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/CultureInfoAssertionGeneratorTests.GeneratesCultureInfoAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,108 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -public class CultureInfoIsNeutralCultureAssertion : Assertion -{ - private readonly bool _negated; - - public CultureInfoIsNeutralCultureAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsNeutralCulture; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsNeutralCulture")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a neutral culture"; - } -} - -public class CultureInfoIsReadOnlyAssertion : Assertion -{ - private readonly bool _negated; - - public CultureInfoIsReadOnlyAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsReadOnly; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsReadOnly")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be read-only culture"; - } -} - -public static partial class CultureInfoAssertionExtensions -{ - public static CultureInfoIsNeutralCultureAssertion IsNeutralCulture(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNeutralCulture()"); - return new CultureInfoIsNeutralCultureAssertion(source.Context, false); - } - - public static CultureInfoIsNeutralCultureAssertion IsNotNeutralCulture(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotNeutralCulture()"); - return new CultureInfoIsNeutralCultureAssertion(source.Context, true); - } - - public static CultureInfoIsReadOnlyAssertion IsReadOnly(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsReadOnly()"); - return new CultureInfoIsReadOnlyAssertion(source.Context, false); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/DateOnlyAssertionGeneratorTests.GeneratesDateOnlyAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/DateOnlyAssertionGeneratorTests.GeneratesDateOnlyAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/DateOnlyAssertionGeneratorTests.GeneratesDateOnlyAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/DateOnlyAssertionGeneratorTests.GeneratesDateOnlyAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/DateTimeAssertionGeneratorTests.GeneratesDateTimeAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/DateTimeAssertionGeneratorTests.GeneratesDateTimeAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/DateTimeAssertionGeneratorTests.GeneratesDateTimeAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/DateTimeAssertionGeneratorTests.GeneratesDateTimeAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/DateTimeAssertionGeneratorTests.GeneratesDateTimeAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/DateTimeAssertionGeneratorTests.GeneratesDateTimeAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 16c6521b8fc..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/DateTimeAssertionGeneratorTests.GeneratesDateTimeAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,61 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -public class DateTimeIsDaylightSavingTimeAssertion : Assertion -{ - private readonly bool _negated; - - public DateTimeIsDaylightSavingTimeAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = actualValue.IsDaylightSavingTime(); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsDaylightSavingTime")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be during daylight saving time"; - } -} - -public static partial class DateTimeAssertionExtensions -{ - public static DateTimeIsDaylightSavingTimeAssertion IsDaylightSavingTime(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsDaylightSavingTime()"); - return new DateTimeIsDaylightSavingTimeAssertion(source.Context, false); - } - - public static DateTimeIsDaylightSavingTimeAssertion IsNotDaylightSavingTime(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotDaylightSavingTime()"); - return new DateTimeIsDaylightSavingTimeAssertion(source.Context, true); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/DateTimeOffsetAssertionGeneratorTests.GeneratesDateTimeOffsetAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/DateTimeOffsetAssertionGeneratorTests.GeneratesDateTimeOffsetAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/DateTimeOffsetAssertionGeneratorTests.GeneratesDateTimeOffsetAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/DateTimeOffsetAssertionGeneratorTests.GeneratesDateTimeOffsetAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/DateTimeOffsetAssertionGeneratorTests.GeneratesDateTimeOffsetAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/DateTimeOffsetAssertionGeneratorTests.GeneratesDateTimeOffsetAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 6b9460b6784..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/DateTimeOffsetAssertionGeneratorTests.GeneratesDateTimeOffsetAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,534 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsToday -/// -public sealed class DateTimeOffset_IsToday_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public DateTimeOffset_IsToday_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value.Date == global::System.DateTimeOffset.Now.Date; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be today"; - } -} - -/// -/// Generated assertion for IsNotToday -/// -public sealed class DateTimeOffset_IsNotToday_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public DateTimeOffset_IsNotToday_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value.Date != global::System.DateTimeOffset.Now.Date; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to not be today"; - } -} - -/// -/// Generated assertion for IsUtc -/// -public sealed class DateTimeOffset_IsUtc_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public DateTimeOffset_IsUtc_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value.Offset == global::System.TimeSpan.Zero; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be UTC"; - } -} - -/// -/// Generated assertion for IsNotUtc -/// -public sealed class DateTimeOffset_IsNotUtc_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public DateTimeOffset_IsNotUtc_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value.Offset != global::System.TimeSpan.Zero; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to not be UTC"; - } -} - -/// -/// Generated assertion for IsLeapYear -/// -public sealed class DateTimeOffset_IsLeapYear_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public DateTimeOffset_IsLeapYear_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = global::System.DateTime.IsLeapYear(value.Year); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be in a leap year"; - } -} - -/// -/// Generated assertion for IsNotLeapYear -/// -public sealed class DateTimeOffset_IsNotLeapYear_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public DateTimeOffset_IsNotLeapYear_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = !global::System.DateTime.IsLeapYear(value.Year); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to not be in a leap year"; - } -} - -/// -/// Generated assertion for IsInFuture -/// -public sealed class DateTimeOffset_IsInFuture_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public DateTimeOffset_IsInFuture_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value > global::System.DateTimeOffset.Now; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be in the future"; - } -} - -/// -/// Generated assertion for IsInPast -/// -public sealed class DateTimeOffset_IsInPast_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public DateTimeOffset_IsInPast_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value < global::System.DateTimeOffset.Now; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be in the past"; - } -} - -/// -/// Generated assertion for IsInFutureUtc -/// -public sealed class DateTimeOffset_IsInFutureUtc_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public DateTimeOffset_IsInFutureUtc_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value > global::System.DateTimeOffset.UtcNow; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be in the future (UTC)"; - } -} - -/// -/// Generated assertion for IsInPastUtc -/// -public sealed class DateTimeOffset_IsInPastUtc_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public DateTimeOffset_IsInPastUtc_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value < global::System.DateTimeOffset.UtcNow; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be in the past (UTC)"; - } -} - -/// -/// Generated assertion for IsOnWeekend -/// -public sealed class DateTimeOffset_IsOnWeekend_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public DateTimeOffset_IsOnWeekend_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value.DayOfWeek == global::System.DayOfWeek.Saturday || value.DayOfWeek == global::System.DayOfWeek.Sunday; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be on a weekend"; - } -} - -/// -/// Generated assertion for IsOnWeekday -/// -public sealed class DateTimeOffset_IsOnWeekday_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public DateTimeOffset_IsOnWeekday_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value.DayOfWeek != global::System.DayOfWeek.Saturday && value.DayOfWeek != global::System.DayOfWeek.Sunday; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be on a weekday"; - } -} - -public static partial class DateTimeOffsetAssertionExtensions -{ - /// - /// Generated extension method for IsToday - /// - public static DateTimeOffset_IsToday_Assertion IsToday(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsToday()"); - return new DateTimeOffset_IsToday_Assertion(source.Context); - } - - /// - /// Generated extension method for IsNotToday - /// - public static DateTimeOffset_IsNotToday_Assertion IsNotToday(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotToday()"); - return new DateTimeOffset_IsNotToday_Assertion(source.Context); - } - - /// - /// Generated extension method for IsUtc - /// - public static DateTimeOffset_IsUtc_Assertion IsUtc(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsUtc()"); - return new DateTimeOffset_IsUtc_Assertion(source.Context); - } - - /// - /// Generated extension method for IsNotUtc - /// - public static DateTimeOffset_IsNotUtc_Assertion IsNotUtc(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotUtc()"); - return new DateTimeOffset_IsNotUtc_Assertion(source.Context); - } - - /// - /// Generated extension method for IsLeapYear - /// - public static DateTimeOffset_IsLeapYear_Assertion IsLeapYear(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsLeapYear()"); - return new DateTimeOffset_IsLeapYear_Assertion(source.Context); - } - - /// - /// Generated extension method for IsNotLeapYear - /// - public static DateTimeOffset_IsNotLeapYear_Assertion IsNotLeapYear(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotLeapYear()"); - return new DateTimeOffset_IsNotLeapYear_Assertion(source.Context); - } - - /// - /// Generated extension method for IsInFuture - /// - public static DateTimeOffset_IsInFuture_Assertion IsInFuture(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsInFuture()"); - return new DateTimeOffset_IsInFuture_Assertion(source.Context); - } - - /// - /// Generated extension method for IsInPast - /// - public static DateTimeOffset_IsInPast_Assertion IsInPast(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsInPast()"); - return new DateTimeOffset_IsInPast_Assertion(source.Context); - } - - /// - /// Generated extension method for IsInFutureUtc - /// - public static DateTimeOffset_IsInFutureUtc_Assertion IsInFutureUtc(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsInFutureUtc()"); - return new DateTimeOffset_IsInFutureUtc_Assertion(source.Context); - } - - /// - /// Generated extension method for IsInPastUtc - /// - public static DateTimeOffset_IsInPastUtc_Assertion IsInPastUtc(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsInPastUtc()"); - return new DateTimeOffset_IsInPastUtc_Assertion(source.Context); - } - - /// - /// Generated extension method for IsOnWeekend - /// - public static DateTimeOffset_IsOnWeekend_Assertion IsOnWeekend(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsOnWeekend()"); - return new DateTimeOffset_IsOnWeekend_Assertion(source.Context); - } - - /// - /// Generated extension method for IsOnWeekday - /// - public static DateTimeOffset_IsOnWeekday_Assertion IsOnWeekday(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsOnWeekday()"); - return new DateTimeOffset_IsOnWeekday_Assertion(source.Context); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/DayOfWeekAssertionGeneratorTests.GeneratesDayOfWeekAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/DayOfWeekAssertionGeneratorTests.GeneratesDayOfWeekAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/DayOfWeekAssertionGeneratorTests.GeneratesDayOfWeekAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/DayOfWeekAssertionGeneratorTests.GeneratesDayOfWeekAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/DayOfWeekAssertionGeneratorTests.GeneratesDayOfWeekAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/DayOfWeekAssertionGeneratorTests.GeneratesDayOfWeekAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 40829131eb6..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/DayOfWeekAssertionGeneratorTests.GeneratesDayOfWeekAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,190 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsWeekend -/// -public sealed class DayOfWeek_IsWeekend_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public DayOfWeek_IsWeekend_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value == global::System.DayOfWeek.Saturday || value == global::System.DayOfWeek.Sunday; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be a weekend day"; - } -} - -/// -/// Generated assertion for IsWeekday -/// -public sealed class DayOfWeek_IsWeekday_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public DayOfWeek_IsWeekday_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value != global::System.DayOfWeek.Saturday && value != global::System.DayOfWeek.Sunday; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be a weekday"; - } -} - -/// -/// Generated assertion for IsMonday -/// -public sealed class DayOfWeek_IsMonday_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public DayOfWeek_IsMonday_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value == global::System.DayOfWeek.Monday; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be Monday"; - } -} - -/// -/// Generated assertion for IsFriday -/// -public sealed class DayOfWeek_IsFriday_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public DayOfWeek_IsFriday_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value == global::System.DayOfWeek.Friday; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be Friday"; - } -} - -public static partial class DayOfWeekAssertionExtensions -{ - /// - /// Generated extension method for IsWeekend - /// - public static DayOfWeek_IsWeekend_Assertion IsWeekend(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsWeekend()"); - return new DayOfWeek_IsWeekend_Assertion(source.Context); - } - - /// - /// Generated extension method for IsWeekday - /// - public static DayOfWeek_IsWeekday_Assertion IsWeekday(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsWeekday()"); - return new DayOfWeek_IsWeekday_Assertion(source.Context); - } - - /// - /// Generated extension method for IsMonday - /// - public static DayOfWeek_IsMonday_Assertion IsMonday(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsMonday()"); - return new DayOfWeek_IsMonday_Assertion(source.Context); - } - - /// - /// Generated extension method for IsFriday - /// - public static DayOfWeek_IsFriday_Assertion IsFriday(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsFriday()"); - return new DayOfWeek_IsFriday_Assertion(source.Context); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/DirectoryInfoAssertionGeneratorTests.GeneratesDirectoryInfoAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/DirectoryInfoAssertionGeneratorTests.GeneratesDirectoryInfoAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/DirectoryInfoAssertionGeneratorTests.GeneratesDirectoryInfoAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/DirectoryInfoAssertionGeneratorTests.GeneratesDirectoryInfoAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/DirectoryInfoAssertionGeneratorTests.GeneratesDirectoryInfoAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/DirectoryInfoAssertionGeneratorTests.GeneratesDirectoryInfoAssertions.DotNet9_0.verified.txt deleted file mode 100644 index d81d25faf67..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/DirectoryInfoAssertionGeneratorTests.GeneratesDirectoryInfoAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,66 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -public class DirectoryInfoExistsAssertion : Assertion -{ - private readonly bool _negated; - - public DirectoryInfoExistsAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.Exists; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy Exists")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}exist"; - } -} - -public static partial class DirectoryInfoAssertionExtensions -{ - public static DirectoryInfoExistsAssertion Exists(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".Exists()"); - return new DirectoryInfoExistsAssertion(source.Context, false); - } - - public static DirectoryInfoExistsAssertion DoesNotExist(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".DoesNotExist()"); - return new DirectoryInfoExistsAssertion(source.Context, true); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/EncodingAssertionGeneratorTests.GeneratesEncodingAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/EncodingAssertionGeneratorTests.GeneratesEncodingAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/EncodingAssertionGeneratorTests.GeneratesEncodingAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/EncodingAssertionGeneratorTests.GeneratesEncodingAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/EncodingAssertionGeneratorTests.GeneratesEncodingAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/EncodingAssertionGeneratorTests.GeneratesEncodingAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 576e8eefe7f..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/EncodingAssertionGeneratorTests.GeneratesEncodingAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,66 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -public class EncodingIsSingleByteAssertion : Assertion -{ - private readonly bool _negated; - - public EncodingIsSingleByteAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsSingleByte; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsSingleByte")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be single-byte encoding"; - } -} - -public static partial class EncodingAssertionExtensions -{ - public static EncodingIsSingleByteAssertion IsSingleByte(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsSingleByte()"); - return new EncodingIsSingleByteAssertion(source.Context, false); - } - - public static EncodingIsSingleByteAssertion IsNotSingleByte(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotSingleByte()"); - return new EncodingIsSingleByteAssertion(source.Context, true); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/ExceptionAssertionGeneratorTests.GeneratesExceptionAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/ExceptionAssertionGeneratorTests.GeneratesExceptionAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/ExceptionAssertionGeneratorTests.GeneratesExceptionAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/ExceptionAssertionGeneratorTests.GeneratesExceptionAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/ExceptionAssertionGeneratorTests.GeneratesExceptionAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/ExceptionAssertionGeneratorTests.GeneratesExceptionAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 7a01239fe54..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/ExceptionAssertionGeneratorTests.GeneratesExceptionAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,522 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for HasInnerException -/// -public sealed class Exception_HasInnerException_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Exception_HasInnerException_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.InnerException != null; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have an inner exception"; - } -} - -/// -/// Generated assertion for HasNoInnerException -/// -public sealed class Exception_HasNoInnerException_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Exception_HasNoInnerException_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.InnerException == null; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have no inner exception"; - } -} - -/// -/// Generated assertion for HasStackTrace -/// -public sealed class Exception_HasStackTrace_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Exception_HasStackTrace_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = !string.IsNullOrWhiteSpace(value!.StackTrace); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have a stack trace"; - } -} - -/// -/// Generated assertion for HasNoData -/// -public sealed class Exception_HasNoData_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Exception_HasNoData_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.Data.Count == 0; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have no data"; - } -} - -/// -/// Generated assertion for HasHelpLink -/// -public sealed class Exception_HasHelpLink_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Exception_HasHelpLink_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = !string.IsNullOrWhiteSpace(value!.HelpLink); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have a help link"; - } -} - -/// -/// Generated assertion for HasNoHelpLink -/// -public sealed class Exception_HasNoHelpLink_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Exception_HasNoHelpLink_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = string.IsNullOrWhiteSpace(value!.HelpLink); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have no help link"; - } -} - -/// -/// Generated assertion for HasSource -/// -public sealed class Exception_HasSource_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Exception_HasSource_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = !string.IsNullOrWhiteSpace(value!.Source); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have a source"; - } -} - -/// -/// Generated assertion for HasNoSource -/// -public sealed class Exception_HasNoSource_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Exception_HasNoSource_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = string.IsNullOrWhiteSpace(value!.Source); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have no source"; - } -} - -/// -/// Generated assertion for HasTargetSite -/// -public sealed class Exception_HasTargetSite_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Exception_HasTargetSite_Assertion(AssertionContext context) - : base(context) - { - } - - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Caller is already warned via RequiresUnreferencedCode on extension method")] - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.TargetSite != null; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have a target site"; - } -} - -/// -/// Generated assertion for HasNoTargetSite -/// -public sealed class Exception_HasNoTargetSite_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Exception_HasNoTargetSite_Assertion(AssertionContext context) - : base(context) - { - } - - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Caller is already warned via RequiresUnreferencedCode on extension method")] - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.TargetSite == null; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have no target site"; - } -} - -public static partial class ExceptionAssertionExtensions -{ - /// - /// Generated extension method for HasInnerException - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static Exception_HasInnerException_Assertion HasInnerException(this IAssertionSource source) - where TActual : System.Exception - { - source.Context.ExpressionBuilder.Append(".HasInnerException()"); - return new Exception_HasInnerException_Assertion(source.Context.Map(static x => (System.Exception?)x)); - } - - /// - /// Generated extension method for HasNoInnerException - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static Exception_HasNoInnerException_Assertion HasNoInnerException(this IAssertionSource source) - where TActual : System.Exception - { - source.Context.ExpressionBuilder.Append(".HasNoInnerException()"); - return new Exception_HasNoInnerException_Assertion(source.Context.Map(static x => (System.Exception?)x)); - } - - /// - /// Generated extension method for HasStackTrace - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static Exception_HasStackTrace_Assertion HasStackTrace(this IAssertionSource source) - where TActual : System.Exception - { - source.Context.ExpressionBuilder.Append(".HasStackTrace()"); - return new Exception_HasStackTrace_Assertion(source.Context.Map(static x => (System.Exception?)x)); - } - - /// - /// Generated extension method for HasNoData - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static Exception_HasNoData_Assertion HasNoData(this IAssertionSource source) - where TActual : System.Exception - { - source.Context.ExpressionBuilder.Append(".HasNoData()"); - return new Exception_HasNoData_Assertion(source.Context.Map(static x => (System.Exception?)x)); - } - - /// - /// Generated extension method for HasHelpLink - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static Exception_HasHelpLink_Assertion HasHelpLink(this IAssertionSource source) - where TActual : System.Exception - { - source.Context.ExpressionBuilder.Append(".HasHelpLink()"); - return new Exception_HasHelpLink_Assertion(source.Context.Map(static x => (System.Exception?)x)); - } - - /// - /// Generated extension method for HasNoHelpLink - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static Exception_HasNoHelpLink_Assertion HasNoHelpLink(this IAssertionSource source) - where TActual : System.Exception - { - source.Context.ExpressionBuilder.Append(".HasNoHelpLink()"); - return new Exception_HasNoHelpLink_Assertion(source.Context.Map(static x => (System.Exception?)x)); - } - - /// - /// Generated extension method for HasSource - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static Exception_HasSource_Assertion HasSource(this IAssertionSource source) - where TActual : System.Exception - { - source.Context.ExpressionBuilder.Append(".HasSource()"); - return new Exception_HasSource_Assertion(source.Context.Map(static x => (System.Exception?)x)); - } - - /// - /// Generated extension method for HasNoSource - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static Exception_HasNoSource_Assertion HasNoSource(this IAssertionSource source) - where TActual : System.Exception - { - source.Context.ExpressionBuilder.Append(".HasNoSource()"); - return new Exception_HasNoSource_Assertion(source.Context.Map(static x => (System.Exception?)x)); - } - - /// - /// Generated extension method for HasTargetSite - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Exception.TargetSite uses reflection which may be trimmed in AOT scenarios")] - public static Exception_HasTargetSite_Assertion HasTargetSite(this IAssertionSource source) - where TActual : System.Exception - { - source.Context.ExpressionBuilder.Append(".HasTargetSite()"); - return new Exception_HasTargetSite_Assertion(source.Context.Map(static x => (System.Exception?)x)); - } - - /// - /// Generated extension method for HasNoTargetSite - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Exception.TargetSite uses reflection which may be trimmed in AOT scenarios")] - public static Exception_HasNoTargetSite_Assertion HasNoTargetSite(this IAssertionSource source) - where TActual : System.Exception - { - source.Context.ExpressionBuilder.Append(".HasNoTargetSite()"); - return new Exception_HasNoTargetSite_Assertion(source.Context.Map(static x => (System.Exception?)x)); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/FileInfoAssertionGeneratorTests.GeneratesFileInfoAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/FileInfoAssertionGeneratorTests.GeneratesFileInfoAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/FileInfoAssertionGeneratorTests.GeneratesFileInfoAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/FileInfoAssertionGeneratorTests.GeneratesFileInfoAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/FileInfoAssertionGeneratorTests.GeneratesFileInfoAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/FileInfoAssertionGeneratorTests.GeneratesFileInfoAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 7648459f207..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/FileInfoAssertionGeneratorTests.GeneratesFileInfoAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,114 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -public class FileInfoExistsAssertion : Assertion -{ - private readonly bool _negated; - - public FileInfoExistsAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.Exists; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy Exists")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}exist"; - } -} - -public class FileInfoIsReadOnlyAssertion : Assertion -{ - private readonly bool _negated; - - public FileInfoIsReadOnlyAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsReadOnly; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsReadOnly")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be read-only"; - } -} - -public static partial class FileInfoAssertionExtensions -{ - public static FileInfoExistsAssertion Exists(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".Exists()"); - return new FileInfoExistsAssertion(source.Context, false); - } - - public static FileInfoExistsAssertion DoesNotExist(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".DoesNotExist()"); - return new FileInfoExistsAssertion(source.Context, true); - } - - public static FileInfoIsReadOnlyAssertion IsReadOnly(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsReadOnly()"); - return new FileInfoIsReadOnlyAssertion(source.Context, false); - } - - public static FileInfoIsReadOnlyAssertion IsNotReadOnly(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotReadOnly()"); - return new FileInfoIsReadOnlyAssertion(source.Context, true); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceAssertionExtensionTests.AssertionExtension_InGlobalNamespace_Compiles.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceAssertionExtensionTests.AssertionExtension_InGlobalNamespace_Compiles.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceAssertionExtensionTests.AssertionExtension_InGlobalNamespace_Compiles.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceAssertionExtensionTests.AssertionExtension_InGlobalNamespace_Compiles.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceAssertionExtensionTests.AssertionExtension_InGlobalNamespace_Compiles.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceAssertionExtensionTests.AssertionExtension_InGlobalNamespace_Compiles.DotNet9_0.verified.txt deleted file mode 100644 index 27cb29ae523..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceAssertionExtensionTests.AssertionExtension_InGlobalNamespace_Compiles.DotNet9_0.verified.txt +++ /dev/null @@ -1,29 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using TUnit.Assertions.Core; -using TUnit.Assertions.Enums; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated extension methods for GlobalStringIsEmptyAssertion. -/// -public static partial class GlobalStringIsEmptyAssertionExtensions -{ - - /// - /// Extension method for GlobalStringIsEmptyAssertion. - /// - public static GlobalStringIsEmptyAssertion IsEmptyGlobal(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsEmptyGlobal("); source.Context.ExpressionBuilder.Append(")"); - return new GlobalStringIsEmptyAssertion(source.Context); - } -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceAssertionFromTests.AssertionFrom_InGlobalNamespace_Compiles.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceAssertionFromTests.AssertionFrom_InGlobalNamespace_Compiles.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceAssertionFromTests.AssertionFrom_InGlobalNamespace_Compiles.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceAssertionFromTests.AssertionFrom_InGlobalNamespace_Compiles.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceAssertionFromTests.AssertionFrom_InGlobalNamespace_Compiles.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceAssertionFromTests.AssertionFrom_InGlobalNamespace_Compiles.DotNet9_0.verified.txt deleted file mode 100644 index bad743950c3..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceAssertionFromTests.AssertionFrom_InGlobalNamespace_Compiles.DotNet9_0.verified.txt +++ /dev/null @@ -1,54 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; - -namespace TUnit.Assertions.Extensions; - -public class StringIsNullOrEmptyWithStringAssertion : Assertion -{ - private readonly bool _negated; - - public StringIsNullOrEmptyWithStringAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = string.IsNullOrEmpty(actualValue); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsNullOrEmpty")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be null or empty"; - } -} - -public static partial class GlobalStringAssertions -{ - public static StringIsNullOrEmptyWithStringAssertion IsBlankGlobal(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsBlankGlobal()"); - return new StringIsNullOrEmptyWithStringAssertion(source.Context, false); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceCollectionShapeAssertionTests.CollectionShapeWrapper_InGlobalNamespace_EmitsValidTypeName.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceCollectionShapeAssertionTests.CollectionShapeWrapper_InGlobalNamespace_EmitsValidTypeName.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceCollectionShapeAssertionTests.CollectionShapeWrapper_InGlobalNamespace_EmitsValidTypeName.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceCollectionShapeAssertionTests.CollectionShapeWrapper_InGlobalNamespace_EmitsValidTypeName.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceCollectionShapeAssertionTests.CollectionShapeWrapper_InGlobalNamespace_EmitsValidTypeName.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceCollectionShapeAssertionTests.CollectionShapeWrapper_InGlobalNamespace_EmitsValidTypeName.DotNet9_0.verified.txt deleted file mode 100644 index f894c5a1ca8..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceCollectionShapeAssertionTests.CollectionShapeWrapper_InGlobalNamespace_EmitsValidTypeName.DotNet9_0.verified.txt +++ /dev/null @@ -1,765 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -namespace TUnit.Assertions.Extensions; - -public static partial class GlobalNamespaceCollectionShapeAssertionSourceCollectionShapeAssertions -{ - - // global::GlobalNamespaceCollectionShapeAssertionSource> - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).Contains(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).Count(); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).IsOrderedBy(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).IsOrderedBy(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).IsOrderedByDescending(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).IsOrderedByDescending(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsEmptyAssertion, TItem> IsEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Conditions.CollectionIsNotEmptyAssertion, TItem> IsNotEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.HasSingleItemAssertion, TItem> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Conditions.HasSingleItemPredicateAssertion, TItem> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtLeastAssertion, TItem> HasAtLeast(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtMostAssertion, TItem> HasAtMost(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasCountBetweenAssertion, TItem> HasCountBetween(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, TItem> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, TItem> Any(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> ContainsOnly(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, TItem> IsInOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, TItem> IsInDescendingOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.CollectionAssertion(source.Context).IsInDescendingOrder(); - - // global::GlobalNamespaceCollectionShapeAssertionSource> - public static global::TUnit.Assertions.Conditions.ReadOnlyListHasItemAtAssertion, TItem> HasItemAt(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int index, TItem expected, global::System.Collections.Generic.IEqualityComparer? comparer = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("index")] string? indexExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).HasItemAt(index, expected, comparer, indexExpression, expectedExpression); - public static global::TUnit.Assertions.Conditions.ReadOnlyListItemAtSource, TItem> ItemAt(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int index, [global::System.Runtime.CompilerServices.CallerArgumentExpression("index")] string? indexExpression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).ItemAt(index, indexExpression); - public static global::TUnit.Assertions.Conditions.ReadOnlyListItemAtSource, TItem> FirstItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).FirstItem(); - public static global::TUnit.Assertions.Conditions.ReadOnlyListLastItemSource, TItem> LastItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).LastItem(); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).Contains(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).Count(); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).IsOrderedBy(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).IsOrderedBy(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).IsOrderedByDescending(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).IsOrderedByDescending(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsEmptyAssertion, TItem> IsEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Conditions.CollectionIsNotEmptyAssertion, TItem> IsNotEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.HasSingleItemAssertion, TItem> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Conditions.HasSingleItemPredicateAssertion, TItem> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtLeastAssertion, TItem> HasAtLeast(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtMostAssertion, TItem> HasAtMost(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasCountBetweenAssertion, TItem> HasCountBetween(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, TItem> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, TItem> Any(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> ContainsOnly(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, TItem> IsInOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, TItem> IsInDescendingOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ReadOnlyListAssertion(source.Context).IsInDescendingOrder(); - - // global::GlobalNamespaceCollectionShapeAssertionSource> - public static global::TUnit.Assertions.Conditions.ListHasItemAtAssertion, TItem> HasItemAt(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int index, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("index")] string? indexExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).HasItemAt(index, expected, indexExpression, expectedExpression); - public static global::TUnit.Assertions.Conditions.ListItemAtSource, TItem> ItemAt(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int index, [global::System.Runtime.CompilerServices.CallerArgumentExpression("index")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).ItemAt(index, expression); - public static global::TUnit.Assertions.Conditions.ListItemAtSource, TItem> FirstItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).FirstItem(); - public static global::TUnit.Assertions.Conditions.ListLastItemSource, TItem> LastItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).LastItem(); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).Contains(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).Count(); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).IsOrderedBy(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).IsOrderedBy(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).IsOrderedByDescending(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).IsOrderedByDescending(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsEmptyAssertion, TItem> IsEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Conditions.CollectionIsNotEmptyAssertion, TItem> IsNotEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.HasSingleItemAssertion, TItem> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Conditions.HasSingleItemPredicateAssertion, TItem> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtLeastAssertion, TItem> HasAtLeast(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtMostAssertion, TItem> HasAtMost(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasCountBetweenAssertion, TItem> HasCountBetween(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, TItem> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, TItem> Any(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> ContainsOnly(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, TItem> IsInOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, TItem> IsInDescendingOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context).IsInDescendingOrder(); - - // global::GlobalNamespaceCollectionShapeAssertionSource> - public static global::TUnit.Assertions.Conditions.ListHasItemAtAssertion, TItem> HasItemAt(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int index, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("index")] string? indexExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).HasItemAt(index, expected, indexExpression, expectedExpression); - public static global::TUnit.Assertions.Conditions.ListItemAtSource, TItem> ItemAt(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int index, [global::System.Runtime.CompilerServices.CallerArgumentExpression("index")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).ItemAt(index, expression); - public static global::TUnit.Assertions.Conditions.ListItemAtSource, TItem> FirstItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).FirstItem(); - public static global::TUnit.Assertions.Conditions.ListLastItemSource, TItem> LastItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).LastItem(); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).Contains(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).Count(); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).IsOrderedBy(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).IsOrderedBy(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).IsOrderedByDescending(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).IsOrderedByDescending(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsEmptyAssertion, TItem> IsEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).IsEmpty(); - public static global::TUnit.Assertions.Conditions.CollectionIsNotEmptyAssertion, TItem> IsNotEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.HasSingleItemAssertion, TItem> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).HasSingleItem(); - public static global::TUnit.Assertions.Conditions.HasSingleItemPredicateAssertion, TItem> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtLeastAssertion, TItem> HasAtLeast(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtMostAssertion, TItem> HasAtMost(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasCountBetweenAssertion, TItem> HasCountBetween(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, TItem> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, TItem> Any(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> ContainsOnly(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, TItem> IsInOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, TItem> IsInDescendingOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => new global::TUnit.Assertions.Sources.ListAssertion(source.Context.MapPreservingPreWork>(x => x)).IsInDescendingOrder(); - - // global::GlobalNamespaceCollectionShapeAssertionSource - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion Contains(this global::GlobalNamespaceCollectionShapeAssertionSource source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion Contains(this global::GlobalNamespaceCollectionShapeAssertionSource source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion Contains(this global::GlobalNamespaceCollectionShapeAssertionSource source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).Contains(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource Count(this global::GlobalNamespaceCollectionShapeAssertionSource source) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).Count(); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion Count(this global::GlobalNamespaceCollectionShapeAssertionSource source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource Count(this global::GlobalNamespaceCollectionShapeAssertionSource source, global::System.Func, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion IsOrderedBy(this global::GlobalNamespaceCollectionShapeAssertionSource source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).IsOrderedBy(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion IsOrderedBy(this global::GlobalNamespaceCollectionShapeAssertionSource source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).IsOrderedBy(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion IsOrderedByDescending(this global::GlobalNamespaceCollectionShapeAssertionSource source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).IsOrderedByDescending(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion IsOrderedByDescending(this global::GlobalNamespaceCollectionShapeAssertionSource source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).IsOrderedByDescending(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsEmptyAssertion IsEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource source) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Conditions.CollectionIsNotEmptyAssertion IsNotEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource source) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.HasSingleItemAssertion HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource source) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Conditions.HasSingleItemPredicateAssertion HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtLeastAssertion HasAtLeast(this global::GlobalNamespaceCollectionShapeAssertionSource source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtMostAssertion HasAtMost(this global::GlobalNamespaceCollectionShapeAssertionSource source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasCountBetweenAssertion HasCountBetween(this global::GlobalNamespaceCollectionShapeAssertionSource source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource source) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource source, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion All(this global::GlobalNamespaceCollectionShapeAssertionSource source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper All(this global::GlobalNamespaceCollectionShapeAssertionSource source) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion Any(this global::GlobalNamespaceCollectionShapeAssertionSource source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion ContainsOnly(this global::GlobalNamespaceCollectionShapeAssertionSource source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion IsInOrder(this global::GlobalNamespaceCollectionShapeAssertionSource source) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion IsInDescendingOrder(this global::GlobalNamespaceCollectionShapeAssertionSource source) - => new global::TUnit.Assertions.Sources.ArrayAssertion(source.Context).IsInDescendingOrder(); - - // global::GlobalNamespaceCollectionShapeAssertionSource> - public static global::TUnit.Assertions.Conditions.SetIsSubsetOfAssertion, TItem> IsSubsetOf(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsSubsetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsSupersetOfAssertion, TItem> IsSupersetOf(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsSupersetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsProperSubsetOfAssertion, TItem> IsProperSubsetOf(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsProperSubsetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsProperSupersetOfAssertion, TItem> IsProperSupersetOf(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsProperSupersetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetOverlapsAssertion, TItem> Overlaps(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).Overlaps(other, expression); - public static global::TUnit.Assertions.Conditions.SetDoesNotOverlapAssertion, TItem> DoesNotOverlap(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).DoesNotOverlap(other, expression); - public static global::TUnit.Assertions.Conditions.SetEqualsAssertion, TItem> SetEquals(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).SetEquals(other, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).Contains(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).Count(); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsOrderedBy(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsOrderedBy(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsOrderedByDescending(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsOrderedByDescending(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsEmptyAssertion, TItem> IsEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Conditions.CollectionIsNotEmptyAssertion, TItem> IsNotEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.HasSingleItemAssertion, TItem> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Conditions.HasSingleItemPredicateAssertion, TItem> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtLeastAssertion, TItem> HasAtLeast(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtMostAssertion, TItem> HasAtMost(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasCountBetweenAssertion, TItem> HasCountBetween(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, TItem> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, TItem> Any(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> ContainsOnly(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, TItem> IsInOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, TItem> IsInDescendingOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.SetAssertion.FromContext(source.Context).IsInDescendingOrder(); - - // global::GlobalNamespaceCollectionShapeAssertionSource> - public static global::TUnit.Assertions.Conditions.SetIsSubsetOfAssertion, TItem> IsSubsetOf(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsSubsetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsSupersetOfAssertion, TItem> IsSupersetOf(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsSupersetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsProperSubsetOfAssertion, TItem> IsProperSubsetOf(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsProperSubsetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsProperSupersetOfAssertion, TItem> IsProperSupersetOf(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsProperSupersetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetOverlapsAssertion, TItem> Overlaps(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).Overlaps(other, expression); - public static global::TUnit.Assertions.Conditions.SetDoesNotOverlapAssertion, TItem> DoesNotOverlap(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).DoesNotOverlap(other, expression); - public static global::TUnit.Assertions.Conditions.SetEqualsAssertion, TItem> SetEquals(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).SetEquals(other, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).Contains(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).Count(); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsOrderedBy(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsOrderedBy(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsOrderedByDescending(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsOrderedByDescending(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsEmptyAssertion, TItem> IsEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Conditions.CollectionIsNotEmptyAssertion, TItem> IsNotEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.HasSingleItemAssertion, TItem> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Conditions.HasSingleItemPredicateAssertion, TItem> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtLeastAssertion, TItem> HasAtLeast(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtMostAssertion, TItem> HasAtMost(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasCountBetweenAssertion, TItem> HasCountBetween(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, TItem> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, TItem> Any(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> ContainsOnly(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, TItem> IsInOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, TItem> IsInDescendingOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.HashSetAssertion.FromContext(source.Context).IsInDescendingOrder(); - -#if NET5_0_OR_GREATER - // global::GlobalNamespaceCollectionShapeAssertionSource> - public static global::TUnit.Assertions.Conditions.SetIsSubsetOfAssertion, TItem> IsSubsetOf(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsSubsetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsSupersetOfAssertion, TItem> IsSupersetOf(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsSupersetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsProperSubsetOfAssertion, TItem> IsProperSubsetOf(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsProperSubsetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetIsProperSupersetOfAssertion, TItem> IsProperSupersetOf(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsProperSupersetOf(other, expression); - public static global::TUnit.Assertions.Conditions.SetOverlapsAssertion, TItem> Overlaps(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).Overlaps(other, expression); - public static global::TUnit.Assertions.Conditions.SetDoesNotOverlapAssertion, TItem> DoesNotOverlap(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).DoesNotOverlap(other, expression); - public static global::TUnit.Assertions.Conditions.SetEqualsAssertion, TItem> SetEquals(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEnumerable other, [global::System.Runtime.CompilerServices.CallerArgumentExpression("other")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).SetEquals(other, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, TItem> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).Contains(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).Count(); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, TItem> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsOrderedBy(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByAssertion, TItem, TKey> IsOrderedBy(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsOrderedBy(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsOrderedByDescending(keySelector, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsOrderedByDescendingAssertion, TItem, TKey> IsOrderedByDescending(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func keySelector, global::System.Collections.Generic.IComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("keySelector")] string? selectorExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsOrderedByDescending(keySelector, comparer, selectorExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionIsEmptyAssertion, TItem> IsEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Conditions.CollectionIsNotEmptyAssertion, TItem> IsNotEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.HasSingleItemAssertion, TItem> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Conditions.HasSingleItemPredicateAssertion, TItem> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtLeastAssertion, TItem> HasAtLeast(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasAtMostAssertion, TItem> HasAtMost(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Conditions.CollectionHasCountBetweenAssertion, TItem> HasCountBetween(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, TItem> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TItem expected, global::System.Collections.Generic.IEqualityComparer comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, TItem> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, TItem> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, TItem> Any(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, TItem> ContainsOnly(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, TItem> IsInOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, TItem> IsInDescendingOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) - => global::TUnit.Assertions.Sources.ReadOnlySetAssertion.FromContext(source.Context).IsInDescendingOrder(); -#endif - - // global::GlobalNamespaceCollectionShapeAssertionSource> - public static global::TUnit.Assertions.Sources.DictionaryAssertionBase, TKey, TValue> IsEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Sources.DictionaryAssertionBase, TKey, TValue> IsNotEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.DictionaryCountSource, TKey, TValue> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).Count(); - public static global::TUnit.Assertions.Sources.DictionaryAssertionBase, TKey, TValue> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Sources.DictionaryAssertionBase, TKey, TValue> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Sources.DictionaryAssertionBase, TKey, TValue> HasAtLeast(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Sources.DictionaryAssertionBase, TKey, TValue> HasAtMost(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Sources.DictionaryAssertionBase, TKey, TValue> HasCountBetween(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.DictionaryContainsKeyAssertion, TKey, TValue> ContainsKey(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TKey expectedKey, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).ContainsKey(expectedKey, expression); - public static global::TUnit.Assertions.Conditions.DictionaryContainsKeyAssertion, TKey, TValue> ContainsKey(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TKey expectedKey, global::System.Collections.Generic.IEqualityComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? keyExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).ContainsKey(expectedKey, comparer, keyExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.DictionaryDoesNotContainKeyAssertion, TKey, TValue> DoesNotContainKey(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TKey expectedKey, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).DoesNotContainKey(expectedKey, expression); - public static global::TUnit.Assertions.Conditions.DictionaryContainsValueAssertion, TKey, TValue> ContainsValue(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).ContainsValue(expectedValue, expression); - public static global::TUnit.Assertions.Conditions.DictionaryDoesNotContainValueAssertion, TKey, TValue> DoesNotContainValue(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).DoesNotContainValue(expectedValue, expression); - public static global::TUnit.Assertions.Conditions.DictionaryContainsKeyWithValueAssertion, TKey, TValue> ContainsKeyWithValue(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TKey expectedKey, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? keyExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? valueExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).ContainsKeyWithValue(expectedKey, expectedValue, keyExpression, valueExpression); - public static global::TUnit.Assertions.Conditions.DictionaryAllKeysAssertion, TKey, TValue> AllKeys(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).AllKeys(predicate, expression); - public static global::TUnit.Assertions.Conditions.DictionaryAllValuesAssertion, TKey, TValue> AllValues(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).AllValues(predicate, expression); - public static global::TUnit.Assertions.Conditions.DictionaryAnyKeyAssertion, TKey, TValue> AnyKey(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).AnyKey(predicate, expression); - public static global::TUnit.Assertions.Conditions.DictionaryAnyValueAssertion, TKey, TValue> AnyValue(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).AnyValue(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).Contains(predicate, expression); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, global::System.Collections.Generic.KeyValuePair> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, global::System.Collections.Generic.KeyValuePair> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func>, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, global::System.Collections.Generic.KeyValuePair> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, global::System.Collections.Generic.KeyValuePair> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, global::System.Collections.Generic.KeyValuePair> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, global::System.Collections.Generic.KeyValuePair> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, global::System.Collections.Generic.KeyValuePair> Any(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, global::System.Collections.Generic.KeyValuePair> ContainsOnly(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, global::System.Collections.Generic.KeyValuePair> IsInOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, global::System.Collections.Generic.KeyValuePair> IsInDescendingOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.DictionaryAssertion(source.Context).IsInDescendingOrder(); - - // global::GlobalNamespaceCollectionShapeAssertionSource> - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> IsEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).IsEmpty(); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> IsNotEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.MutableDictionaryCountSource, TKey, TValue> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).Count(); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).HasSingleItem(); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasAtLeast(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasAtMost(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasCountBetween(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryContainsKeyAssertion, TKey, TValue> ContainsKey(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TKey expectedKey, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).ContainsKey(expectedKey, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryContainsKeyAssertion, TKey, TValue> ContainsKey(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TKey expectedKey, global::System.Collections.Generic.IEqualityComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? keyExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).ContainsKey(expectedKey, comparer, keyExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryDoesNotContainKeyAssertion, TKey, TValue> DoesNotContainKey(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TKey expectedKey, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).DoesNotContainKey(expectedKey, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryContainsValueAssertion, TKey, TValue> ContainsValue(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).ContainsValue(expectedValue, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryDoesNotContainValueAssertion, TKey, TValue> DoesNotContainValue(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).DoesNotContainValue(expectedValue, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryContainsKeyWithValueAssertion, TKey, TValue> ContainsKeyWithValue(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TKey expectedKey, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? keyExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? valueExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).ContainsKeyWithValue(expectedKey, expectedValue, keyExpression, valueExpression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryAllKeysAssertion, TKey, TValue> AllKeys(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).AllKeys(predicate, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryAllValuesAssertion, TKey, TValue> AllValues(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).AllValues(predicate, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryAnyKeyAssertion, TKey, TValue> AnyKey(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).AnyKey(predicate, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryAnyValueAssertion, TKey, TValue> AnyValue(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).AnyValue(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).Contains(predicate, expression); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, global::System.Collections.Generic.KeyValuePair> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, global::System.Collections.Generic.KeyValuePair> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func>, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, global::System.Collections.Generic.KeyValuePair> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, global::System.Collections.Generic.KeyValuePair> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, global::System.Collections.Generic.KeyValuePair> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, global::System.Collections.Generic.KeyValuePair> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, global::System.Collections.Generic.KeyValuePair> Any(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, global::System.Collections.Generic.KeyValuePair> ContainsOnly(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, global::System.Collections.Generic.KeyValuePair> IsInOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, global::System.Collections.Generic.KeyValuePair> IsInDescendingOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context).IsInDescendingOrder(); - - // global::GlobalNamespaceCollectionShapeAssertionSource> - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> IsEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).IsEmpty(); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> IsNotEmpty(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).IsNotEmpty(); - public static global::TUnit.Assertions.Conditions.MutableDictionaryCountSource, TKey, TValue> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).Count(); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).HasSingleItem(); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasSingleItem(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).HasSingleItem(predicate, expression); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasAtLeast(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int minCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("minCount")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).HasAtLeast(minCount, expression); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasAtMost(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int maxCount, [global::System.Runtime.CompilerServices.CallerArgumentExpression("maxCount")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).HasAtMost(maxCount, expression); - public static global::TUnit.Assertions.Sources.MutableDictionaryAssertionBase, TKey, TValue> HasCountBetween(this global::GlobalNamespaceCollectionShapeAssertionSource> source, int min, int max, [global::System.Runtime.CompilerServices.CallerArgumentExpression("min")] string? minExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("max")] string? maxExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).HasCountBetween(min, max, minExpression, maxExpression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryContainsKeyAssertion, TKey, TValue> ContainsKey(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TKey expectedKey, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).ContainsKey(expectedKey, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryContainsKeyAssertion, TKey, TValue> ContainsKey(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TKey expectedKey, global::System.Collections.Generic.IEqualityComparer? comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? keyExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).ContainsKey(expectedKey, comparer, keyExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryDoesNotContainKeyAssertion, TKey, TValue> DoesNotContainKey(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TKey expectedKey, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).DoesNotContainKey(expectedKey, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryContainsValueAssertion, TKey, TValue> ContainsValue(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).ContainsValue(expectedValue, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryDoesNotContainValueAssertion, TKey, TValue> DoesNotContainValue(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).DoesNotContainValue(expectedValue, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryContainsKeyWithValueAssertion, TKey, TValue> ContainsKeyWithValue(this global::GlobalNamespaceCollectionShapeAssertionSource> source, TKey expectedKey, TValue expectedValue, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedKey")] string? keyExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expectedValue")] string? valueExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).ContainsKeyWithValue(expectedKey, expectedValue, keyExpression, valueExpression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryAllKeysAssertion, TKey, TValue> AllKeys(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).AllKeys(predicate, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryAllValuesAssertion, TKey, TValue> AllValues(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).AllValues(predicate, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryAnyKeyAssertion, TKey, TValue> AnyKey(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).AnyKey(predicate, expression); - public static global::TUnit.Assertions.Conditions.MutableDictionaryAnyValueAssertion, TKey, TValue> AnyValue(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).AnyValue(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).Contains(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionContainsAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).Contains(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionContainsPredicateAssertion, global::System.Collections.Generic.KeyValuePair> Contains(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).Contains(predicate, expression); - [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Assertions.Conditions.CollectionCountWithInlineAssertionAssertion, global::System.Collections.Generic.KeyValuePair> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, global::TUnit.Assertions.Core.Assertion?> countAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("countAssertion")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).Count(countAssertion, expression); - public static global::TUnit.Assertions.Conditions.CollectionCountSource, global::System.Collections.Generic.KeyValuePair> Count(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func>, global::TUnit.Assertions.Core.IAssertion?> itemAssertion, [global::System.Runtime.CompilerServices.CallerArgumentExpression("itemAssertion")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).Count(itemAssertion, expression); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, global::System.Collections.Generic.KeyValuePair> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).HasDistinctItems(); - public static global::TUnit.Assertions.Conditions.HasDistinctItemsAssertion, global::System.Collections.Generic.KeyValuePair> HasDistinctItems(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).HasDistinctItems(comparer, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).DoesNotContain(expected, expression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Collections.Generic.KeyValuePair expected, global::System.Collections.Generic.IEqualityComparer> comparer, [global::System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string? expectedExpression = null, [global::System.Runtime.CompilerServices.CallerArgumentExpression("comparer")] string? comparerExpression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).DoesNotContain(expected, comparer, expectedExpression, comparerExpression); - public static global::TUnit.Assertions.Conditions.CollectionDoesNotContainPredicateAssertion, global::System.Collections.Generic.KeyValuePair> DoesNotContain(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).DoesNotContain(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, global::System.Collections.Generic.KeyValuePair> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).All(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllSatisfyHelper, global::System.Collections.Generic.KeyValuePair> All(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).All(); - public static global::TUnit.Assertions.Conditions.CollectionAnyAssertion, global::System.Collections.Generic.KeyValuePair> Any(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).Any(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionAllAssertion, global::System.Collections.Generic.KeyValuePair> ContainsOnly(this global::GlobalNamespaceCollectionShapeAssertionSource> source, global::System.Func, bool> predicate, [global::System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string? expression = null) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).ContainsOnly(predicate, expression); - public static global::TUnit.Assertions.Conditions.CollectionIsInOrderAssertion, global::System.Collections.Generic.KeyValuePair> IsInOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).IsInOrder(); - public static global::TUnit.Assertions.Conditions.CollectionIsInDescendingOrderAssertion, global::System.Collections.Generic.KeyValuePair> IsInDescendingOrder(this global::GlobalNamespaceCollectionShapeAssertionSource> source) where TKey : notnull - => new global::TUnit.Assertions.Sources.MutableDictionaryAssertion(source.Context.MapPreservingPreWork>(x => x)).IsInDescendingOrder(); -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceGenerateAssertionTests.GenerateAssertion_InGlobalNamespace_Compiles.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceGenerateAssertionTests.GenerateAssertion_InGlobalNamespace_Compiles.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceGenerateAssertionTests.GenerateAssertion_InGlobalNamespace_Compiles.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceGenerateAssertionTests.GenerateAssertion_InGlobalNamespace_Compiles.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceGenerateAssertionTests.GenerateAssertion_InGlobalNamespace_Compiles.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceGenerateAssertionTests.GenerateAssertion_InGlobalNamespace_Compiles.DotNet9_0.verified.txt deleted file mode 100644 index 3f131a83385..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/GlobalNamespaceGenerateAssertionTests.GenerateAssertion_InGlobalNamespace_Compiles.DotNet9_0.verified.txt +++ /dev/null @@ -1,60 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsPositiveGlobal -/// -public sealed class Int_IsPositiveGlobal_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Int_IsPositiveGlobal_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsPositiveGlobal(); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be positive"; - } -} - -public static partial class GlobalGenerateAssertions -{ - /// - /// Generated extension method for IsPositiveGlobal - /// - public static Int_IsPositiveGlobal_Assertion IsPositiveGlobal(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsPositiveGlobal()"); - return new Int_IsPositiveGlobal_Assertion(source.Context); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/GuidAssertionGeneratorTests.GeneratesGuidAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/GuidAssertionGeneratorTests.GeneratesGuidAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/GuidAssertionGeneratorTests.GeneratesGuidAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/GuidAssertionGeneratorTests.GeneratesGuidAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/GuidAssertionGeneratorTests.GeneratesGuidAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/GuidAssertionGeneratorTests.GeneratesGuidAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 49be915aaa5..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/GuidAssertionGeneratorTests.GeneratesGuidAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,104 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsEmptyGuid -/// -public sealed class Guid_IsEmptyGuid_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Guid_IsEmptyGuid_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value == global::System.Guid.Empty; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be an empty GUID"; - } -} - -/// -/// Generated assertion for IsNotEmptyGuid -/// -public sealed class Guid_IsNotEmptyGuid_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Guid_IsNotEmptyGuid_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value != global::System.Guid.Empty; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to not be an empty GUID"; - } -} - -public static partial class GuidAssertionExtensions -{ - /// - /// Generated extension method for IsEmptyGuid - /// - public static Guid_IsEmptyGuid_Assertion IsEmptyGuid(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsEmptyGuid()"); - return new Guid_IsEmptyGuid_Assertion(source.Context); - } - - /// - /// Generated extension method for IsNotEmptyGuid - /// - public static Guid_IsNotEmptyGuid_Assertion IsNotEmptyGuid(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotEmptyGuid()"); - return new Guid_IsNotEmptyGuid_Assertion(source.Context); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/HttpStatusCodeAssertionGeneratorTests.GeneratesHttpStatusCodeAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/HttpStatusCodeAssertionGeneratorTests.GeneratesHttpStatusCodeAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/HttpStatusCodeAssertionGeneratorTests.GeneratesHttpStatusCodeAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/HttpStatusCodeAssertionGeneratorTests.GeneratesHttpStatusCodeAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/HttpStatusCodeAssertionGeneratorTests.GeneratesHttpStatusCodeAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/HttpStatusCodeAssertionGeneratorTests.GeneratesHttpStatusCodeAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 0229802d5bd..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/HttpStatusCodeAssertionGeneratorTests.GeneratesHttpStatusCodeAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,319 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsSuccess -/// -public sealed class HttpStatusCode_IsSuccess_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public HttpStatusCode_IsSuccess_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = (int)value is >= 200 and < 300; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be a success status code (2xx)"; - } -} - -/// -/// Generated assertion for IsNotSuccess -/// -public sealed class HttpStatusCode_IsNotSuccess_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public HttpStatusCode_IsNotSuccess_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = (int)value is < 200 or >= 300; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to not be a success status code"; - } -} - -/// -/// Generated assertion for IsClientError -/// -public sealed class HttpStatusCode_IsClientError_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public HttpStatusCode_IsClientError_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = (int)value is >= 400 and < 500; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be a client error status code (4xx)"; - } -} - -/// -/// Generated assertion for IsServerError -/// -public sealed class HttpStatusCode_IsServerError_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public HttpStatusCode_IsServerError_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = (int)value is >= 500 and < 600; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be a server error status code (5xx)"; - } -} - -/// -/// Generated assertion for IsRedirection -/// -public sealed class HttpStatusCode_IsRedirection_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public HttpStatusCode_IsRedirection_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = (int)value is >= 300 and < 400; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be a redirection status code (3xx)"; - } -} - -/// -/// Generated assertion for IsInformational -/// -public sealed class HttpStatusCode_IsInformational_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public HttpStatusCode_IsInformational_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = (int)value is >= 100 and < 200; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be an informational status code (1xx)"; - } -} - -/// -/// Generated assertion for IsError -/// -public sealed class HttpStatusCode_IsError_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public HttpStatusCode_IsError_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = (int)value is >= 400 and < 600; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be an error status code (4xx or 5xx)"; - } -} - -public static partial class HttpStatusCodeAssertionExtensions -{ - /// - /// Generated extension method for IsSuccess - /// - public static HttpStatusCode_IsSuccess_Assertion IsSuccess(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsSuccess()"); - return new HttpStatusCode_IsSuccess_Assertion(source.Context); - } - - /// - /// Generated extension method for IsNotSuccess - /// - public static HttpStatusCode_IsNotSuccess_Assertion IsNotSuccess(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotSuccess()"); - return new HttpStatusCode_IsNotSuccess_Assertion(source.Context); - } - - /// - /// Generated extension method for IsClientError - /// - public static HttpStatusCode_IsClientError_Assertion IsClientError(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsClientError()"); - return new HttpStatusCode_IsClientError_Assertion(source.Context); - } - - /// - /// Generated extension method for IsServerError - /// - public static HttpStatusCode_IsServerError_Assertion IsServerError(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsServerError()"); - return new HttpStatusCode_IsServerError_Assertion(source.Context); - } - - /// - /// Generated extension method for IsRedirection - /// - public static HttpStatusCode_IsRedirection_Assertion IsRedirection(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsRedirection()"); - return new HttpStatusCode_IsRedirection_Assertion(source.Context); - } - - /// - /// Generated extension method for IsInformational - /// - public static HttpStatusCode_IsInformational_Assertion IsInformational(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsInformational()"); - return new HttpStatusCode_IsInformational_Assertion(source.Context); - } - - /// - /// Generated extension method for IsError - /// - public static HttpStatusCode_IsError_Assertion IsError(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsError()"); - return new HttpStatusCode_IsError_Assertion(source.Context); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/LazyAssertionGeneratorTests.GeneratesLazyAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/LazyAssertionGeneratorTests.GeneratesLazyAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/LazyAssertionGeneratorTests.GeneratesLazyAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/LazyAssertionGeneratorTests.GeneratesLazyAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/LazyAssertionGeneratorTests.GeneratesLazyAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/LazyAssertionGeneratorTests.GeneratesLazyAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 7116be0f7fa..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/LazyAssertionGeneratorTests.GeneratesLazyAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,118 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsValueCreated -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class LazyT_IsValueCreated_Assertion : Assertion> -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public LazyT_IsValueCreated_Assertion(AssertionContext> context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata> metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.IsValueCreated == true; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have its value created"; - } -} - -/// -/// Generated assertion for IsValueNotCreated -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class LazyT_IsValueNotCreated_Assertion : Assertion> -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public LazyT_IsValueNotCreated_Assertion(AssertionContext> context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata> metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.IsValueCreated == false; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to not have its value created"; - } -} - -public static partial class LazyAssertionExtensions -{ - /// - /// Generated extension method for IsValueCreated - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static LazyT_IsValueCreated_Assertion IsValueCreated(this IAssertionSource> source) - { - source.Context.ExpressionBuilder.Append(".IsValueCreated()"); - return new LazyT_IsValueCreated_Assertion(source.Context); - } - - /// - /// Generated extension method for IsValueNotCreated - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static LazyT_IsValueNotCreated_Assertion IsValueNotCreated(this IAssertionSource> source) - { - source.Context.ExpressionBuilder.Append(".IsValueNotCreated()"); - return new LazyT_IsValueNotCreated_Assertion(source.Context); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.DotNet9_0.verified.txt deleted file mode 100644 index 31a9cd73bff..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ArrayTargetType.DotNet9_0.verified.txt +++ /dev/null @@ -1,71 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for ContainsMessage -/// -public sealed class StringArray_ContainsMessage_String_Bool_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly string _needle; - private readonly bool _exact; - - public StringArray_ContainsMessage_String_Bool_Assertion(AssertionContext context, string needle, bool exact) - : base(context) - { - _needle = needle; - _exact = exact; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.ContainsMessage(_needle, _exact); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to contain message '{_needle}'"; - } -} - -public static partial class ArrayTargetAssertionExtensions -{ - /// - /// Generated extension method for ContainsMessage - /// - public static StringArray_ContainsMessage_String_Bool_Assertion ContainsMessage(this IAssertionSource source, string needle, bool exact = true, [CallerArgumentExpression(nameof(needle))] string? needleExpression = null, [CallerArgumentExpression(nameof(exact))] string? exactExpression = null) - { - source.Context.ExpressionBuilder.Append($".ContainsMessage({needleExpression}, {exactExpression})"); - return new StringArray_ContainsMessage_String_Bool_Assertion(source.Context, needle, exact); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AssertionResultMethod.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AssertionResultMethod.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AssertionResultMethod.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AssertionResultMethod.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AssertionResultMethod.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AssertionResultMethod.DotNet9_0.verified.txt deleted file mode 100644 index d28e9b06d01..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AssertionResultMethod.DotNet9_0.verified.txt +++ /dev/null @@ -1,99 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsEven -/// -public sealed class Int_IsEven_Assertion : Assertion -{ - public Int_IsEven_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - return Task.FromResult(value!.IsEven()); - } - - protected override string GetExpectation() - { - return "to satisfy IsEven"; - } -} - -/// -/// Generated assertion for IsBetween -/// -public sealed class Int_IsBetween_Int_Int_Assertion : Assertion -{ - private readonly int _min; - private readonly int _max; - - public Int_IsBetween_Int_Int_Assertion(AssertionContext context, int min, int max) - : base(context) - { - _min = min; - _max = max; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - return Task.FromResult(value!.IsBetween(_min, _max)); - } - - protected override string GetExpectation() - { - return $"to satisfy IsBetween({_min}, {_max})"; - } -} - -public static partial class AssertionResultMethodExtensions -{ - /// - /// Generated extension method for IsEven - /// - public static Int_IsEven_Assertion IsEven(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsEven()"); - return new Int_IsEven_Assertion(source.Context); - } - - /// - /// Generated extension method for IsBetween - /// - public static Int_IsBetween_Int_Int_Assertion IsBetween(this IAssertionSource source, int min, int max, [CallerArgumentExpression(nameof(min))] string? minExpression = null, [CallerArgumentExpression(nameof(max))] string? maxExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsBetween({minExpression}, {maxExpression})"); - return new Int_IsBetween_Int_Int_Assertion(source.Context, min, max); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AssertionResultOfTMethod.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AssertionResultOfTMethod.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AssertionResultOfTMethod.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AssertionResultOfTMethod.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncAssertionResultMethod.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncAssertionResultMethod.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncAssertionResultMethod.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncAssertionResultMethod.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncAssertionResultMethod.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncAssertionResultMethod.DotNet9_0.verified.txt deleted file mode 100644 index 588e1e7c0d6..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncAssertionResultMethod.DotNet9_0.verified.txt +++ /dev/null @@ -1,99 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsEvenAsync -/// -public sealed class Int_IsEvenAsync_Assertion : Assertion -{ - public Int_IsEvenAsync_Assertion(AssertionContext context) - : base(context) - { - } - - protected override async Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return AssertionResult.Failed($"threw {exception.GetType().FullName}"); - } - - return await value!.IsEvenAsync(); - } - - protected override string GetExpectation() - { - return "to satisfy IsEvenAsync"; - } -} - -/// -/// Generated assertion for IsBetweenAsync -/// -public sealed class Int_IsBetweenAsync_Int_Int_Assertion : Assertion -{ - private readonly int _min; - private readonly int _max; - - public Int_IsBetweenAsync_Int_Int_Assertion(AssertionContext context, int min, int max) - : base(context) - { - _min = min; - _max = max; - } - - protected override async Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return AssertionResult.Failed($"threw {exception.GetType().FullName}"); - } - - return await value!.IsBetweenAsync(_min, _max); - } - - protected override string GetExpectation() - { - return $"to satisfy IsBetweenAsync({_min}, {_max})"; - } -} - -public static partial class AsyncAssertionResultExtensions -{ - /// - /// Generated extension method for IsEvenAsync - /// - public static Int_IsEvenAsync_Assertion IsEvenAsync(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsEvenAsync()"); - return new Int_IsEvenAsync_Assertion(source.Context); - } - - /// - /// Generated extension method for IsBetweenAsync - /// - public static Int_IsBetweenAsync_Int_Int_Assertion IsBetweenAsync(this IAssertionSource source, int min, int max, [CallerArgumentExpression(nameof(min))] string? minExpression = null, [CallerArgumentExpression(nameof(max))] string? maxExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsBetweenAsync({minExpression}, {maxExpression})"); - return new Int_IsBetweenAsync_Int_Int_Assertion(source.Context, min, max); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncAssertionResultOfTMethod.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncAssertionResultOfTMethod.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncAssertionResultOfTMethod.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncAssertionResultOfTMethod.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncAssertionResultOfTMethod.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncAssertionResultOfTMethod.DotNet9_0.verified.txt deleted file mode 100644 index 58d82c5908c..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncAssertionResultOfTMethod.DotNet9_0.verified.txt +++ /dev/null @@ -1,85 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for ContainsMatchAsync -/// -public sealed class IEnumerableString_ContainsMatchAsync_String_Assertion : Assertion> -{ - private readonly string _needle; - private string? _result; - - public IEnumerableString_ContainsMatchAsync_String_Assertion(AssertionContext> context, string needle) - : base(context) - { - _needle = needle; - } - - protected override async Task CheckAsync(EvaluationMetadata> metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return AssertionResult.Failed($"threw {exception.GetType().FullName}"); - } - - if (value is null) - { - return AssertionResult.Failed("Actual value is null"); - } - - var typedResult = await value!.ContainsMatchAsync(_needle); - if (typedResult.IsPassed) - { - _result = typedResult.Value; - } - return typedResult.IsPassed - ? AssertionResult.Passed - : AssertionResult.Failed(typedResult.Message); - } - - protected override string GetExpectation() - { - return $"to contain '{_needle}'"; - } - - public new System.Runtime.CompilerServices.TaskAwaiter GetAwaiter() - { - return ExecuteAndReturnResultAsync().GetAwaiter(); - } - - private async Task ExecuteAndReturnResultAsync() - { - await AssertAsync(); - return _result!; - } -} - -public static partial class AsyncAssertionResultOfTMethodExtensions -{ - /// - /// Generated extension method for ContainsMatchAsync - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static IEnumerableString_ContainsMatchAsync_String_Assertion ContainsMatchAsync(this IAssertionSource source, string needle, [CallerArgumentExpression(nameof(needle))] string? needleExpression = null) - where TActual : System.Collections.Generic.IEnumerable - { - source.Context.ExpressionBuilder.Append($".ContainsMatchAsync({needleExpression})"); - return new IEnumerableString_ContainsMatchAsync_String_Assertion(source.Context.Map>(static x => (System.Collections.Generic.IEnumerable?)x), needle); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncBoolMethod.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncBoolMethod.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncBoolMethod.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncBoolMethod.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.BoolMethod.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.BoolMethod.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.BoolMethod.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.BoolMethod.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.DocumentedMethods.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.DocumentedMethods.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.DocumentedMethods.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.DocumentedMethods.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.FileScopedClassWithInlining.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.FileScopedClassWithInlining.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.FileScopedClassWithInlining.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.FileScopedClassWithInlining.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.GenericMethodWithNonInferableTypeParameter.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.GenericMethodWithNonInferableTypeParameter.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.GenericMethodWithNonInferableTypeParameter.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.GenericMethodWithNonInferableTypeParameter.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.GenericMethodWithNonInferableTypeParameter.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.GenericMethodWithNonInferableTypeParameter.DotNet9_0.verified.txt deleted file mode 100644 index daa5eb0490c..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.GenericMethodWithNonInferableTypeParameter.DotNet9_0.verified.txt +++ /dev/null @@ -1,68 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsErrorOfType -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class ResultTValue_IsErrorOfType_Assertion : Assertion> - where TError : System.Exception -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public ResultTValue_IsErrorOfType_Assertion(AssertionContext> context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata> metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.IsErrorOfType(); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be Error"; - } -} - -public static partial class GenericMethodWithNonInferableTypeParameterExtensions -{ - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static ResultTValue_IsErrorOfType_Assertion IsErrorOfType(this IAssertionSource> source) - where TError : System.Exception - { - source.Context.ExpressionBuilder.Append(".IsErrorOfType()"); - return new ResultTValue_IsErrorOfType_Assertion(source.Context); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodOnConcreteNonSealedReceiver.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodOnConcreteNonSealedReceiver.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodOnConcreteNonSealedReceiver.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodOnConcreteNonSealedReceiver.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodOnConcreteNonSealedReceiver.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodOnConcreteNonSealedReceiver.DotNet9_0.verified.txt deleted file mode 100644 index c659432ddbe..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodOnConcreteNonSealedReceiver.DotNet9_0.verified.txt +++ /dev/null @@ -1,71 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for HasItem -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class MethodOnConcreteNonSealedReceiver_HasItem_T_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly T _item; - - public MethodOnConcreteNonSealedReceiver_HasItem_T_Assertion(AssertionContext context, T item) - : base(context) - { - _item = item; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.HasItem(_item); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to satisfy HasItem({_item})"; - } -} - -public static partial class MethodOnConcreteNonSealedReceiverExtensions -{ - /// - /// Generated extension method for HasItem - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static MethodOnConcreteNonSealedReceiver_HasItem_T_Assertion HasItem(this IAssertionSource source, T item, [CallerArgumentExpression(nameof(item))] string? itemExpression = null) - { - source.Context.ExpressionBuilder.Append($".HasItem({itemExpression})"); - return new MethodOnConcreteNonSealedReceiver_HasItem_T_Assertion(source.Context, item); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithComparableConstraint.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithComparableConstraint.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithComparableConstraint.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithComparableConstraint.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithDefaultValues.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithDefaultValues.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithDefaultValues.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithDefaultValues.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithDefaultValues.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithDefaultValues.DotNet9_0.verified.txt deleted file mode 100644 index 9d78283ad07..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithDefaultValues.DotNet9_0.verified.txt +++ /dev/null @@ -1,71 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for ContainsMessage -/// -public sealed class StringArray_ContainsMessage_String_Bool_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly string _needle; - private readonly bool _exact; - - public StringArray_ContainsMessage_String_Bool_Assertion(AssertionContext context, string needle, bool exact) - : base(context) - { - _needle = needle; - _exact = exact; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.ContainsMessage(_needle, _exact); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to contain message '{_needle}'"; - } -} - -public static partial class MethodWithDefaultValuesExtensions -{ - /// - /// Generated extension method for ContainsMessage - /// - public static StringArray_ContainsMessage_String_Bool_Assertion ContainsMessage(this IAssertionSource source, string needle, bool exact = true, [CallerArgumentExpression(nameof(needle))] string? needleExpression = null, [CallerArgumentExpression(nameof(exact))] string? exactExpression = null) - { - source.Context.ExpressionBuilder.Append($".ContainsMessage({needleExpression}, {exactExpression})"); - return new StringArray_ContainsMessage_String_Bool_Assertion(source.Context, needle, exact); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithMultipleConstraints.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithMultipleConstraints.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithMultipleConstraints.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithMultipleConstraints.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithMultipleConstraints.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithMultipleConstraints.DotNet9_0.verified.txt deleted file mode 100644 index f9f4f855716..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithMultipleConstraints.DotNet9_0.verified.txt +++ /dev/null @@ -1,73 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for HasProperty -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class String_HasProperty_T_Assertion : Assertion - where T : class, System.IComparable, new() -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly T _value; - - public String_HasProperty_T_Assertion(AssertionContext context, T value) - : base(context) - { - _value = value; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.HasProperty(_value); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"have the property"; - } -} - -public static partial class MultipleConstraintsExtensions -{ - /// - /// Generated extension method for HasProperty - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static String_HasProperty_T_Assertion HasProperty(this IAssertionSource source, T value, [CallerArgumentExpression(nameof(value))] string? valueExpression = null) - where T : class, System.IComparable, new() - { - source.Context.ExpressionBuilder.Append($".HasProperty({valueExpression})"); - return new String_HasProperty_T_Assertion(source.Context, value); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithNotNullConstraint.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithNotNullConstraint.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithNotNullConstraint.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithNotNullConstraint.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithNotNullConstraint.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithNotNullConstraint.DotNet9_0.verified.txt deleted file mode 100644 index 7c11422e8c8..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithNotNullConstraint.DotNet9_0.verified.txt +++ /dev/null @@ -1,73 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for HasValue -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class String_HasValue_T_Assertion : Assertion - where T : notnull -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly T _value; - - public String_HasValue_T_Assertion(AssertionContext context, T value) - : base(context) - { - _value = value; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.HasValue(_value); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"have a non-null value"; - } -} - -public static partial class NotNullConstraintExtensions -{ - /// - /// Generated extension method for HasValue - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static String_HasValue_T_Assertion HasValue(this IAssertionSource source, T value, [CallerArgumentExpression(nameof(value))] string? valueExpression = null) - where T : notnull - { - source.Context.ExpressionBuilder.Append($".HasValue({valueExpression})"); - return new String_HasValue_T_Assertion(source.Context, value); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithReferenceTypeConstraint.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithReferenceTypeConstraint.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithReferenceTypeConstraint.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithReferenceTypeConstraint.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithReferenceTypeConstraint.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithReferenceTypeConstraint.DotNet9_0.verified.txt deleted file mode 100644 index f3fe7d6ba76..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithReferenceTypeConstraint.DotNet9_0.verified.txt +++ /dev/null @@ -1,73 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsNullOrDefault -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class String_IsNullOrDefault_T_Assertion : Assertion - where T : class -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly T _obj; - - public String_IsNullOrDefault_T_Assertion(AssertionContext context, T obj) - : base(context) - { - _obj = obj; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.IsNullOrDefault(_obj); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"be null or default"; - } -} - -public static partial class ReferenceTypeConstraintExtensions -{ - /// - /// Generated extension method for IsNullOrDefault - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static String_IsNullOrDefault_T_Assertion IsNullOrDefault(this IAssertionSource source, T obj, [CallerArgumentExpression(nameof(obj))] string? objExpression = null) - where T : class - { - source.Context.ExpressionBuilder.Append($".IsNullOrDefault({objExpression})"); - return new String_IsNullOrDefault_T_Assertion(source.Context, obj); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithUnmanagedConstraint.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithUnmanagedConstraint.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithUnmanagedConstraint.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithUnmanagedConstraint.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithUnmanagedConstraint.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithUnmanagedConstraint.DotNet9_0.verified.txt deleted file mode 100644 index d1b62f92f63..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithUnmanagedConstraint.DotNet9_0.verified.txt +++ /dev/null @@ -1,68 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsBlittableDefault -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class Int_IsBlittableDefault_T_Assertion : Assertion - where T : unmanaged -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly T _obj; - - public Int_IsBlittableDefault_T_Assertion(AssertionContext context, T obj) - : base(context) - { - _obj = obj; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsBlittableDefault(_obj); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"be blittable default"; - } -} - -public static partial class UnmanagedConstraintExtensions -{ - /// - /// Generated extension method for IsBlittableDefault - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static Int_IsBlittableDefault_T_Assertion IsBlittableDefault(this IAssertionSource source, T obj, [CallerArgumentExpression(nameof(obj))] string? objExpression = null) - where T : unmanaged - { - source.Context.ExpressionBuilder.Append($".IsBlittableDefault({objExpression})"); - return new Int_IsBlittableDefault_T_Assertion(source.Context, obj); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithValueTypeConstraint.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithValueTypeConstraint.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithValueTypeConstraint.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithValueTypeConstraint.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithValueTypeConstraint.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithValueTypeConstraint.DotNet9_0.verified.txt deleted file mode 100644 index c8b4d3ba5c5..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithValueTypeConstraint.DotNet9_0.verified.txt +++ /dev/null @@ -1,68 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsDefault -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class Int_IsDefault_T_Assertion : Assertion - where T : struct -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly T _obj; - - public Int_IsDefault_T_Assertion(AssertionContext context, T obj) - : base(context) - { - _obj = obj; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsDefault(_obj); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"be the default value"; - } -} - -public static partial class ValueTypeConstraintExtensions -{ - /// - /// Generated extension method for IsDefault - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static Int_IsDefault_T_Assertion IsDefault(this IAssertionSource source, T obj, [CallerArgumentExpression(nameof(obj))] string? objExpression = null) - where T : struct - { - source.Context.ExpressionBuilder.Append($".IsDefault({objExpression})"); - return new Int_IsDefault_T_Assertion(source.Context, obj); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ParamsParameter.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ParamsParameter.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ParamsParameter.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ParamsParameter.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ParamsParameter.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ParamsParameter.DotNet9_0.verified.txt deleted file mode 100644 index 071702d3336..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ParamsParameter.DotNet9_0.verified.txt +++ /dev/null @@ -1,328 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for ContainsAny -/// -public sealed class String_ContainsAny_String_StringArray_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly string _label; - private readonly string[] _candidates; - - public String_ContainsAny_String_StringArray_Assertion(AssertionContext context, string label, string[] candidates) - : base(context) - { - _label = label; - _candidates = candidates; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.ContainsAny(_label, _candidates); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to satisfy ContainsAny({_label}, {_candidates})"; - } -} - -/// -/// Generated assertion for IsBetweenExcluding -/// -public sealed class Int_IsBetweenExcluding_Int_Int_IntArray_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly int _min; - private readonly int _max; - private readonly int[] _excluded; - - public Int_IsBetweenExcluding_Int_Int_IntArray_Assertion(AssertionContext context, int min, int max, int[] excluded) - : base(context) - { - _min = min; - _max = max; - _excluded = excluded; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsBetweenExcluding(_min, _max, _excluded); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to satisfy IsBetweenExcluding({_min}, {_max}, {_excluded})"; - } -} - -/// -/// Generated assertion for MeetsLength -/// -public sealed class String_MeetsLength_Int_StringArray_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly int _minLength; - private readonly string[] _suffixes; - - public String_MeetsLength_Int_StringArray_Assertion(AssertionContext context, int minLength, string[] suffixes) - : base(context) - { - _minLength = minLength; - _suffixes = suffixes; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.MeetsLength(_minLength, _suffixes); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to satisfy MeetsLength({_minLength}, {_suffixes})"; - } -} - -/// -/// Generated assertion for IsOneOfWithDefault -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class T_IsOneOfWithDefault_T_TArray_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly T _fallback; - private readonly T[] _alternatives; - - public T_IsOneOfWithDefault_T_TArray_Assertion(AssertionContext context, T fallback, T[] alternatives) - : base(context) - { - _fallback = fallback; - _alternatives = alternatives; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsOneOfWithDefault(_fallback, _alternatives); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to satisfy IsOneOfWithDefault({_fallback}, {_alternatives})"; - } -} - -/// -/// Generated assertion for StartsWithAny -/// -public sealed class String_StartsWithAny_String_StringArray_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly string _prefix; - private readonly string[] _suffixes; - - public String_StartsWithAny_String_StringArray_Assertion(AssertionContext context, string prefix, string[] suffixes) - : base(context) - { - _prefix = prefix; - _suffixes = suffixes; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = _suffixes.Length >= 0 && value!.StartsWith(_prefix); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to satisfy StartsWithAny({_prefix}, {_suffixes})"; - } -} - -/// -/// Generated assertion for ContainsExactly -/// -public sealed class String_ContainsExactly_StringArray_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly string[] _required; - - public String_ContainsExactly_StringArray_Assertion(AssertionContext context, string[] required) - : base(context) - { - _required = required; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.ContainsExactly(_required); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to satisfy ContainsExactly({_required})"; - } -} - -public static partial class ParamsParameterAssertionExtensions -{ - /// - /// Generated extension method for ContainsAny - /// - public static String_ContainsAny_String_StringArray_Assertion ContainsAny(this IAssertionSource source, string label, [CallerArgumentExpression(nameof(label))] string? labelExpression = null, params string[] candidates) - { - source.Context.ExpressionBuilder.Append($".ContainsAny({labelExpression}, {candidates})"); - return new String_ContainsAny_String_StringArray_Assertion(source.Context, label, candidates); - } - - /// - /// Generated extension method for IsBetweenExcluding - /// - public static Int_IsBetweenExcluding_Int_Int_IntArray_Assertion IsBetweenExcluding(this IAssertionSource source, int min, int max, [CallerArgumentExpression(nameof(min))] string? minExpression = null, [CallerArgumentExpression(nameof(max))] string? maxExpression = null, params int[] excluded) - { - source.Context.ExpressionBuilder.Append($".IsBetweenExcluding({minExpression}, {maxExpression}, {excluded})"); - return new Int_IsBetweenExcluding_Int_Int_IntArray_Assertion(source.Context, min, max, excluded); - } - - /// - /// Generated extension method for MeetsLength - /// - public static String_MeetsLength_Int_StringArray_Assertion MeetsLength(this IAssertionSource source, int minLength = 1, [CallerArgumentExpression(nameof(minLength))] string? minLengthExpression = null, params string[] suffixes) - { - source.Context.ExpressionBuilder.Append($".MeetsLength({minLengthExpression}, {suffixes})"); - return new String_MeetsLength_Int_StringArray_Assertion(source.Context, minLength, suffixes); - } - - /// - /// Generated extension method for IsOneOfWithDefault - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static T_IsOneOfWithDefault_T_TArray_Assertion IsOneOfWithDefault(this IAssertionSource source, T fallback, [CallerArgumentExpression(nameof(fallback))] string? fallbackExpression = null, params T[] alternatives) - { - source.Context.ExpressionBuilder.Append($".IsOneOfWithDefault({fallbackExpression}, {alternatives})"); - return new T_IsOneOfWithDefault_T_TArray_Assertion(source.Context, fallback, alternatives); - } - - /// - /// Generated extension method for StartsWithAny - /// - public static String_StartsWithAny_String_StringArray_Assertion StartsWithAny(this IAssertionSource source, string prefix, [CallerArgumentExpression(nameof(prefix))] string? prefixExpression = null, params string[] suffixes) - { - source.Context.ExpressionBuilder.Append($".StartsWithAny({prefixExpression}, {suffixes})"); - return new String_StartsWithAny_String_StringArray_Assertion(source.Context, prefix, suffixes); - } - - /// - /// Generated extension method for ContainsExactly - /// - public static String_ContainsExactly_StringArray_Assertion ContainsExactly(this IAssertionSource source, params string[] required) - { - source.Context.ExpressionBuilder.Append($".ContainsExactly({required})"); - return new String_ContainsExactly_StringArray_Assertion(source.Context, required); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.RefStructParameter.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.RefStructParameter.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.RefStructParameter.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.RefStructParameter.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.RefStructParameter.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.RefStructParameter.DotNet9_0.verified.txt deleted file mode 100644 index 913ead14954..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.RefStructParameter.DotNet9_0.verified.txt +++ /dev/null @@ -1,116 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for ContainsMessage -/// -public sealed class String_ContainsMessage_DefaultInterpolatedStringHandler_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly string _message; - - public String_ContainsMessage_DefaultInterpolatedStringHandler_Assertion(AssertionContext context, string message) - : base(context) - { - _message = message; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.Contains(_message); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to contain {_message}"; - } -} - -/// -/// Generated assertion for EndsWithMessage -/// -public sealed class String_EndsWithMessage_DefaultInterpolatedStringHandler_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly string _suffix; - - public String_EndsWithMessage_DefaultInterpolatedStringHandler_Assertion(AssertionContext context, string suffix) - : base(context) - { - _suffix = suffix; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.EndsWith(_suffix); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to end with {_suffix}"; - } -} - -public static partial class RefStructParameterAssertions -{ - /// - public static String_ContainsMessage_DefaultInterpolatedStringHandler_Assertion ContainsMessage(this IAssertionSource source, System.Runtime.CompilerServices.DefaultInterpolatedStringHandler message, [CallerArgumentExpression(nameof(message))] string? messageExpression = null) - { - source.Context.ExpressionBuilder.Append($".ContainsMessage({messageExpression})"); - return new String_ContainsMessage_DefaultInterpolatedStringHandler_Assertion(source.Context, message.ToStringAndClear()); - } - - /// - public static String_EndsWithMessage_DefaultInterpolatedStringHandler_Assertion EndsWithMessage(this IAssertionSource source, System.Runtime.CompilerServices.DefaultInterpolatedStringHandler suffix, [CallerArgumentExpression(nameof(suffix))] string? suffixExpression = null) - { - source.Context.ExpressionBuilder.Append($".EndsWithMessage({suffixExpression})"); - return new String_EndsWithMessage_DefaultInterpolatedStringHandler_Assertion(source.Context, suffix.ToStringAndClear()); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ValueTypeDefaultParameter.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ValueTypeDefaultParameter.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ValueTypeDefaultParameter.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ValueTypeDefaultParameter.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ValueTypeDefaultParameter.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ValueTypeDefaultParameter.DotNet9_0.verified.txt deleted file mode 100644 index b2c82ea2099..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.ValueTypeDefaultParameter.DotNet9_0.verified.txt +++ /dev/null @@ -1,64 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for RespectsToken -/// -public sealed class Int_RespectsToken_CancellationToken_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly System.Threading.CancellationToken _token; - - public Int_RespectsToken_CancellationToken_Assertion(AssertionContext context, System.Threading.CancellationToken token) - : base(context) - { - _token = token; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.RespectsToken(_token); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to satisfy RespectsToken({_token})"; - } -} - -public static partial class ValueTypeDefaultParameterAssertionExtensions -{ - /// - /// Generated extension method for RespectsToken - /// - public static Int_RespectsToken_CancellationToken_Assertion RespectsToken(this IAssertionSource source, System.Threading.CancellationToken token = default, [CallerArgumentExpression(nameof(token))] string? tokenExpression = null) - { - source.Context.ExpressionBuilder.Append($".RespectsToken({tokenExpression})"); - return new Int_RespectsToken_CancellationToken_Assertion(source.Context, token); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/ProcessAssertionGeneratorTests.GeneratesProcessAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/ProcessAssertionGeneratorTests.GeneratesProcessAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/ProcessAssertionGeneratorTests.GeneratesProcessAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/ProcessAssertionGeneratorTests.GeneratesProcessAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/ProcessAssertionGeneratorTests.GeneratesProcessAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/ProcessAssertionGeneratorTests.GeneratesProcessAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 983e73965c4..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/ProcessAssertionGeneratorTests.GeneratesProcessAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,162 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -public class ProcessHasExitedAssertion : Assertion -{ - private readonly bool _negated; - - public ProcessHasExitedAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.HasExited; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy HasExited")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}have exited"; - } -} - -public class ProcessRespondingAssertion : Assertion -{ - private readonly bool _negated; - - public ProcessRespondingAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.Responding; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy Responding")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be responding"; - } -} - -public class ProcessEnableRaisingEventsAssertion : Assertion -{ - private readonly bool _negated; - - public ProcessEnableRaisingEventsAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.EnableRaisingEvents; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy EnableRaisingEvents")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}have event raising enabled"; - } -} - -public static partial class ProcessAssertionExtensions -{ - public static ProcessHasExitedAssertion HasExited(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".HasExited()"); - return new ProcessHasExitedAssertion(source.Context, false); - } - - public static ProcessHasExitedAssertion HasNotExited(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".HasNotExited()"); - return new ProcessHasExitedAssertion(source.Context, true); - } - - public static ProcessRespondingAssertion Responding(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".Responding()"); - return new ProcessRespondingAssertion(source.Context, false); - } - - public static ProcessRespondingAssertion IsNotResponding(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotResponding()"); - return new ProcessRespondingAssertion(source.Context, true); - } - - public static ProcessEnableRaisingEventsAssertion EnableRaisingEvents(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".EnableRaisingEvents()"); - return new ProcessEnableRaisingEventsAssertion(source.Context, false); - } - - public static ProcessEnableRaisingEventsAssertion DoesNotHaveEventRaisingEnabled(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".DoesNotHaveEventRaisingEnabled()"); - return new ProcessEnableRaisingEventsAssertion(source.Context, true); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/DateOnlyAssertionGeneratorTests.GeneratesDateOnlyAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/RangeAssertionGeneratorTests.GeneratesRangeAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/DateOnlyAssertionGeneratorTests.GeneratesDateOnlyAssertions.DotNet9_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/RangeAssertionGeneratorTests.GeneratesRangeAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/RangeAssertionGeneratorTests.GeneratesRangeAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/RangeAssertionGeneratorTests.GeneratesRangeAssertions.DotNet9_0.verified.txt deleted file mode 100644 index ad47dbb93fc..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/RangeAssertionGeneratorTests.GeneratesRangeAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/StreamAssertionGeneratorTests.GeneratesStreamAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/StreamAssertionGeneratorTests.GeneratesStreamAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/StreamAssertionGeneratorTests.GeneratesStreamAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/StreamAssertionGeneratorTests.GeneratesStreamAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/StreamAssertionGeneratorTests.GeneratesStreamAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/StreamAssertionGeneratorTests.GeneratesStreamAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 0fa0d712ce0..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/StreamAssertionGeneratorTests.GeneratesStreamAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,210 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -public class StreamCanReadAssertion : Assertion -{ - private readonly bool _negated; - - public StreamCanReadAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.CanRead; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy CanRead")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be readable"; - } -} - -public class StreamCanWriteAssertion : Assertion -{ - private readonly bool _negated; - - public StreamCanWriteAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.CanWrite; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy CanWrite")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be writable"; - } -} - -public class StreamCanSeekAssertion : Assertion -{ - private readonly bool _negated; - - public StreamCanSeekAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.CanSeek; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy CanSeek")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be seekable"; - } -} - -public class StreamCanTimeoutAssertion : Assertion -{ - private readonly bool _negated; - - public StreamCanTimeoutAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.CanTimeout; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy CanTimeout")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}support timeout"; - } -} - -public static partial class StreamAssertionExtensions -{ - public static StreamCanReadAssertion CanRead(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".CanRead()"); - return new StreamCanReadAssertion(source.Context, false); - } - - public static StreamCanReadAssertion CannotRead(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".CannotRead()"); - return new StreamCanReadAssertion(source.Context, true); - } - - public static StreamCanWriteAssertion CanWrite(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".CanWrite()"); - return new StreamCanWriteAssertion(source.Context, false); - } - - public static StreamCanWriteAssertion CannotWrite(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".CannotWrite()"); - return new StreamCanWriteAssertion(source.Context, true); - } - - public static StreamCanSeekAssertion CanSeek(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".CanSeek()"); - return new StreamCanSeekAssertion(source.Context, false); - } - - public static StreamCanSeekAssertion CannotSeek(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".CannotSeek()"); - return new StreamCanSeekAssertion(source.Context, true); - } - - public static StreamCanTimeoutAssertion CanTimeout(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".CanTimeout()"); - return new StreamCanTimeoutAssertion(source.Context, false); - } - - public static StreamCanTimeoutAssertion CannotTimeout(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".CannotTimeout()"); - return new StreamCanTimeoutAssertion(source.Context, true); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/StringBuilderAssertionGeneratorTests.GeneratesStringBuilderAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/StringBuilderAssertionGeneratorTests.GeneratesStringBuilderAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/StringBuilderAssertionGeneratorTests.GeneratesStringBuilderAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/StringBuilderAssertionGeneratorTests.GeneratesStringBuilderAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/StringBuilderAssertionGeneratorTests.GeneratesStringBuilderAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/StringBuilderAssertionGeneratorTests.GeneratesStringBuilderAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 3c90fab70d5..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/StringBuilderAssertionGeneratorTests.GeneratesStringBuilderAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,162 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsEmpty -/// -public sealed class StringBuilder_IsEmpty_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public StringBuilder_IsEmpty_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.Length == 0; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be empty"; - } -} - -/// -/// Generated assertion for IsNotEmpty -/// -public sealed class StringBuilder_IsNotEmpty_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public StringBuilder_IsNotEmpty_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.Length > 0; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to not be empty"; - } -} - -/// -/// Generated assertion for HasExcessCapacity -/// -public sealed class StringBuilder_HasExcessCapacity_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public StringBuilder_HasExcessCapacity_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value != null && value!.Capacity > value!.Length; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have excess capacity"; - } -} - -public static partial class StringBuilderAssertionExtensions -{ - /// - /// Generated extension method for IsEmpty - /// - public static StringBuilder_IsEmpty_Assertion IsEmpty(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsEmpty()"); - return new StringBuilder_IsEmpty_Assertion(source.Context); - } - - /// - /// Generated extension method for IsNotEmpty - /// - public static StringBuilder_IsNotEmpty_Assertion IsNotEmpty(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotEmpty()"); - return new StringBuilder_IsNotEmpty_Assertion(source.Context); - } - - /// - /// Generated extension method for HasExcessCapacity - /// - public static StringBuilder_HasExcessCapacity_Assertion HasExcessCapacity(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".HasExcessCapacity()"); - return new StringBuilder_HasExcessCapacity_Assertion(source.Context); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/TUnit.Assertions.SourceGenerator.Tests.csproj b/tests/TUnit.Assertions.SourceGenerator.Tests/TUnit.Assertions.SourceGenerator.Tests.csproj index cc73ec2b972..abed687b392 100644 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/TUnit.Assertions.SourceGenerator.Tests.csproj +++ b/tests/TUnit.Assertions.SourceGenerator.Tests/TUnit.Assertions.SourceGenerator.Tests.csproj @@ -3,7 +3,7 @@ - $(WindowsNetFrameworkTestTarget)net8.0;net9.0;net10.0 + $(WindowsNetFrameworkTestTarget)net10.0;net11.0 diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/TaskAssertionGeneratorTests.GeneratesTaskAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/TaskAssertionGeneratorTests.GeneratesTaskAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/TaskAssertionGeneratorTests.GeneratesTaskAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/TaskAssertionGeneratorTests.GeneratesTaskAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/TaskAssertionGeneratorTests.GeneratesTaskAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/TaskAssertionGeneratorTests.GeneratesTaskAssertions.DotNet9_0.verified.txt deleted file mode 100644 index cb6e1d1307b..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/TaskAssertionGeneratorTests.GeneratesTaskAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,156 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -public class TaskIsCompletedAssertion : Assertion - where TTask : System.Threading.Tasks.Task -{ - private readonly bool _negated; - - public TaskIsCompletedAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsCompleted; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsCompleted")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be completed"; - } -} - -public class TaskIsCanceledAssertion : Assertion - where TTask : System.Threading.Tasks.Task -{ - private readonly bool _negated; - - public TaskIsCanceledAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsCanceled; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsCanceled")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be canceled"; - } -} - -public class TaskIsFaultedAssertion : Assertion - where TTask : System.Threading.Tasks.Task -{ - private readonly bool _negated; - - public TaskIsFaultedAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsFaulted; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsFaulted")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be faulted"; - } -} - -public static partial class TaskAssertionExtensions -{ - public static TaskIsCompletedAssertion IsCompleted(this IAssertionSource source) - where TTask : System.Threading.Tasks.Task - { - source.Context.ExpressionBuilder.Append(".IsCompleted()"); - return new TaskIsCompletedAssertion(source.Context, false); - } - - public static TaskIsCompletedAssertion IsNotCompleted(this IAssertionSource source) - where TTask : System.Threading.Tasks.Task - { - source.Context.ExpressionBuilder.Append(".IsNotCompleted()"); - return new TaskIsCompletedAssertion(source.Context, true); - } - - public static TaskIsCanceledAssertion IsCanceled(this IAssertionSource source) - where TTask : System.Threading.Tasks.Task - { - source.Context.ExpressionBuilder.Append(".IsCanceled()"); - return new TaskIsCanceledAssertion(source.Context, false); - } - - public static TaskIsCanceledAssertion IsNotCanceled(this IAssertionSource source) - where TTask : System.Threading.Tasks.Task - { - source.Context.ExpressionBuilder.Append(".IsNotCanceled()"); - return new TaskIsCanceledAssertion(source.Context, true); - } - - public static TaskIsFaultedAssertion IsFaulted(this IAssertionSource source) - where TTask : System.Threading.Tasks.Task - { - source.Context.ExpressionBuilder.Append(".IsFaulted()"); - return new TaskIsFaultedAssertion(source.Context, false); - } - - public static TaskIsFaultedAssertion IsNotFaulted(this IAssertionSource source) - where TTask : System.Threading.Tasks.Task - { - source.Context.ExpressionBuilder.Append(".IsNotFaulted()"); - return new TaskIsFaultedAssertion(source.Context, true); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/ThreadAssertionGeneratorTests.GeneratesThreadAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/ThreadAssertionGeneratorTests.GeneratesThreadAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/ThreadAssertionGeneratorTests.GeneratesThreadAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/ThreadAssertionGeneratorTests.GeneratesThreadAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/ThreadAssertionGeneratorTests.GeneratesThreadAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/ThreadAssertionGeneratorTests.GeneratesThreadAssertions.DotNet9_0.verified.txt deleted file mode 100644 index c8ff87e3ead..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/ThreadAssertionGeneratorTests.GeneratesThreadAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,162 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -public class ThreadIsAliveAssertion : Assertion -{ - private readonly bool _negated; - - public ThreadIsAliveAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsAlive; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsAlive")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be alive"; - } -} - -public class ThreadIsBackgroundAssertion : Assertion -{ - private readonly bool _negated; - - public ThreadIsBackgroundAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsBackground; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsBackground")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a background thread"; - } -} - -public class ThreadIsThreadPoolThreadAssertion : Assertion -{ - private readonly bool _negated; - - public ThreadIsThreadPoolThreadAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsThreadPoolThread; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsThreadPoolThread")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a thread pool thread"; - } -} - -public static partial class ThreadAssertionExtensions -{ - public static ThreadIsAliveAssertion IsAlive(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsAlive()"); - return new ThreadIsAliveAssertion(source.Context, false); - } - - public static ThreadIsAliveAssertion IsNotAlive(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotAlive()"); - return new ThreadIsAliveAssertion(source.Context, true); - } - - public static ThreadIsBackgroundAssertion IsBackground(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsBackground()"); - return new ThreadIsBackgroundAssertion(source.Context, false); - } - - public static ThreadIsBackgroundAssertion IsNotBackground(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotBackground()"); - return new ThreadIsBackgroundAssertion(source.Context, true); - } - - public static ThreadIsThreadPoolThreadAssertion IsThreadPoolThread(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsThreadPoolThread()"); - return new ThreadIsThreadPoolThreadAssertion(source.Context, false); - } - - public static ThreadIsThreadPoolThreadAssertion IsNotThreadPoolThread(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotThreadPoolThread()"); - return new ThreadIsThreadPoolThreadAssertion(source.Context, true); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/RangeAssertionGeneratorTests.GeneratesRangeAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/TimeOnlyAssertionGeneratorTests.GeneratesTimeOnlyAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/RangeAssertionGeneratorTests.GeneratesRangeAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/TimeOnlyAssertionGeneratorTests.GeneratesTimeOnlyAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/TimeOnlyAssertionGeneratorTests.GeneratesTimeOnlyAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/TimeOnlyAssertionGeneratorTests.GeneratesTimeOnlyAssertions.DotNet8_0.verified.txt deleted file mode 100644 index ad47dbb93fc..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/TimeOnlyAssertionGeneratorTests.GeneratesTimeOnlyAssertions.DotNet8_0.verified.txt +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/TimeOnlyAssertionGeneratorTests.GeneratesTimeOnlyAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/TimeOnlyAssertionGeneratorTests.GeneratesTimeOnlyAssertions.DotNet9_0.verified.txt deleted file mode 100644 index ad47dbb93fc..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/TimeOnlyAssertionGeneratorTests.GeneratesTimeOnlyAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/TimeSpanAssertionGeneratorTests.GeneratesTimeSpanAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/TimeSpanAssertionGeneratorTests.GeneratesTimeSpanAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/TimeSpanAssertionGeneratorTests.GeneratesTimeSpanAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/TimeSpanAssertionGeneratorTests.GeneratesTimeSpanAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/TimeSpanAssertionGeneratorTests.GeneratesTimeSpanAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/TimeSpanAssertionGeneratorTests.GeneratesTimeSpanAssertions.DotNet9_0.verified.txt deleted file mode 100644 index ad9bcffe46c..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/TimeSpanAssertionGeneratorTests.GeneratesTimeSpanAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,276 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsZero -/// -public sealed class TimeSpan_IsZero_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public TimeSpan_IsZero_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value == global::System.TimeSpan.Zero; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be zero"; - } -} - -/// -/// Generated assertion for IsNotZero -/// -public sealed class TimeSpan_IsNotZero_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public TimeSpan_IsNotZero_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value != global::System.TimeSpan.Zero; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to not be zero"; - } -} - -/// -/// Generated assertion for IsPositive -/// -public sealed class TimeSpan_IsPositive_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public TimeSpan_IsPositive_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value > global::System.TimeSpan.Zero; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be positive"; - } -} - -/// -/// Generated assertion for IsNegative -/// -public sealed class TimeSpan_IsNegative_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public TimeSpan_IsNegative_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value < global::System.TimeSpan.Zero; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be negative"; - } -} - -/// -/// Generated assertion for IsNonNegative -/// -public sealed class TimeSpan_IsNonNegative_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public TimeSpan_IsNonNegative_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value >= global::System.TimeSpan.Zero; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be non-negative"; - } -} - -/// -/// Generated assertion for IsNonPositive -/// -public sealed class TimeSpan_IsNonPositive_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public TimeSpan_IsNonPositive_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value <= global::System.TimeSpan.Zero; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be non-positive"; - } -} - -public static partial class TimeSpanAssertionExtensions -{ - /// - /// Generated extension method for IsZero - /// - public static TimeSpan_IsZero_Assertion IsZero(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsZero()"); - return new TimeSpan_IsZero_Assertion(source.Context); - } - - /// - /// Generated extension method for IsNotZero - /// - public static TimeSpan_IsNotZero_Assertion IsNotZero(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotZero()"); - return new TimeSpan_IsNotZero_Assertion(source.Context); - } - - /// - /// Generated extension method for IsPositive - /// - public static TimeSpan_IsPositive_Assertion IsPositive(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsPositive()"); - return new TimeSpan_IsPositive_Assertion(source.Context); - } - - /// - /// Generated extension method for IsNegative - /// - public static TimeSpan_IsNegative_Assertion IsNegative(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNegative()"); - return new TimeSpan_IsNegative_Assertion(source.Context); - } - - /// - /// Generated extension method for IsNonNegative - /// - public static TimeSpan_IsNonNegative_Assertion IsNonNegative(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNonNegative()"); - return new TimeSpan_IsNonNegative_Assertion(source.Context); - } - - /// - /// Generated extension method for IsNonPositive - /// - public static TimeSpan_IsNonPositive_Assertion IsNonPositive(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNonPositive()"); - return new TimeSpan_IsNonPositive_Assertion(source.Context); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/TimeZoneInfoAssertionGeneratorTests.GeneratesTimeZoneInfoAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/TimeZoneInfoAssertionGeneratorTests.GeneratesTimeZoneInfoAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/TimeZoneInfoAssertionGeneratorTests.GeneratesTimeZoneInfoAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/TimeZoneInfoAssertionGeneratorTests.GeneratesTimeZoneInfoAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/TimeZoneInfoAssertionGeneratorTests.GeneratesTimeZoneInfoAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/TimeZoneInfoAssertionGeneratorTests.GeneratesTimeZoneInfoAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 64b6edc73a1..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/TimeZoneInfoAssertionGeneratorTests.GeneratesTimeZoneInfoAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,66 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -public class TimeZoneInfoSupportsDaylightSavingTimeAssertion : Assertion -{ - private readonly bool _negated; - - public TimeZoneInfoSupportsDaylightSavingTimeAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.SupportsDaylightSavingTime; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy SupportsDaylightSavingTime")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}support daylight saving time"; - } -} - -public static partial class TimeZoneInfoAssertionExtensions -{ - public static TimeZoneInfoSupportsDaylightSavingTimeAssertion SupportsDaylightSavingTime(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".SupportsDaylightSavingTime()"); - return new TimeZoneInfoSupportsDaylightSavingTimeAssertion(source.Context, false); - } - - public static TimeZoneInfoSupportsDaylightSavingTimeAssertion DoesNotSupportDaylightSavingTime(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".DoesNotSupportDaylightSavingTime()"); - return new TimeZoneInfoSupportsDaylightSavingTimeAssertion(source.Context, true); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/TypeAssertionGeneratorTests.GeneratesTypeAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/TypeAssertionGeneratorTests.GeneratesTypeAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/TypeAssertionGeneratorTests.GeneratesTypeAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/TypeAssertionGeneratorTests.GeneratesTypeAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/TypeAssertionGeneratorTests.GeneratesTypeAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/TypeAssertionGeneratorTests.GeneratesTypeAssertions.DotNet9_0.verified.txt deleted file mode 100644 index aba36d8286e..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/TypeAssertionGeneratorTests.GeneratesTypeAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,1122 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -public class TypeIsClassAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsClassAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsClass; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsClass")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a class"; - } -} - -public class TypeIsInterfaceAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsInterfaceAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsInterface; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsInterface")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be an interface"; - } -} - -public class TypeIsAbstractAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsAbstractAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsAbstract; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsAbstract")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be abstract"; - } -} - -public class TypeIsSealedAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsSealedAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsSealed; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsSealed")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be sealed"; - } -} - -public class TypeIsValueTypeAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsValueTypeAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsValueType; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsValueType")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a value type"; - } -} - -public class TypeIsEnumAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsEnumAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsEnum; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsEnum")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be an enum"; - } -} - -public class TypeIsPrimitiveAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsPrimitiveAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsPrimitive; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsPrimitive")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a primitive type"; - } -} - -public class TypeIsPublicAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsPublicAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsPublic; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsPublic")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be public"; - } -} - -public class TypeIsGenericTypeAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsGenericTypeAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsGenericType; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsGenericType")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a generic type"; - } -} - -public class TypeIsGenericTypeDefinitionAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsGenericTypeDefinitionAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsGenericTypeDefinition; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsGenericTypeDefinition")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a generic type definition"; - } -} - -public class TypeIsArrayAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsArrayAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsArray; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsArray")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be an array"; - } -} - -public class TypeIsByRefAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsByRefAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsByRef; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsByRef")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a by-ref type"; - } -} - -public class TypeIsPointerAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsPointerAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsPointer; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsPointer")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a pointer type"; - } -} - -public class TypeIsNestedAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsNestedAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsNested; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsNested")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a nested type"; - } -} - -public class TypeIsNestedPublicAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsNestedPublicAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsNestedPublic; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsNestedPublic")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a nested public type"; - } -} - -public class TypeIsNestedPrivateAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsNestedPrivateAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsNestedPrivate; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsNestedPrivate")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a nested private type"; - } -} - -public class TypeIsNestedAssemblyAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsNestedAssemblyAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsNestedAssembly; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsNestedAssembly")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a nested assembly type"; - } -} - -public class TypeIsNestedFamilyAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsNestedFamilyAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsNestedFamily; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsNestedFamily")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a nested family type"; - } -} - -public class TypeIsVisibleAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsVisibleAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsVisible; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsVisible")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be visible"; - } -} - -public class TypeIsConstructedGenericTypeAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsConstructedGenericTypeAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsConstructedGenericType; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsConstructedGenericType")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a constructed generic type"; - } -} - -public class TypeContainsGenericParametersAssertion : Assertion -{ - private readonly bool _negated; - - public TypeContainsGenericParametersAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.ContainsGenericParameters; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy ContainsGenericParameters")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}contain generic parameters"; - } -} - -public class TypeIsSerializableAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsSerializableAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsSerializable; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsSerializable")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be serializable"; - } -} - -public class TypeIsCOMObjectAssertion : Assertion -{ - private readonly bool _negated; - - public TypeIsCOMObjectAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsCOMObject; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsCOMObject")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a COM object"; - } -} - -public static partial class TypeAssertionExtensions -{ - public static TypeIsClassAssertion IsClass(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsClass()"); - return new TypeIsClassAssertion(source.Context, false); - } - - public static TypeIsClassAssertion IsNotClass(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotClass()"); - return new TypeIsClassAssertion(source.Context, true); - } - - public static TypeIsInterfaceAssertion IsInterface(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsInterface()"); - return new TypeIsInterfaceAssertion(source.Context, false); - } - - public static TypeIsInterfaceAssertion IsNotInterface(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotInterface()"); - return new TypeIsInterfaceAssertion(source.Context, true); - } - - public static TypeIsAbstractAssertion IsAbstract(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsAbstract()"); - return new TypeIsAbstractAssertion(source.Context, false); - } - - public static TypeIsAbstractAssertion IsNotAbstract(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotAbstract()"); - return new TypeIsAbstractAssertion(source.Context, true); - } - - public static TypeIsSealedAssertion IsSealed(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsSealed()"); - return new TypeIsSealedAssertion(source.Context, false); - } - - public static TypeIsSealedAssertion IsNotSealed(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotSealed()"); - return new TypeIsSealedAssertion(source.Context, true); - } - - public static TypeIsValueTypeAssertion IsValueType(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsValueType()"); - return new TypeIsValueTypeAssertion(source.Context, false); - } - - public static TypeIsValueTypeAssertion IsNotValueType(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotValueType()"); - return new TypeIsValueTypeAssertion(source.Context, true); - } - - public static TypeIsEnumAssertion IsEnum(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsEnum()"); - return new TypeIsEnumAssertion(source.Context, false); - } - - public static TypeIsEnumAssertion IsNotEnum(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotEnum()"); - return new TypeIsEnumAssertion(source.Context, true); - } - - public static TypeIsPrimitiveAssertion IsPrimitive(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsPrimitive()"); - return new TypeIsPrimitiveAssertion(source.Context, false); - } - - public static TypeIsPrimitiveAssertion IsNotPrimitive(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotPrimitive()"); - return new TypeIsPrimitiveAssertion(source.Context, true); - } - - public static TypeIsPublicAssertion IsPublic(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsPublic()"); - return new TypeIsPublicAssertion(source.Context, false); - } - - public static TypeIsPublicAssertion IsNotPublic(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotPublic()"); - return new TypeIsPublicAssertion(source.Context, true); - } - - public static TypeIsGenericTypeAssertion IsGenericType(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsGenericType()"); - return new TypeIsGenericTypeAssertion(source.Context, false); - } - - public static TypeIsGenericTypeAssertion IsNotGenericType(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotGenericType()"); - return new TypeIsGenericTypeAssertion(source.Context, true); - } - - public static TypeIsGenericTypeDefinitionAssertion IsGenericTypeDefinition(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsGenericTypeDefinition()"); - return new TypeIsGenericTypeDefinitionAssertion(source.Context, false); - } - - public static TypeIsGenericTypeDefinitionAssertion IsNotGenericTypeDefinition(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotGenericTypeDefinition()"); - return new TypeIsGenericTypeDefinitionAssertion(source.Context, true); - } - - public static TypeIsArrayAssertion IsArray(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsArray()"); - return new TypeIsArrayAssertion(source.Context, false); - } - - public static TypeIsArrayAssertion IsNotArray(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotArray()"); - return new TypeIsArrayAssertion(source.Context, true); - } - - public static TypeIsByRefAssertion IsByRef(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsByRef()"); - return new TypeIsByRefAssertion(source.Context, false); - } - - public static TypeIsByRefAssertion IsNotByRef(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotByRef()"); - return new TypeIsByRefAssertion(source.Context, true); - } - - public static TypeIsPointerAssertion IsPointer(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsPointer()"); - return new TypeIsPointerAssertion(source.Context, false); - } - - public static TypeIsPointerAssertion IsNotPointer(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotPointer()"); - return new TypeIsPointerAssertion(source.Context, true); - } - - public static TypeIsNestedAssertion IsNested(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNested()"); - return new TypeIsNestedAssertion(source.Context, false); - } - - public static TypeIsNestedAssertion IsNotNested(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotNested()"); - return new TypeIsNestedAssertion(source.Context, true); - } - - public static TypeIsNestedPublicAssertion IsNestedPublic(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNestedPublic()"); - return new TypeIsNestedPublicAssertion(source.Context, false); - } - - public static TypeIsNestedPublicAssertion IsNotNestedPublic(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotNestedPublic()"); - return new TypeIsNestedPublicAssertion(source.Context, true); - } - - public static TypeIsNestedPrivateAssertion IsNestedPrivate(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNestedPrivate()"); - return new TypeIsNestedPrivateAssertion(source.Context, false); - } - - public static TypeIsNestedPrivateAssertion IsNotNestedPrivate(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotNestedPrivate()"); - return new TypeIsNestedPrivateAssertion(source.Context, true); - } - - public static TypeIsNestedAssemblyAssertion IsNestedAssembly(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNestedAssembly()"); - return new TypeIsNestedAssemblyAssertion(source.Context, false); - } - - public static TypeIsNestedAssemblyAssertion IsNotNestedAssembly(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotNestedAssembly()"); - return new TypeIsNestedAssemblyAssertion(source.Context, true); - } - - public static TypeIsNestedFamilyAssertion IsNestedFamily(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNestedFamily()"); - return new TypeIsNestedFamilyAssertion(source.Context, false); - } - - public static TypeIsNestedFamilyAssertion IsNotNestedFamily(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotNestedFamily()"); - return new TypeIsNestedFamilyAssertion(source.Context, true); - } - - public static TypeIsVisibleAssertion IsVisible(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsVisible()"); - return new TypeIsVisibleAssertion(source.Context, false); - } - - public static TypeIsVisibleAssertion IsNotVisible(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotVisible()"); - return new TypeIsVisibleAssertion(source.Context, true); - } - - public static TypeIsConstructedGenericTypeAssertion IsConstructedGenericType(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsConstructedGenericType()"); - return new TypeIsConstructedGenericTypeAssertion(source.Context, false); - } - - public static TypeIsConstructedGenericTypeAssertion IsNotConstructedGenericType(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotConstructedGenericType()"); - return new TypeIsConstructedGenericTypeAssertion(source.Context, true); - } - - public static TypeContainsGenericParametersAssertion ContainsGenericParameters(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".ContainsGenericParameters()"); - return new TypeContainsGenericParametersAssertion(source.Context, false); - } - - public static TypeContainsGenericParametersAssertion DoesNotContainGenericParameters(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".DoesNotContainGenericParameters()"); - return new TypeContainsGenericParametersAssertion(source.Context, true); - } - - public static TypeIsSerializableAssertion IsSerializable(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsSerializable()"); - return new TypeIsSerializableAssertion(source.Context, false); - } - - public static TypeIsSerializableAssertion IsNotSerializable(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotSerializable()"); - return new TypeIsSerializableAssertion(source.Context, true); - } - - public static TypeIsCOMObjectAssertion IsCOMObject(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsCOMObject()"); - return new TypeIsCOMObjectAssertion(source.Context, false); - } - - public static TypeIsCOMObjectAssertion IsNotCOMObject(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotCOMObject()"); - return new TypeIsCOMObjectAssertion(source.Context, true); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/UnboundGenericAssertionFromTests.GeneratesGenericAssertionsForUnboundGenericTypes.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/UnboundGenericAssertionFromTests.GeneratesGenericAssertionsForUnboundGenericTypes.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/UnboundGenericAssertionFromTests.GeneratesGenericAssertionsForUnboundGenericTypes.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/UnboundGenericAssertionFromTests.GeneratesGenericAssertionsForUnboundGenericTypes.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/UnboundGenericAssertionFromTests.GeneratesGenericAssertionsForUnboundGenericTypes.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/UnboundGenericAssertionFromTests.GeneratesGenericAssertionsForUnboundGenericTypes.DotNet9_0.verified.txt deleted file mode 100644 index 281c82edf25..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/UnboundGenericAssertionFromTests.GeneratesGenericAssertionsForUnboundGenericTypes.DotNet9_0.verified.txt +++ /dev/null @@ -1,309 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -public class BoxIsEmptyAssertion : Assertion> -{ - private readonly bool _negated; - - public BoxIsEmptyAssertion(AssertionContext> context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata> metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = actualValue.IsEmpty; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsEmpty")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}satisfy IsEmpty"; - } -} - -public class BoxHoldsWithTAssertion : Assertion> -{ - private readonly T _item; - private readonly bool _negated; - - public BoxHoldsWithTAssertion(AssertionContext> context, T item, bool negated = false) - : base(context) - { - _item = item; - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata> metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = actualValue.Holds(_item); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy Holds({_item})")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}satisfy Holds({_item})"; - } -} - -public class PairHasKeyAssertion : Assertion> - where TKey : notnull -{ - private readonly bool _negated; - - public PairHasKeyAssertion(AssertionContext> context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata> metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.HasKey(); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy HasKey")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}satisfy HasKey"; - } -} - -public class ShadowHoldsValueOfTypeAssertion : Assertion> -{ - private readonly bool _negated; - - public ShadowHoldsValueOfTypeAssertion(AssertionContext> context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata> metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.HoldsValueOfType(); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy HoldsValueOfType")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}satisfy HoldsValueOfType"; - } -} - -public class ShadowIsDefaultOfWithTAssertion : Assertion> -{ - private readonly T1 _value; - private readonly bool _negated; - - public ShadowIsDefaultOfWithTAssertion(AssertionContext> context, T1 value, bool negated = false) - : base(context) - { - _value = value; - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata> metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsDefaultOf(_value); - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsDefaultOf({_value})")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}satisfy IsDefaultOf({_value})"; - } -} - -public class InnerIsSetAssertion : Assertion.Inner> -{ - private readonly bool _negated; - - public InnerIsSetAssertion(AssertionContext.Inner> context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata.Inner> metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsSet; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsSet")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}satisfy IsSet"; - } -} - -public class BoxIsEmptyAssertion : Assertion> -{ - private readonly bool _negated; - - public BoxIsEmptyAssertion(AssertionContext> context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata> metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = actualValue.IsEmpty; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsEmpty")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}satisfy IsEmpty"; - } -} - -public static partial class UnboundGenericAssertions -{ - public static BoxIsEmptyAssertion IsEmptyBox(this IAssertionSource> source) - { - source.Context.ExpressionBuilder.Append(".IsEmptyBox()"); - return new BoxIsEmptyAssertion(source.Context, false); - } - - public static BoxIsEmptyAssertion IsNotEmptyBox(this IAssertionSource> source) - { - source.Context.ExpressionBuilder.Append(".IsNotEmptyBox()"); - return new BoxIsEmptyAssertion(source.Context, true); - } - - public static BoxHoldsWithTAssertion HoldsItem(this IAssertionSource> source, T item, [CallerArgumentExpression(nameof(item))] string? itemExpression = null) - { - source.Context.ExpressionBuilder.Append($".HoldsItem({itemExpression})"); - return new BoxHoldsWithTAssertion(source.Context, item, false); - } - - public static PairHasKeyAssertion HasKey(this IAssertionSource> source) - where TKey : notnull - { - source.Context.ExpressionBuilder.Append(".HasKey()"); - return new PairHasKeyAssertion(source.Context, false); - } - - public static ShadowHoldsValueOfTypeAssertion HoldsValueOfType(this IAssertionSource> source) - { - source.Context.ExpressionBuilder.Append(".HoldsValueOfType()"); - return new ShadowHoldsValueOfTypeAssertion(source.Context, false); - } - - public static ShadowIsDefaultOfWithTAssertion IsDefaultOf(this IAssertionSource> source, T1 value, [CallerArgumentExpression(nameof(value))] string? valueExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsDefaultOf({valueExpression})"); - return new ShadowIsDefaultOfWithTAssertion(source.Context, value, false); - } - - public static InnerIsSetAssertion IsSet(this IAssertionSource.Inner> source) - { - source.Context.ExpressionBuilder.Append(".IsSet()"); - return new InnerIsSetAssertion(source.Context, false); - } - - public static BoxIsEmptyAssertion IsEmptyIntBox(this IAssertionSource> source) - { - source.Context.ExpressionBuilder.Append(".IsEmptyIntBox()"); - return new BoxIsEmptyAssertion(source.Context, false); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/UriAssertionGeneratorTests.GeneratesUriAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/UriAssertionGeneratorTests.GeneratesUriAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/UriAssertionGeneratorTests.GeneratesUriAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/UriAssertionGeneratorTests.GeneratesUriAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/UriAssertionGeneratorTests.GeneratesUriAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/UriAssertionGeneratorTests.GeneratesUriAssertions.DotNet9_0.verified.txt deleted file mode 100644 index d51d59a2add..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/UriAssertionGeneratorTests.GeneratesUriAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,306 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -public class UriIsAbsoluteUriAssertion : Assertion -{ - private readonly bool _negated; - - public UriIsAbsoluteUriAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsAbsoluteUri; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsAbsoluteUri")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be an absolute URI"; - } -} - -public class UriIsFileAssertion : Assertion -{ - private readonly bool _negated; - - public UriIsFileAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsFile; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsFile")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a file URI"; - } -} - -public class UriIsUncAssertion : Assertion -{ - private readonly bool _negated; - - public UriIsUncAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsUnc; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsUnc")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a UNC URI"; - } -} - -public class UriIsLoopbackAssertion : Assertion -{ - private readonly bool _negated; - - public UriIsLoopbackAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsLoopback; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLoopback")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be a loopback URI"; - } -} - -public class UriIsDefaultPortAssertion : Assertion -{ - private readonly bool _negated; - - public UriIsDefaultPortAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsDefaultPort; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsDefaultPort")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}use the default port"; - } -} - -public class UriUserEscapedAssertion : Assertion -{ - private readonly bool _negated; - - public UriUserEscapedAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.UserEscaped; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy UserEscaped")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be user-escaped"; - } -} - -public static partial class UriAssertionExtensions -{ - public static UriIsAbsoluteUriAssertion IsAbsoluteUri(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsAbsoluteUri()"); - return new UriIsAbsoluteUriAssertion(source.Context, false); - } - - public static UriIsAbsoluteUriAssertion IsNotAbsoluteUri(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotAbsoluteUri()"); - return new UriIsAbsoluteUriAssertion(source.Context, true); - } - - public static UriIsFileAssertion IsFile(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsFile()"); - return new UriIsFileAssertion(source.Context, false); - } - - public static UriIsFileAssertion IsNotFile(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotFile()"); - return new UriIsFileAssertion(source.Context, true); - } - - public static UriIsUncAssertion IsUnc(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsUnc()"); - return new UriIsUncAssertion(source.Context, false); - } - - public static UriIsUncAssertion IsNotUnc(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotUnc()"); - return new UriIsUncAssertion(source.Context, true); - } - - public static UriIsLoopbackAssertion IsLoopback(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsLoopback()"); - return new UriIsLoopbackAssertion(source.Context, false); - } - - public static UriIsLoopbackAssertion IsNotLoopback(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotLoopback()"); - return new UriIsLoopbackAssertion(source.Context, true); - } - - public static UriIsDefaultPortAssertion IsDefaultPort(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsDefaultPort()"); - return new UriIsDefaultPortAssertion(source.Context, false); - } - - public static UriIsDefaultPortAssertion IsNotDefaultPort(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotDefaultPort()"); - return new UriIsDefaultPortAssertion(source.Context, true); - } - - public static UriUserEscapedAssertion UserEscaped(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".UserEscaped()"); - return new UriUserEscapedAssertion(source.Context, false); - } - - public static UriUserEscapedAssertion IsNotUserEscaped(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotUserEscaped()"); - return new UriUserEscapedAssertion(source.Context, true); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/VersionAssertionGeneratorTests.GeneratesVersionAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/VersionAssertionGeneratorTests.GeneratesVersionAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/VersionAssertionGeneratorTests.GeneratesVersionAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/VersionAssertionGeneratorTests.GeneratesVersionAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/VersionAssertionGeneratorTests.GeneratesVersionAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/VersionAssertionGeneratorTests.GeneratesVersionAssertions.DotNet9_0.verified.txt deleted file mode 100644 index 8a2ea6a8d48..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/VersionAssertionGeneratorTests.GeneratesVersionAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,306 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsMajorVersion -/// -public sealed class Version_IsMajorVersion_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Version_IsMajorVersion_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value != null && value!.Minor == 0 && (value!.Build <= 0 || value!.Build == -1) && (value!.Revision <= 0 || value!.Revision == -1); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be a major version (x.0.0.0)"; - } -} - -/// -/// Generated assertion for IsNotMajorVersion -/// -public sealed class Version_IsNotMajorVersion_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Version_IsNotMajorVersion_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value != null && (value!.Minor != 0 || (value!.Build > 0 && value!.Build != -1) || (value!.Revision > 0 && value!.Revision != -1)); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to not be a major version"; - } -} - -/// -/// Generated assertion for HasBuildNumber -/// -public sealed class Version_HasBuildNumber_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Version_HasBuildNumber_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.Build >= 0; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have a build number"; - } -} - -/// -/// Generated assertion for HasNoBuildNumber -/// -public sealed class Version_HasNoBuildNumber_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Version_HasNoBuildNumber_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.Build == -1; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to not have a build number"; - } -} - -/// -/// Generated assertion for HasRevisionNumber -/// -public sealed class Version_HasRevisionNumber_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Version_HasRevisionNumber_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.Revision >= 0; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have a revision number"; - } -} - -/// -/// Generated assertion for HasNoRevisionNumber -/// -public sealed class Version_HasNoRevisionNumber_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Version_HasNoRevisionNumber_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.Revision == -1; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to not have a revision number"; - } -} - -public static partial class VersionAssertionExtensions -{ - /// - /// Generated extension method for IsMajorVersion - /// - public static Version_IsMajorVersion_Assertion IsMajorVersion(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsMajorVersion()"); - return new Version_IsMajorVersion_Assertion(source.Context); - } - - /// - /// Generated extension method for IsNotMajorVersion - /// - public static Version_IsNotMajorVersion_Assertion IsNotMajorVersion(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotMajorVersion()"); - return new Version_IsNotMajorVersion_Assertion(source.Context); - } - - /// - /// Generated extension method for HasBuildNumber - /// - public static Version_HasBuildNumber_Assertion HasBuildNumber(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".HasBuildNumber()"); - return new Version_HasBuildNumber_Assertion(source.Context); - } - - /// - /// Generated extension method for HasNoBuildNumber - /// - public static Version_HasNoBuildNumber_Assertion HasNoBuildNumber(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".HasNoBuildNumber()"); - return new Version_HasNoBuildNumber_Assertion(source.Context); - } - - /// - /// Generated extension method for HasRevisionNumber - /// - public static Version_HasRevisionNumber_Assertion HasRevisionNumber(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".HasRevisionNumber()"); - return new Version_HasRevisionNumber_Assertion(source.Context); - } - - /// - /// Generated extension method for HasNoRevisionNumber - /// - public static Version_HasNoRevisionNumber_Assertion HasNoRevisionNumber(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".HasNoRevisionNumber()"); - return new Version_HasNoRevisionNumber_Assertion(source.Context); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/WeakReferenceAssertionGeneratorTests.GeneratesWeakReferenceAssertions.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/WeakReferenceAssertionGeneratorTests.GeneratesWeakReferenceAssertions.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/WeakReferenceAssertionGeneratorTests.GeneratesWeakReferenceAssertions.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/WeakReferenceAssertionGeneratorTests.GeneratesWeakReferenceAssertions.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/WeakReferenceAssertionGeneratorTests.GeneratesWeakReferenceAssertions.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/WeakReferenceAssertionGeneratorTests.GeneratesWeakReferenceAssertions.DotNet9_0.verified.txt deleted file mode 100644 index e61820f053f..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/WeakReferenceAssertionGeneratorTests.GeneratesWeakReferenceAssertions.DotNet9_0.verified.txt +++ /dev/null @@ -1,114 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Conditions; - -namespace TUnit.Assertions.Extensions; - -public class WeakReferenceIsAliveAssertion : Assertion -{ - private readonly bool _negated; - - public WeakReferenceIsAliveAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.IsAlive; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsAlive")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}be alive"; - } -} - -public class WeakReferenceTrackResurrectionAssertion : Assertion -{ - private readonly bool _negated; - - public WeakReferenceTrackResurrectionAssertion(AssertionContext context, bool negated = false) - : base(context) - { - _negated = negated; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var actualValue = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (actualValue is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = actualValue.TrackResurrection; - var condition = _negated ? result : !result; - return Task.FromResult(AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy TrackResurrection")); - } - - protected override string GetExpectation() - { - return $"to {(_negated ? "not " : "")}track resurrection"; - } -} - -public static partial class WeakReferenceAssertionExtensions -{ - public static WeakReferenceIsAliveAssertion IsAlive(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsAlive()"); - return new WeakReferenceIsAliveAssertion(source.Context, false); - } - - public static WeakReferenceIsAliveAssertion IsNotAlive(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsNotAlive()"); - return new WeakReferenceIsAliveAssertion(source.Context, true); - } - - public static WeakReferenceTrackResurrectionAssertion TrackResurrection(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".TrackResurrection()"); - return new WeakReferenceTrackResurrectionAssertion(source.Context, false); - } - - public static WeakReferenceTrackResurrectionAssertion DoesNotTrackResurrection(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".DoesNotTrackResurrection()"); - return new WeakReferenceTrackResurrectionAssertion(source.Context, true); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AssertionResultOfTMethod.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AssertionResultOfTMethodAssertion_ProducesNoCS1591.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AssertionResultOfTMethod.DotNet9_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AssertionResultOfTMethodAssertion_ProducesNoCS1591.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AssertionResultOfTMethodAssertion_ProducesNoCS1591.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AssertionResultOfTMethodAssertion_ProducesNoCS1591.DotNet8_0.verified.txt deleted file mode 100644 index 0ddf32fd053..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AssertionResultOfTMethodAssertion_ProducesNoCS1591.DotNet8_0.verified.txt +++ /dev/null @@ -1,85 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for ContainsMatch -/// -public sealed class IEnumerableString_ContainsMatch_String_Assertion : Assertion> -{ - private readonly string _needle; - private string? _result; - - public IEnumerableString_ContainsMatch_String_Assertion(AssertionContext> context, string needle) - : base(context) - { - _needle = needle; - } - - protected override Task CheckAsync(EvaluationMetadata> metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var typedResult = value!.ContainsMatch(_needle); - if (typedResult.IsPassed) - { - _result = typedResult.Value; - } - return Task.FromResult(typedResult.IsPassed - ? AssertionResult.Passed - : AssertionResult.Failed(typedResult.Message)); - } - - protected override string GetExpectation() - { - return $"to contain '{_needle}'"; - } - - public new System.Runtime.CompilerServices.TaskAwaiter GetAwaiter() - { - return ExecuteAndReturnResultAsync().GetAwaiter(); - } - - private async Task ExecuteAndReturnResultAsync() - { - await AssertAsync(); - return _result!; - } -} - -public static partial class AssertionResultOfTMethodExtensions -{ - /// - /// Generated extension method for ContainsMatch - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static IEnumerableString_ContainsMatch_String_Assertion ContainsMatch(this IAssertionSource source, string needle, [CallerArgumentExpression(nameof(needle))] string? needleExpression = null) - where TActual : System.Collections.Generic.IEnumerable - { - source.Context.ExpressionBuilder.Append($".ContainsMatch({needleExpression})"); - return new IEnumerableString_ContainsMatch_String_Assertion(source.Context.Map>(static x => (System.Collections.Generic.IEnumerable?)x), needle); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AssertionResultOfTMethodAssertion_ProducesNoCS1591.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AssertionResultOfTMethodAssertion_ProducesNoCS1591.DotNet9_0.verified.txt deleted file mode 100644 index 0ddf32fd053..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AssertionResultOfTMethodAssertion_ProducesNoCS1591.DotNet9_0.verified.txt +++ /dev/null @@ -1,85 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for ContainsMatch -/// -public sealed class IEnumerableString_ContainsMatch_String_Assertion : Assertion> -{ - private readonly string _needle; - private string? _result; - - public IEnumerableString_ContainsMatch_String_Assertion(AssertionContext> context, string needle) - : base(context) - { - _needle = needle; - } - - protected override Task CheckAsync(EvaluationMetadata> metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var typedResult = value!.ContainsMatch(_needle); - if (typedResult.IsPassed) - { - _result = typedResult.Value; - } - return Task.FromResult(typedResult.IsPassed - ? AssertionResult.Passed - : AssertionResult.Failed(typedResult.Message)); - } - - protected override string GetExpectation() - { - return $"to contain '{_needle}'"; - } - - public new System.Runtime.CompilerServices.TaskAwaiter GetAwaiter() - { - return ExecuteAndReturnResultAsync().GetAwaiter(); - } - - private async Task ExecuteAndReturnResultAsync() - { - await AssertAsync(); - return _result!; - } -} - -public static partial class AssertionResultOfTMethodExtensions -{ - /// - /// Generated extension method for ContainsMatch - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static IEnumerableString_ContainsMatch_String_Assertion ContainsMatch(this IAssertionSource source, string needle, [CallerArgumentExpression(nameof(needle))] string? needleExpression = null) - where TActual : System.Collections.Generic.IEnumerable - { - source.Context.ExpressionBuilder.Append($".ContainsMatch({needleExpression})"); - return new IEnumerableString_ContainsMatch_String_Assertion(source.Context.Map>(static x => (System.Collections.Generic.IEnumerable?)x), needle); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncBoolMethod.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AsyncBoolAssertion_GeneratesValidCSharp.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.AsyncBoolMethod.DotNet9_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AsyncBoolAssertion_GeneratesValidCSharp.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AsyncBoolAssertion_GeneratesValidCSharp.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AsyncBoolAssertion_GeneratesValidCSharp.DotNet9_0.verified.txt deleted file mode 100644 index c88c9c60ae4..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AsyncBoolAssertion_GeneratesValidCSharp.DotNet9_0.verified.txt +++ /dev/null @@ -1,103 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsPositiveAsync -/// -public sealed class Int_IsPositiveAsync_Assertion : Assertion -{ - public Int_IsPositiveAsync_Assertion(AssertionContext context) - : base(context) - { - } - - protected override async Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return AssertionResult.Failed($"threw {exception.GetType().FullName}"); - } - - var result = await value!.IsPositiveAsync(); - return result - ? AssertionResult.Passed - : AssertionResult.Failed($"found {value}"); - } - - protected override string GetExpectation() - { - return "to satisfy IsPositiveAsync"; - } -} - -/// -/// Generated assertion for IsGreaterThanAsync -/// -public sealed class Int_IsGreaterThanAsync_Int_Assertion : Assertion -{ - private readonly int _threshold; - - public Int_IsGreaterThanAsync_Int_Assertion(AssertionContext context, int threshold) - : base(context) - { - _threshold = threshold; - } - - protected override async Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return AssertionResult.Failed($"threw {exception.GetType().FullName}"); - } - - var result = await value!.IsGreaterThanAsync(_threshold); - return result - ? AssertionResult.Passed - : AssertionResult.Failed($"found {value}"); - } - - protected override string GetExpectation() - { - return $"to satisfy IsGreaterThanAsync({_threshold})"; - } -} - -public static partial class AsyncBoolAssertionExtensions -{ - /// - /// Generated extension method for IsPositiveAsync - /// - public static Int_IsPositiveAsync_Assertion IsPositiveAsync(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsPositiveAsync()"); - return new Int_IsPositiveAsync_Assertion(source.Context); - } - - /// - /// Generated extension method for IsGreaterThanAsync - /// - public static Int_IsGreaterThanAsync_Int_Assertion IsGreaterThanAsync(this IAssertionSource source, int threshold, [CallerArgumentExpression(nameof(threshold))] string? thresholdExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsGreaterThanAsync({thresholdExpression})"); - return new Int_IsGreaterThanAsync_Int_Assertion(source.Context, threshold); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AsyncBoolAssertion_GeneratesValidCSharp.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AsyncBoolAssertion_ProducesNoCS1591.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AsyncBoolAssertion_GeneratesValidCSharp.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AsyncBoolAssertion_ProducesNoCS1591.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AsyncBoolAssertion_ProducesNoCS1591.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AsyncBoolAssertion_ProducesNoCS1591.DotNet8_0.verified.txt deleted file mode 100644 index c88c9c60ae4..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AsyncBoolAssertion_ProducesNoCS1591.DotNet8_0.verified.txt +++ /dev/null @@ -1,103 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsPositiveAsync -/// -public sealed class Int_IsPositiveAsync_Assertion : Assertion -{ - public Int_IsPositiveAsync_Assertion(AssertionContext context) - : base(context) - { - } - - protected override async Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return AssertionResult.Failed($"threw {exception.GetType().FullName}"); - } - - var result = await value!.IsPositiveAsync(); - return result - ? AssertionResult.Passed - : AssertionResult.Failed($"found {value}"); - } - - protected override string GetExpectation() - { - return "to satisfy IsPositiveAsync"; - } -} - -/// -/// Generated assertion for IsGreaterThanAsync -/// -public sealed class Int_IsGreaterThanAsync_Int_Assertion : Assertion -{ - private readonly int _threshold; - - public Int_IsGreaterThanAsync_Int_Assertion(AssertionContext context, int threshold) - : base(context) - { - _threshold = threshold; - } - - protected override async Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return AssertionResult.Failed($"threw {exception.GetType().FullName}"); - } - - var result = await value!.IsGreaterThanAsync(_threshold); - return result - ? AssertionResult.Passed - : AssertionResult.Failed($"found {value}"); - } - - protected override string GetExpectation() - { - return $"to satisfy IsGreaterThanAsync({_threshold})"; - } -} - -public static partial class AsyncBoolAssertionExtensions -{ - /// - /// Generated extension method for IsPositiveAsync - /// - public static Int_IsPositiveAsync_Assertion IsPositiveAsync(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsPositiveAsync()"); - return new Int_IsPositiveAsync_Assertion(source.Context); - } - - /// - /// Generated extension method for IsGreaterThanAsync - /// - public static Int_IsGreaterThanAsync_Int_Assertion IsGreaterThanAsync(this IAssertionSource source, int threshold, [CallerArgumentExpression(nameof(threshold))] string? thresholdExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsGreaterThanAsync({thresholdExpression})"); - return new Int_IsGreaterThanAsync_Int_Assertion(source.Context, threshold); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AsyncBoolAssertion_ProducesNoCS1591.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AsyncBoolAssertion_ProducesNoCS1591.DotNet9_0.verified.txt deleted file mode 100644 index c88c9c60ae4..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.AsyncBoolAssertion_ProducesNoCS1591.DotNet9_0.verified.txt +++ /dev/null @@ -1,103 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsPositiveAsync -/// -public sealed class Int_IsPositiveAsync_Assertion : Assertion -{ - public Int_IsPositiveAsync_Assertion(AssertionContext context) - : base(context) - { - } - - protected override async Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return AssertionResult.Failed($"threw {exception.GetType().FullName}"); - } - - var result = await value!.IsPositiveAsync(); - return result - ? AssertionResult.Passed - : AssertionResult.Failed($"found {value}"); - } - - protected override string GetExpectation() - { - return "to satisfy IsPositiveAsync"; - } -} - -/// -/// Generated assertion for IsGreaterThanAsync -/// -public sealed class Int_IsGreaterThanAsync_Int_Assertion : Assertion -{ - private readonly int _threshold; - - public Int_IsGreaterThanAsync_Int_Assertion(AssertionContext context, int threshold) - : base(context) - { - _threshold = threshold; - } - - protected override async Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return AssertionResult.Failed($"threw {exception.GetType().FullName}"); - } - - var result = await value!.IsGreaterThanAsync(_threshold); - return result - ? AssertionResult.Passed - : AssertionResult.Failed($"found {value}"); - } - - protected override string GetExpectation() - { - return $"to satisfy IsGreaterThanAsync({_threshold})"; - } -} - -public static partial class AsyncBoolAssertionExtensions -{ - /// - /// Generated extension method for IsPositiveAsync - /// - public static Int_IsPositiveAsync_Assertion IsPositiveAsync(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsPositiveAsync()"); - return new Int_IsPositiveAsync_Assertion(source.Context); - } - - /// - /// Generated extension method for IsGreaterThanAsync - /// - public static Int_IsGreaterThanAsync_Int_Assertion IsGreaterThanAsync(this IAssertionSource source, int threshold, [CallerArgumentExpression(nameof(threshold))] string? thresholdExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsGreaterThanAsync({thresholdExpression})"); - return new Int_IsGreaterThanAsync_Int_Assertion(source.Context, threshold); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.BoolMethod.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.BoolMethodAssertion_ProducesNoCS1591.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.BoolMethod.DotNet9_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.BoolMethodAssertion_ProducesNoCS1591.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.BoolMethodAssertion_ProducesNoCS1591.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.BoolMethodAssertion_ProducesNoCS1591.DotNet8_0.verified.txt deleted file mode 100644 index c48c4338fc0..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.BoolMethodAssertion_ProducesNoCS1591.DotNet8_0.verified.txt +++ /dev/null @@ -1,107 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsPositive -/// -public sealed class Int_IsPositive_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Int_IsPositive_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsPositive(); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to satisfy IsPositive"; - } -} - -/// -/// Generated assertion for IsGreaterThan -/// -public sealed class Int_IsGreaterThan_Int_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly int _threshold; - - public Int_IsGreaterThan_Int_Assertion(AssertionContext context, int threshold) - : base(context) - { - _threshold = threshold; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsGreaterThan(_threshold); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to satisfy IsGreaterThan({_threshold})"; - } -} - -public static partial class BoolMethodAssertionExtensions -{ - /// - /// Generated extension method for IsPositive - /// - public static Int_IsPositive_Assertion IsPositive(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsPositive()"); - return new Int_IsPositive_Assertion(source.Context); - } - - /// - /// Generated extension method for IsGreaterThan - /// - public static Int_IsGreaterThan_Int_Assertion IsGreaterThan(this IAssertionSource source, int threshold, [CallerArgumentExpression(nameof(threshold))] string? thresholdExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsGreaterThan({thresholdExpression})"); - return new Int_IsGreaterThan_Int_Assertion(source.Context, threshold); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.BoolMethodAssertion_ProducesNoCS1591.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.BoolMethodAssertion_ProducesNoCS1591.DotNet9_0.verified.txt deleted file mode 100644 index c48c4338fc0..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.BoolMethodAssertion_ProducesNoCS1591.DotNet9_0.verified.txt +++ /dev/null @@ -1,107 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsPositive -/// -public sealed class Int_IsPositive_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Int_IsPositive_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsPositive(); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to satisfy IsPositive"; - } -} - -/// -/// Generated assertion for IsGreaterThan -/// -public sealed class Int_IsGreaterThan_Int_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly int _threshold; - - public Int_IsGreaterThan_Int_Assertion(AssertionContext context, int threshold) - : base(context) - { - _threshold = threshold; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsGreaterThan(_threshold); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to satisfy IsGreaterThan({_threshold})"; - } -} - -public static partial class BoolMethodAssertionExtensions -{ - /// - /// Generated extension method for IsPositive - /// - public static Int_IsPositive_Assertion IsPositive(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsPositive()"); - return new Int_IsPositive_Assertion(source.Context); - } - - /// - /// Generated extension method for IsGreaterThan - /// - public static Int_IsGreaterThan_Int_Assertion IsGreaterThan(this IAssertionSource source, int threshold, [CallerArgumentExpression(nameof(threshold))] string? thresholdExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsGreaterThan({thresholdExpression})"); - return new Int_IsGreaterThan_Int_Assertion(source.Context, threshold); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.DocumentedMethods.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.DocumentedMethodAssertion_InheritdocCrefsResolveFromPackage.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.DocumentedMethods.DotNet9_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.DocumentedMethodAssertion_InheritdocCrefsResolveFromPackage.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.DocumentedMethodAssertion_InheritdocCrefsResolveFromPackage.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.DocumentedMethodAssertion_InheritdocCrefsResolveFromPackage.DotNet9_0.verified.txt deleted file mode 100644 index fb346ee4426..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.DocumentedMethodAssertion_InheritdocCrefsResolveFromPackage.DotNet9_0.verified.txt +++ /dev/null @@ -1,419 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsMultipleOf -/// -public sealed class Int_IsMultipleOf_Int_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly int _factor; - - public Int_IsMultipleOf_Int_Assertion(AssertionContext context, int factor) - : base(context) - { - _factor = factor; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsMultipleOf(_factor); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to be a multiple of {_factor}"; - } -} - -/// -/// Generated assertion for IsMultipleOf -/// -public sealed class Long_IsMultipleOf_Long_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly long _factor; - - public Long_IsMultipleOf_Long_Assertion(AssertionContext context, long factor) - : base(context) - { - _factor = factor; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsMultipleOf(_factor); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to be a multiple of {_factor}"; - } -} - -/// -/// Generated assertion for IsSameValueAs -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class T_IsSameValueAs_T_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly T _other; - - public T_IsSameValueAs_T_Assertion(AssertionContext context, T other) - : base(context) - { - _other = other; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsSameValueAs(_other); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to equal {_other}"; - } -} - -/// -/// Generated assertion for IsOdd -/// -public sealed class Int_IsOdd_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Int_IsOdd_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsOdd(); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be odd"; - } -} - -/// -/// Generated assertion for IsPowerOfTwo -/// -public sealed class Int_IsPowerOfTwo_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Int_IsPowerOfTwo_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value > 0 && (value & (value - 1)) == 0; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be a power of two"; - } -} - -public static partial class DocumentedMethodAssertions -{ - /// - public static Int_IsMultipleOf_Int_Assertion IsMultipleOf(this IAssertionSource source, int factor, [CallerArgumentExpression(nameof(factor))] string? factorExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsMultipleOf({factorExpression})"); - return new Int_IsMultipleOf_Int_Assertion(source.Context, factor); - } - - /// - public static Long_IsMultipleOf_Long_Assertion IsMultipleOf(this IAssertionSource source, long factor, [CallerArgumentExpression(nameof(factor))] string? factorExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsMultipleOf({factorExpression})"); - return new Long_IsMultipleOf_Long_Assertion(source.Context, factor); - } - - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static T_IsSameValueAs_T_Assertion IsSameValueAs(this IAssertionSource source, T other, [CallerArgumentExpression(nameof(other))] string? otherExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsSameValueAs({otherExpression})"); - return new T_IsSameValueAs_T_Assertion(source.Context, other); - } - - /// - /// Generated extension method for IsOdd - /// - public static Int_IsOdd_Assertion IsOdd(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsOdd()"); - return new Int_IsOdd_Assertion(source.Context); - } - - /// - /// Generated extension method for IsPowerOfTwo - /// - public static Int_IsPowerOfTwo_Assertion IsPowerOfTwo(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsPowerOfTwo()"); - return new Int_IsPowerOfTwo_Assertion(source.Context); - } - -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsDivisibleByThree -/// -public sealed class Int_IsDivisibleByThree_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Int_IsDivisibleByThree_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value % 3 == 0; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be divisible by three"; - } -} - -public static partial class NestedAssertions -{ - /// - public static Int_IsDivisibleByThree_Assertion IsDivisibleByThree(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsDivisibleByThree()"); - return new Int_IsDivisibleByThree_Assertion(source.Context); - } - -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsUpperCase -/// -public sealed class String_IsUpperCase_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public String_IsUpperCase_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.ToUpperInvariant() == value; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be upper case"; - } -} - -public static partial class InternalDocumentedAssertions -{ - /// - public static String_IsUpperCase_Assertion IsUpperCase(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsUpperCase()"); - return new String_IsUpperCase_Assertion(source.Context); - } - -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsTrimmed -/// -public sealed class String_IsTrimmed_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public String_IsTrimmed_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.Trim() == value; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have no leading or trailing white space"; - } -} - -public static partial class FileLocalDocumentedAssertions -{ - /// - public static String_IsTrimmed_Assertion IsTrimmed(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsTrimmed()"); - return new String_IsTrimmed_Assertion(source.Context); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.DocumentedMethodAssertion_InheritdocCrefsResolveFromPackage.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.DocumentedMethodAssertion_InheritdocCrefsResolveToSourceMethods.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.DocumentedMethodAssertion_InheritdocCrefsResolveFromPackage.DotNet8_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.DocumentedMethodAssertion_InheritdocCrefsResolveToSourceMethods.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.DocumentedMethodAssertion_InheritdocCrefsResolveToSourceMethods.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.DocumentedMethodAssertion_InheritdocCrefsResolveToSourceMethods.DotNet8_0.verified.txt deleted file mode 100644 index fb346ee4426..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.DocumentedMethodAssertion_InheritdocCrefsResolveToSourceMethods.DotNet8_0.verified.txt +++ /dev/null @@ -1,419 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsMultipleOf -/// -public sealed class Int_IsMultipleOf_Int_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly int _factor; - - public Int_IsMultipleOf_Int_Assertion(AssertionContext context, int factor) - : base(context) - { - _factor = factor; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsMultipleOf(_factor); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to be a multiple of {_factor}"; - } -} - -/// -/// Generated assertion for IsMultipleOf -/// -public sealed class Long_IsMultipleOf_Long_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly long _factor; - - public Long_IsMultipleOf_Long_Assertion(AssertionContext context, long factor) - : base(context) - { - _factor = factor; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsMultipleOf(_factor); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to be a multiple of {_factor}"; - } -} - -/// -/// Generated assertion for IsSameValueAs -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class T_IsSameValueAs_T_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly T _other; - - public T_IsSameValueAs_T_Assertion(AssertionContext context, T other) - : base(context) - { - _other = other; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsSameValueAs(_other); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to equal {_other}"; - } -} - -/// -/// Generated assertion for IsOdd -/// -public sealed class Int_IsOdd_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Int_IsOdd_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsOdd(); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be odd"; - } -} - -/// -/// Generated assertion for IsPowerOfTwo -/// -public sealed class Int_IsPowerOfTwo_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Int_IsPowerOfTwo_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value > 0 && (value & (value - 1)) == 0; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be a power of two"; - } -} - -public static partial class DocumentedMethodAssertions -{ - /// - public static Int_IsMultipleOf_Int_Assertion IsMultipleOf(this IAssertionSource source, int factor, [CallerArgumentExpression(nameof(factor))] string? factorExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsMultipleOf({factorExpression})"); - return new Int_IsMultipleOf_Int_Assertion(source.Context, factor); - } - - /// - public static Long_IsMultipleOf_Long_Assertion IsMultipleOf(this IAssertionSource source, long factor, [CallerArgumentExpression(nameof(factor))] string? factorExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsMultipleOf({factorExpression})"); - return new Long_IsMultipleOf_Long_Assertion(source.Context, factor); - } - - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static T_IsSameValueAs_T_Assertion IsSameValueAs(this IAssertionSource source, T other, [CallerArgumentExpression(nameof(other))] string? otherExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsSameValueAs({otherExpression})"); - return new T_IsSameValueAs_T_Assertion(source.Context, other); - } - - /// - /// Generated extension method for IsOdd - /// - public static Int_IsOdd_Assertion IsOdd(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsOdd()"); - return new Int_IsOdd_Assertion(source.Context); - } - - /// - /// Generated extension method for IsPowerOfTwo - /// - public static Int_IsPowerOfTwo_Assertion IsPowerOfTwo(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsPowerOfTwo()"); - return new Int_IsPowerOfTwo_Assertion(source.Context); - } - -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsDivisibleByThree -/// -public sealed class Int_IsDivisibleByThree_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Int_IsDivisibleByThree_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value % 3 == 0; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be divisible by three"; - } -} - -public static partial class NestedAssertions -{ - /// - public static Int_IsDivisibleByThree_Assertion IsDivisibleByThree(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsDivisibleByThree()"); - return new Int_IsDivisibleByThree_Assertion(source.Context); - } - -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsUpperCase -/// -public sealed class String_IsUpperCase_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public String_IsUpperCase_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.ToUpperInvariant() == value; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be upper case"; - } -} - -public static partial class InternalDocumentedAssertions -{ - /// - public static String_IsUpperCase_Assertion IsUpperCase(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsUpperCase()"); - return new String_IsUpperCase_Assertion(source.Context); - } - -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsTrimmed -/// -public sealed class String_IsTrimmed_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public String_IsTrimmed_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.Trim() == value; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have no leading or trailing white space"; - } -} - -public static partial class FileLocalDocumentedAssertions -{ - /// - public static String_IsTrimmed_Assertion IsTrimmed(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsTrimmed()"); - return new String_IsTrimmed_Assertion(source.Context); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.DocumentedMethodAssertion_InheritdocCrefsResolveToSourceMethods.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.DocumentedMethodAssertion_InheritdocCrefsResolveToSourceMethods.DotNet9_0.verified.txt deleted file mode 100644 index fb346ee4426..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.DocumentedMethodAssertion_InheritdocCrefsResolveToSourceMethods.DotNet9_0.verified.txt +++ /dev/null @@ -1,419 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsMultipleOf -/// -public sealed class Int_IsMultipleOf_Int_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly int _factor; - - public Int_IsMultipleOf_Int_Assertion(AssertionContext context, int factor) - : base(context) - { - _factor = factor; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsMultipleOf(_factor); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to be a multiple of {_factor}"; - } -} - -/// -/// Generated assertion for IsMultipleOf -/// -public sealed class Long_IsMultipleOf_Long_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly long _factor; - - public Long_IsMultipleOf_Long_Assertion(AssertionContext context, long factor) - : base(context) - { - _factor = factor; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsMultipleOf(_factor); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to be a multiple of {_factor}"; - } -} - -/// -/// Generated assertion for IsSameValueAs -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class T_IsSameValueAs_T_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly T _other; - - public T_IsSameValueAs_T_Assertion(AssertionContext context, T other) - : base(context) - { - _other = other; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsSameValueAs(_other); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to equal {_other}"; - } -} - -/// -/// Generated assertion for IsOdd -/// -public sealed class Int_IsOdd_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Int_IsOdd_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsOdd(); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be odd"; - } -} - -/// -/// Generated assertion for IsPowerOfTwo -/// -public sealed class Int_IsPowerOfTwo_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Int_IsPowerOfTwo_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value > 0 && (value & (value - 1)) == 0; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be a power of two"; - } -} - -public static partial class DocumentedMethodAssertions -{ - /// - public static Int_IsMultipleOf_Int_Assertion IsMultipleOf(this IAssertionSource source, int factor, [CallerArgumentExpression(nameof(factor))] string? factorExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsMultipleOf({factorExpression})"); - return new Int_IsMultipleOf_Int_Assertion(source.Context, factor); - } - - /// - public static Long_IsMultipleOf_Long_Assertion IsMultipleOf(this IAssertionSource source, long factor, [CallerArgumentExpression(nameof(factor))] string? factorExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsMultipleOf({factorExpression})"); - return new Long_IsMultipleOf_Long_Assertion(source.Context, factor); - } - - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static T_IsSameValueAs_T_Assertion IsSameValueAs(this IAssertionSource source, T other, [CallerArgumentExpression(nameof(other))] string? otherExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsSameValueAs({otherExpression})"); - return new T_IsSameValueAs_T_Assertion(source.Context, other); - } - - /// - /// Generated extension method for IsOdd - /// - public static Int_IsOdd_Assertion IsOdd(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsOdd()"); - return new Int_IsOdd_Assertion(source.Context); - } - - /// - /// Generated extension method for IsPowerOfTwo - /// - public static Int_IsPowerOfTwo_Assertion IsPowerOfTwo(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsPowerOfTwo()"); - return new Int_IsPowerOfTwo_Assertion(source.Context); - } - -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsDivisibleByThree -/// -public sealed class Int_IsDivisibleByThree_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Int_IsDivisibleByThree_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value % 3 == 0; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be divisible by three"; - } -} - -public static partial class NestedAssertions -{ - /// - public static Int_IsDivisibleByThree_Assertion IsDivisibleByThree(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsDivisibleByThree()"); - return new Int_IsDivisibleByThree_Assertion(source.Context); - } - -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsUpperCase -/// -public sealed class String_IsUpperCase_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public String_IsUpperCase_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.ToUpperInvariant() == value; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be upper case"; - } -} - -public static partial class InternalDocumentedAssertions -{ - /// - public static String_IsUpperCase_Assertion IsUpperCase(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsUpperCase()"); - return new String_IsUpperCase_Assertion(source.Context); - } - -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsTrimmed -/// -public sealed class String_IsTrimmed_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public String_IsTrimmed_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - if (value is null) - { - return Task.FromResult(AssertionResult.Failed("Actual value is null")); - } - - var result = value!.Trim() == value; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to have no leading or trailing white space"; - } -} - -public static partial class FileLocalDocumentedAssertions -{ - /// - public static String_IsTrimmed_Assertion IsTrimmed(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsTrimmed()"); - return new String_IsTrimmed_Assertion(source.Context); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.FileScopedClassWithInlining.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.FileScopedClassAssertion_ProducesNoCS1591.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.FileScopedClassWithInlining.DotNet9_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.FileScopedClassAssertion_ProducesNoCS1591.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.FileScopedClassAssertion_ProducesNoCS1591.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.FileScopedClassAssertion_ProducesNoCS1591.DotNet8_0.verified.txt deleted file mode 100644 index 29adf77f7bd..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.FileScopedClassAssertion_ProducesNoCS1591.DotNet8_0.verified.txt +++ /dev/null @@ -1,209 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsTrue -/// -public sealed class Bool_IsTrue_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Bool_IsTrue_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value == true; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be true"; - } -} - -/// -/// Generated assertion for IsFalse -/// -public sealed class Bool_IsFalse_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Bool_IsFalse_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value == false; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be false"; - } -} - -public static partial class FileScopedBoolAssertions -{ - /// - /// Generated extension method for IsTrue - /// - public static Bool_IsTrue_Assertion IsTrue(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsTrue()"); - return new Bool_IsTrue_Assertion(source.Context); - } - - /// - /// Generated extension method for IsFalse - /// - public static Bool_IsFalse_Assertion IsFalse(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsFalse()"); - return new Bool_IsFalse_Assertion(source.Context); - } - -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsPositive -/// -public sealed class Int_IsPositive_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Int_IsPositive_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value > 0; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be positive"; - } -} - -/// -/// Generated assertion for IsGreaterThan -/// -public sealed class Int_IsGreaterThan_Int_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly int _threshold; - - public Int_IsGreaterThan_Int_Assertion(AssertionContext context, int threshold) - : base(context) - { - _threshold = threshold; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value > _threshold; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to be greater than {_threshold}"; - } -} - -public static partial class FileScopedIntAssertions -{ - /// - /// Generated extension method for IsPositive - /// - public static Int_IsPositive_Assertion IsPositive(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsPositive()"); - return new Int_IsPositive_Assertion(source.Context); - } - - /// - /// Generated extension method for IsGreaterThan - /// - public static Int_IsGreaterThan_Int_Assertion IsGreaterThan(this IAssertionSource source, int threshold, [CallerArgumentExpression(nameof(threshold))] string? thresholdExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsGreaterThan({thresholdExpression})"); - return new Int_IsGreaterThan_Int_Assertion(source.Context, threshold); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.FileScopedClassAssertion_ProducesNoCS1591.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.FileScopedClassAssertion_ProducesNoCS1591.DotNet9_0.verified.txt deleted file mode 100644 index 29adf77f7bd..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.FileScopedClassAssertion_ProducesNoCS1591.DotNet9_0.verified.txt +++ /dev/null @@ -1,209 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsTrue -/// -public sealed class Bool_IsTrue_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Bool_IsTrue_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value == true; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be true"; - } -} - -/// -/// Generated assertion for IsFalse -/// -public sealed class Bool_IsFalse_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Bool_IsFalse_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value == false; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be false"; - } -} - -public static partial class FileScopedBoolAssertions -{ - /// - /// Generated extension method for IsTrue - /// - public static Bool_IsTrue_Assertion IsTrue(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsTrue()"); - return new Bool_IsTrue_Assertion(source.Context); - } - - /// - /// Generated extension method for IsFalse - /// - public static Bool_IsFalse_Assertion IsFalse(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsFalse()"); - return new Bool_IsFalse_Assertion(source.Context); - } - -} -, - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsPositive -/// -public sealed class Int_IsPositive_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - public Int_IsPositive_Assertion(AssertionContext context) - : base(context) - { - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value > 0; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return "to be positive"; - } -} - -/// -/// Generated assertion for IsGreaterThan -/// -public sealed class Int_IsGreaterThan_Int_Assertion : Assertion -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly int _threshold; - - public Int_IsGreaterThan_Int_Assertion(AssertionContext context, int threshold) - : base(context) - { - _threshold = threshold; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value > _threshold; - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"to be greater than {_threshold}"; - } -} - -public static partial class FileScopedIntAssertions -{ - /// - /// Generated extension method for IsPositive - /// - public static Int_IsPositive_Assertion IsPositive(this IAssertionSource source) - { - source.Context.ExpressionBuilder.Append(".IsPositive()"); - return new Int_IsPositive_Assertion(source.Context); - } - - /// - /// Generated extension method for IsGreaterThan - /// - public static Int_IsGreaterThan_Int_Assertion IsGreaterThan(this IAssertionSource source, int threshold, [CallerArgumentExpression(nameof(threshold))] string? thresholdExpression = null) - { - source.Context.ExpressionBuilder.Append($".IsGreaterThan({thresholdExpression})"); - return new Int_IsGreaterThan_Int_Assertion(source.Context, threshold); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithComparableConstraint.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.MethodWithComparableConstraint_ProducesNoCS1591.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Assertions.SourceGenerator.Tests/MethodAssertionGeneratorTests.MethodWithComparableConstraint.DotNet9_0.verified.txt rename to tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.MethodWithComparableConstraint_ProducesNoCS1591.DotNet11_0.verified.txt diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.MethodWithComparableConstraint_ProducesNoCS1591.DotNet8_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.MethodWithComparableConstraint_ProducesNoCS1591.DotNet8_0.verified.txt deleted file mode 100644 index 000fdca1ec8..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.MethodWithComparableConstraint_ProducesNoCS1591.DotNet8_0.verified.txt +++ /dev/null @@ -1,120 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsGreaterThan -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class Int_IsGreaterThan_T_Assertion : Assertion - where T : System.IComparable -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly T _other; - - public Int_IsGreaterThan_T_Assertion(AssertionContext context, T other) - : base(context) - { - _other = other; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsGreaterThan(_other); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"be greater than {0}"; - } -} - -/// -/// Generated assertion for IsBetween -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class Int_IsBetween_T_T_Assertion : Assertion - where T : System.IComparable -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly T _min; - private readonly T _max; - - public Int_IsBetween_T_T_Assertion(AssertionContext context, T min, T max) - : base(context) - { - _min = min; - _max = max; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsBetween(_min, _max); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"be between {0} and {1}"; - } -} - -public static partial class ComparableConstraintExtensions -{ - /// - /// Generated extension method for IsGreaterThan - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static Int_IsGreaterThan_T_Assertion IsGreaterThan(this IAssertionSource source, T other, [CallerArgumentExpression(nameof(other))] string? otherExpression = null) - where T : System.IComparable - { - source.Context.ExpressionBuilder.Append($".IsGreaterThan({otherExpression})"); - return new Int_IsGreaterThan_T_Assertion(source.Context, other); - } - - /// - /// Generated extension method for IsBetween - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static Int_IsBetween_T_T_Assertion IsBetween(this IAssertionSource source, T min, T max, [CallerArgumentExpression(nameof(min))] string? minExpression = null, [CallerArgumentExpression(nameof(max))] string? maxExpression = null) - where T : System.IComparable - { - source.Context.ExpressionBuilder.Append($".IsBetween({minExpression}, {maxExpression})"); - return new Int_IsBetween_T_T_Assertion(source.Context, min, max); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.MethodWithComparableConstraint_ProducesNoCS1591.DotNet9_0.verified.txt b/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.MethodWithComparableConstraint_ProducesNoCS1591.DotNet9_0.verified.txt deleted file mode 100644 index 000fdca1ec8..00000000000 --- a/tests/TUnit.Assertions.SourceGenerator.Tests/XmlDocsRegressionTests.MethodWithComparableConstraint_ProducesNoCS1591.DotNet9_0.verified.txt +++ /dev/null @@ -1,120 +0,0 @@ -[ - // -#pragma warning disable -#nullable enable - -using System; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using TUnit.Assertions.Core; -using TUnit.Assertions.Tests.TestData; - -namespace TUnit.Assertions.Extensions; - -/// -/// Generated assertion for IsGreaterThan -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class Int_IsGreaterThan_T_Assertion : Assertion - where T : System.IComparable -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly T _other; - - public Int_IsGreaterThan_T_Assertion(AssertionContext context, T other) - : base(context) - { - _other = other; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsGreaterThan(_other); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"be greater than {0}"; - } -} - -/// -/// Generated assertion for IsBetween -/// -[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] -public sealed class Int_IsBetween_T_T_Assertion : Assertion - where T : System.IComparable -{ - private static readonly Task _passedTask = Task.FromResult(AssertionResult.Passed); - - private readonly T _min; - private readonly T _max; - - public Int_IsBetween_T_T_Assertion(AssertionContext context, T min, T max) - : base(context) - { - _min = min; - _max = max; - } - - protected override Task CheckAsync(EvaluationMetadata metadata) - { - var value = metadata.Value; - var exception = metadata.Exception; - - if (exception != null) - { - return Task.FromResult(AssertionResult.Failed($"threw {exception.GetType().FullName}")); - } - - var result = value!.IsBetween(_min, _max); - return result - ? _passedTask - : Task.FromResult(AssertionResult.Failed($"found {value}")); - } - - protected override string GetExpectation() - { - return $"be between {0} and {1}"; - } -} - -public static partial class ComparableConstraintExtensions -{ - /// - /// Generated extension method for IsGreaterThan - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static Int_IsGreaterThan_T_Assertion IsGreaterThan(this IAssertionSource source, T other, [CallerArgumentExpression(nameof(other))] string? otherExpression = null) - where T : System.IComparable - { - source.Context.ExpressionBuilder.Append($".IsGreaterThan({otherExpression})"); - return new Int_IsGreaterThan_T_Assertion(source.Context, other); - } - - /// - /// Generated extension method for IsBetween - /// - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Generic type parameter is only used for property access, not instantiation")] - public static Int_IsBetween_T_T_Assertion IsBetween(this IAssertionSource source, T min, T max, [CallerArgumentExpression(nameof(min))] string? minExpression = null, [CallerArgumentExpression(nameof(max))] string? maxExpression = null) - where T : System.IComparable - { - source.Context.ExpressionBuilder.Append($".IsBetween({minExpression}, {maxExpression})"); - return new Int_IsBetween_T_T_Assertion(source.Context, min, max); - } - -} - -] \ No newline at end of file diff --git a/tests/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet8_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet8_0.verified.txt rename to tests/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet11_0.verified.txt diff --git a/tests/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet9_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet9_0.verified.txt rename to tests/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet11_0.verified.txt diff --git a/tests/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet8_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet8_0.verified.txt rename to tests/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet11_0.verified.txt diff --git a/tests/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet9_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet9_0.verified.txt deleted file mode 100644 index df7c56e13cc..00000000000 --- a/tests/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet9_0.verified.txt +++ /dev/null @@ -1,83 +0,0 @@ -// -#pragma warning disable - -#nullable enable -namespace TUnit.Generated; -[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] -[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")] -internal static class TUnit_TestProject_Bugs__2971_Tests__TestSource -{ - private static readonly global::TUnit.Core.ClassMetadata __classMetadata = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.Bugs._2971.Tests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.Bugs._2971.Tests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.Bugs._2971.Tests)), - Name = "Tests", - Namespace = "TUnit.TestProject.Bugs._2971", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }); - private static readonly global::System.Type __classType = typeof(global::TUnit.TestProject.Bugs._2971.Tests); - private static global::TUnit.TestProject.Bugs._2971.Tests __CreateInstance(global::System.Type[] typeArgs, object?[] args) - { - return new global::TUnit.TestProject.Bugs._2971.Tests(); - } - private static global::System.Threading.Tasks.ValueTask __Invoke(global::TUnit.TestProject.Bugs._2971.Tests instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken) - { - try - { - switch (methodIndex) - { - case 0: - { - instance.SimpleTest(); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(methodIndex)); - } - } - catch (global::System.Exception ex) - { - return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex)); - } - } - private static global::System.Attribute[] __Attributes(int groupIndex) - { - switch (groupIndex) - { - case 0: - { - return - [ - new global::TUnit.Core.TestAttribute(), - new global::TUnit.TestProject.Bugs._2971.SomeAttribute(typeof(global::System.Nullable<>)) - ]; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(groupIndex)); - } - } - private static readonly global::System.Func __createInstance = __CreateInstance; - private static readonly global::System.Func __invoke = __Invoke; - private static readonly global::System.Func __attributes = __Attributes; - public static readonly global::TUnit.Core.TestEntry[] Entries = new global::TUnit.Core.TestEntry[] - { - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "SimpleTest", - fullyQualifiedName: "TUnit.TestProject.Bugs._2971.Tests.SimpleTest", - filePath: "", - lineNumber: 19, - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 0, - createAttributes: __attributes, - attributeGroupIndex: 0), - }; -} -internal static partial class TUnit_TestRegistration -{ - static readonly int _r_TUnit_TestProject_Bugs__2971_Tests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterEntries(static () => TUnit_TestProject_Bugs__2971_Tests__TestSource.Entries); -} diff --git a/tests/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet8_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet8_0.verified.txt rename to tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet11_0.verified.txt diff --git a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet8_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet8_0.verified.txt deleted file mode 100644 index 072f9cec859..00000000000 --- a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet8_0.verified.txt +++ /dev/null @@ -1,114 +0,0 @@ -// -#pragma warning disable - -#nullable enable -namespace TUnit.Generated; -[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] -[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")] -internal static class TUnit_TestProject_BasicTests__TestSource -{ - private static readonly global::TUnit.Core.ClassMetadata __classMetadata = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BasicTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BasicTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BasicTests)), - Name = "BasicTests", - Namespace = "TUnit.TestProject", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }); - private static readonly global::System.Type __classType = typeof(global::TUnit.TestProject.BasicTests); - private static global::TUnit.TestProject.BasicTests __CreateInstance(global::System.Type[] typeArgs, object?[] args) - { - return new global::TUnit.TestProject.BasicTests(); - } - private static global::System.Threading.Tasks.ValueTask __Invoke(global::TUnit.TestProject.BasicTests instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken) - { - try - { - switch (methodIndex) - { - case 0: - { - instance.SynchronousTest(); - return default(global::System.Threading.Tasks.ValueTask); - } - case 1: - { - return new global::System.Threading.Tasks.ValueTask(instance.AsynchronousTest()); - } - case 2: - { - return instance.ValueTaskAsynchronousTest(); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(methodIndex)); - } - } - catch (global::System.Exception ex) - { - return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex)); - } - } - private static global::System.Attribute[] __Attributes(int groupIndex) - { - switch (groupIndex) - { - case 0: - { - return - [ - new global::TUnit.Core.TestAttribute() - ]; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(groupIndex)); - } - } - private static readonly global::System.Func __createInstance = __CreateInstance; - private static readonly global::System.Func __invoke = __Invoke; - private static readonly global::System.Func __attributes = __Attributes; - public static readonly global::TUnit.Core.TestEntry[] Entries = new global::TUnit.Core.TestEntry[] - { - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "SynchronousTest", - fullyQualifiedName: "TUnit.TestProject.BasicTests.SynchronousTest", - filePath: "", - lineNumber: 5, - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 0, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "AsynchronousTest", - fullyQualifiedName: "TUnit.TestProject.BasicTests.AsynchronousTest", - filePath: "", - lineNumber: 11, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 1, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "ValueTaskAsynchronousTest", - fullyQualifiedName: "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", - filePath: "", - lineNumber: 17, - returnType: typeof(global::System.Threading.Tasks.ValueTask), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 2, - createAttributes: __attributes, - attributeGroupIndex: 0), - }; -} -internal static partial class TUnit_TestRegistration -{ - static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterEntries(static () => TUnit_TestProject_BasicTests__TestSource.Entries); -} diff --git a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet9_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet9_0.verified.txt deleted file mode 100644 index 072f9cec859..00000000000 --- a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet9_0.verified.txt +++ /dev/null @@ -1,114 +0,0 @@ -// -#pragma warning disable - -#nullable enable -namespace TUnit.Generated; -[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] -[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")] -internal static class TUnit_TestProject_BasicTests__TestSource -{ - private static readonly global::TUnit.Core.ClassMetadata __classMetadata = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BasicTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BasicTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BasicTests)), - Name = "BasicTests", - Namespace = "TUnit.TestProject", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }); - private static readonly global::System.Type __classType = typeof(global::TUnit.TestProject.BasicTests); - private static global::TUnit.TestProject.BasicTests __CreateInstance(global::System.Type[] typeArgs, object?[] args) - { - return new global::TUnit.TestProject.BasicTests(); - } - private static global::System.Threading.Tasks.ValueTask __Invoke(global::TUnit.TestProject.BasicTests instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken) - { - try - { - switch (methodIndex) - { - case 0: - { - instance.SynchronousTest(); - return default(global::System.Threading.Tasks.ValueTask); - } - case 1: - { - return new global::System.Threading.Tasks.ValueTask(instance.AsynchronousTest()); - } - case 2: - { - return instance.ValueTaskAsynchronousTest(); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(methodIndex)); - } - } - catch (global::System.Exception ex) - { - return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex)); - } - } - private static global::System.Attribute[] __Attributes(int groupIndex) - { - switch (groupIndex) - { - case 0: - { - return - [ - new global::TUnit.Core.TestAttribute() - ]; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(groupIndex)); - } - } - private static readonly global::System.Func __createInstance = __CreateInstance; - private static readonly global::System.Func __invoke = __Invoke; - private static readonly global::System.Func __attributes = __Attributes; - public static readonly global::TUnit.Core.TestEntry[] Entries = new global::TUnit.Core.TestEntry[] - { - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "SynchronousTest", - fullyQualifiedName: "TUnit.TestProject.BasicTests.SynchronousTest", - filePath: "", - lineNumber: 5, - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 0, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "AsynchronousTest", - fullyQualifiedName: "TUnit.TestProject.BasicTests.AsynchronousTest", - filePath: "", - lineNumber: 11, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 1, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "ValueTaskAsynchronousTest", - fullyQualifiedName: "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", - filePath: "", - lineNumber: 17, - returnType: typeof(global::System.Threading.Tasks.ValueTask), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 2, - createAttributes: __attributes, - attributeGroupIndex: 0), - }; -} -internal static partial class TUnit_TestRegistration -{ - static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterEntries(static () => TUnit_TestProject_BasicTests__TestSource.Entries); -} diff --git a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet8_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet8_0.verified.txt rename to tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet11_0.verified.txt diff --git a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet9_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet9_0.verified.txt deleted file mode 100644 index d8caff08a72..00000000000 --- a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet9_0.verified.txt +++ /dev/null @@ -1,437 +0,0 @@ -// -#pragma warning disable - -#nullable enable -namespace TUnit.Generated; -[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] -[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")] -internal static class TUnit_TestProject_DataDrivenTests__TestSource -{ - private static readonly global::TUnit.Core.ClassMetadata __classMetadata = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.DataDrivenTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.DataDrivenTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.DataDrivenTests)), - Name = "DataDrivenTests", - Namespace = "TUnit.TestProject", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }); - private static readonly global::System.Type __classType = typeof(global::TUnit.TestProject.DataDrivenTests); - private static global::TUnit.TestProject.DataDrivenTests __CreateInstance(global::System.Type[] typeArgs, object?[] args) - { - return new global::TUnit.TestProject.DataDrivenTests(); - } - private static global::System.Threading.Tasks.ValueTask __Invoke(global::TUnit.TestProject.DataDrivenTests instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken) - { - try - { - switch (methodIndex) - { - case 0: - { - switch (args.Length) - { - case 1: - { - instance.DataSource_Method(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 1: - { - switch (args.Length) - { - case 2: - { - instance.DataSource_Method(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}"); - } - } - case 2: - { - switch (args.Length) - { - case 1: - { - instance.EnumValue(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 3: - { - switch (args.Length) - { - case 1: - { - instance.NullValue(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 4: - { - switch (args.Length) - { - case 1: - { - instance.EmptyString(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 5: - { - switch (args.Length) - { - case 1: - { - instance.NonEmptyString(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 6: - { - switch (args.Length) - { - case 1: - { - instance.BooleanString(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 7: - { - switch (args.Length) - { - case 1: - { - instance.Type(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 8: - { - switch (args.Length) - { - case 0: - { - instance.IntegerArray(global::System.Array.Empty()); - return default(global::System.Threading.Tasks.ValueTask); - } - case 1: - { - instance.IntegerArray((args[0] is null ? null : args[0] is int[] arr ? arr : global::TUnit.Core.Helpers.CastHelper.ToTrailingArray(args[0]))); - return default(global::System.Threading.Tasks.ValueTask); - } - case 2: - { - instance.IntegerArray(new int[] { global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]) }); - return default(global::System.Threading.Tasks.ValueTask); - } - case 3: - { - instance.IntegerArray(new int[] { global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]) }); - return default(global::System.Threading.Tasks.ValueTask); - } - case 4: - { - instance.IntegerArray(new int[] { global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3]) }); - return default(global::System.Threading.Tasks.ValueTask); - } - case 5: - { - instance.IntegerArray(new int[] { global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3]), global::TUnit.Core.Helpers.CastHelper.Cast(args[4]) }); - return default(global::System.Threading.Tasks.ValueTask); - } - case 6: - { - instance.IntegerArray(new int[] { global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3]), global::TUnit.Core.Helpers.CastHelper.Cast(args[4]), global::TUnit.Core.Helpers.CastHelper.Cast(args[5]) }); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - instance.IntegerArray((args.Length > 0 ? global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(global::System.Linq.Enumerable.Range(0, args.Length), i => global::TUnit.Core.Helpers.CastHelper.Cast(args[i]))) : global::System.Array.Empty())); - return default(global::System.Threading.Tasks.ValueTask); - } - } - case 9: - { - switch (args.Length) - { - case 1: - { - instance.IntMaxValue(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(methodIndex)); - } - } - catch (global::System.Exception ex) - { - return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex)); - } - } - private static global::System.Attribute[] __Attributes(int groupIndex) - { - switch (groupIndex) - { - case 0: - { - return - [ - new global::TUnit.Core.TestAttribute(), - new global::TUnit.TestProject.Attributes.EngineTest(global::TUnit.TestProject.Attributes.ExpectedResult.Pass) - ]; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(groupIndex)); - } - } - private static readonly global::System.Func __createInstance = __CreateInstance; - private static readonly global::System.Func __invoke = __Invoke; - private static readonly global::System.Func __attributes = __Attributes; - public static readonly global::TUnit.Core.TestEntry[] Entries = new global::TUnit.Core.TestEntry[] - { - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "DataSource_Method", - fullyQualifiedName: "TUnit.TestProject.DataDrivenTests.DataSource_Method", - filePath: "", - lineNumber: 8, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.ArgumentsAttribute(1), - new global::TUnit.Core.ArgumentsAttribute(2), - new global::TUnit.Core.ArgumentsAttribute(3), -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.DataDrivenTests), "DataSource_Method", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new global::TUnit.Core.ConcreteType(typeof(int)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 0, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "DataSource_Method", - fullyQualifiedName: "TUnit.TestProject.DataDrivenTests.DataSource_Method", - filePath: "", - lineNumber: 17, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.ArgumentsAttribute(1, "String"), - new global::TUnit.Core.ArgumentsAttribute(2, "String2"), - new global::TUnit.Core.ArgumentsAttribute(3, "String3"), -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.DataDrivenTests), "DataSource_Method", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new global::TUnit.Core.ConcreteType(typeof(int)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "value2", new global::TUnit.Core.ConcreteType(typeof(string)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 1, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "EnumValue", - fullyQualifiedName: "TUnit.TestProject.DataDrivenTests.EnumValue", - filePath: "", - lineNumber: 26, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.ArgumentsAttribute(global::TUnit.TestProject.TestEnum.One), - new global::TUnit.Core.ArgumentsAttribute(global::TUnit.TestProject.TestEnum.Two), - new global::TUnit.Core.ArgumentsAttribute(-1), -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.DataDrivenTests), "EnumValue", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProject.TestEnum), "testEnum", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.TestEnum)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 2, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "NullValue", - fullyQualifiedName: "TUnit.TestProject.DataDrivenTests.NullValue", - filePath: "", - lineNumber: 35, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.ArgumentsAttribute(null), -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.DataDrivenTests), "NullValue", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "value", new global::TUnit.Core.ConcreteType(typeof(string)), true) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 3, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "EmptyString", - fullyQualifiedName: "TUnit.TestProject.DataDrivenTests.EmptyString", - filePath: "", - lineNumber: 42, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.ArgumentsAttribute(""), -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.DataDrivenTests), "EmptyString", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "value", new global::TUnit.Core.ConcreteType(typeof(string)), true) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 4, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "NonEmptyString", - fullyQualifiedName: "TUnit.TestProject.DataDrivenTests.NonEmptyString", - filePath: "", - lineNumber: 49, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.ArgumentsAttribute("Foo bar!"), -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.DataDrivenTests), "NonEmptyString", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "value", new global::TUnit.Core.ConcreteType(typeof(string)), true) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 5, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "BooleanString", - fullyQualifiedName: "TUnit.TestProject.DataDrivenTests.BooleanString", - filePath: "", - lineNumber: 56, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.ArgumentsAttribute(null), - new global::TUnit.Core.ArgumentsAttribute(false), - new global::TUnit.Core.ArgumentsAttribute(true), -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.DataDrivenTests), "BooleanString", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(bool?), "value", new global::TUnit.Core.ConcreteType(typeof(bool?)), true) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 6, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "Type", - fullyQualifiedName: "TUnit.TestProject.DataDrivenTests.Type", - filePath: "", - lineNumber: 65, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.ArgumentsAttribute(typeof(object)), -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.DataDrivenTests), "Type", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Type), "value", new global::TUnit.Core.ConcreteType(typeof(global::System.Type)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 7, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "IntegerArray", - fullyQualifiedName: "TUnit.TestProject.DataDrivenTests.IntegerArray", - filePath: "", - lineNumber: 72, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.ArgumentsAttribute(new[] { 1, 2, 3 }), -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.DataDrivenTests), "IntegerArray", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int[]), "values", new global::TUnit.Core.ConcreteType(typeof(int[])), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 8, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "IntMaxValue", - fullyQualifiedName: "TUnit.TestProject.DataDrivenTests.IntMaxValue", - filePath: "", - lineNumber: 79, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.ArgumentsAttribute(2147483647), -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.DataDrivenTests), "IntMaxValue", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new global::TUnit.Core.ConcreteType(typeof(int)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 9, - createAttributes: __attributes, - attributeGroupIndex: 0), - }; -} -internal static partial class TUnit_TestRegistration -{ - static readonly int _r_TUnit_TestProject_DataDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterEntries(static () => TUnit_TestProject_DataDrivenTests__TestSource.Entries); -} diff --git a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet8_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet8_0.verified.txt rename to tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet11_0.verified.txt diff --git a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet9_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet9_0.verified.txt deleted file mode 100644 index 650b5779bf6..00000000000 --- a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet9_0.verified.txt +++ /dev/null @@ -1,618 +0,0 @@ -// -#pragma warning disable - -#nullable enable -#pragma warning disable CS9113 // Parameter is unread. -using System; -using System.Reflection; -using System.Threading; -using System.Threading.Tasks; -using global::TUnit.Core; -using global::TUnit.Core.Hooks; -namespace TUnit.Generated -{ - internal static partial class TUnit_HookRegistration - { - static readonly int _h_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class_5c51506c = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.Base1), global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - static __registrationIndex => - new BeforeClassHookMethod - { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "BeforeAll1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "Base1", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = __registrationIndex, - Body = TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class_5c51506c_Body, - FilePath = "", - LineNumber = 5 - } - ); - private static ValueTask TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class_5c51506c_Body(ClassHookContext context, CancellationToken cancellationToken) - { - return new ValueTask(global::TUnit.TestProject.BeforeTests.Base1.BeforeAll1()); - } - static readonly int _h_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test_0f563ec6 = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.Base1), global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - static __registrationIndex => - new InstanceHookMethod - { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base1), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "BeforeEach1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "Base1", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = __registrationIndex, - Body = TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test_0f563ec6_Body - } - ); - private static ValueTask TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test_0f563ec6_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.Base1)instance; - return new ValueTask(typedInstance.BeforeEach1()); - } - } -} - - -// ===== FILE SEPARATOR ===== - -// -#pragma warning disable - -#nullable enable -#pragma warning disable CS9113 // Parameter is unread. -using System; -using System.Reflection; -using System.Threading; -using System.Threading.Tasks; -using global::TUnit.Core; -using global::TUnit.Core.Hooks; -namespace TUnit.Generated -{ - internal static partial class TUnit_HookRegistration - { - static readonly int _h_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class_b497be42 = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.Base2), global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - static __registrationIndex => - new BeforeClassHookMethod - { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "BeforeAll2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "Base2", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = __registrationIndex, - Body = TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class_b497be42_Body, - FilePath = "", - LineNumber = 20 - } - ); - private static ValueTask TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class_b497be42_Body(ClassHookContext context, CancellationToken cancellationToken) - { - return new ValueTask(global::TUnit.TestProject.BeforeTests.Base2.BeforeAll2()); - } - static readonly int _h_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test_c12372de = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.Base2), global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - static __registrationIndex => - new InstanceHookMethod - { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base2), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "BeforeEach2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "Base2", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = __registrationIndex, - Body = TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test_c12372de_Body - } - ); - private static ValueTask TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test_c12372de_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.Base2)instance; - return new ValueTask(typedInstance.BeforeEach2()); - } - } -} - - -// ===== FILE SEPARATOR ===== - -// -#pragma warning disable - -#nullable enable -#pragma warning disable CS9113 // Parameter is unread. -using System; -using System.Reflection; -using System.Threading; -using System.Threading.Tasks; -using global::TUnit.Core; -using global::TUnit.Core.Hooks; -namespace TUnit.Generated -{ - internal static partial class TUnit_HookRegistration - { - static readonly int _h_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class_45e04490 = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.Base3), global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - static __registrationIndex => - new BeforeClassHookMethod - { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "BeforeAll3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "Base3", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = __registrationIndex, - Body = TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class_45e04490_Body, - FilePath = "", - LineNumber = 35 - } - ); - private static ValueTask TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class_45e04490_Body(ClassHookContext context, CancellationToken cancellationToken) - { - return new ValueTask(global::TUnit.TestProject.BeforeTests.Base3.BeforeAll3()); - } - static readonly int _h_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test_5cb123ce = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.Base3), global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - static __registrationIndex => - new InstanceHookMethod - { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base3), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "BeforeEach3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "Base3", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = __registrationIndex, - Body = TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test_5cb123ce_Body - } - ); - private static ValueTask TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test_5cb123ce_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.Base3)instance; - return new ValueTask(typedInstance.BeforeEach3()); - } - } -} - - -// ===== FILE SEPARATOR ===== - -// -#pragma warning disable - -#nullable enable -#pragma warning disable CS9113 // Parameter is unread. -using System; -using System.Reflection; -using System.Threading; -using System.Threading.Tasks; -using global::TUnit.Core; -using global::TUnit.Core.Hooks; -namespace TUnit.Generated -{ - internal static partial class TUnit_HookRegistration - { - static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class_e448884e = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - static __registrationIndex => - new BeforeClassHookMethod - { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = __registrationIndex, - Body = TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class_e448884e_Body, - FilePath = "", - LineNumber = 50 - } - ); - private static ValueTask TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class_e448884e_Body(ClassHookContext context, CancellationToken cancellationToken) - { - return new ValueTask(global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp()); - } - static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class_a169a78d = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - static __registrationIndex => - new BeforeClassHookMethod - { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), "BeforeAllSetUpWithContext", true, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false) - }), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = __registrationIndex, - Body = TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class_a169a78d_Body, - FilePath = "", - LineNumber = 56 - } - ); - private static ValueTask TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class_a169a78d_Body(ClassHookContext context, CancellationToken cancellationToken) - { - return new ValueTask(global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context)); - } - static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class_baa8f1e8 = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - static __registrationIndex => - new BeforeClassHookMethod - { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), "BeforeAllSetUp", true, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false) - }), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = __registrationIndex, - Body = TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class_baa8f1e8_Body, - FilePath = "", - LineNumber = 62 - } - ); - private static ValueTask TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class_baa8f1e8_Body(ClassHookContext context, CancellationToken cancellationToken) - { - return new ValueTask(global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp(cancellationToken)); - } - static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class_95aea855 = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - static __registrationIndex => - new BeforeClassHookMethod - { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), "BeforeAllSetUpWithContext", true, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false) - }), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = __registrationIndex, - Body = TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class_95aea855_Body, - FilePath = "", - LineNumber = 68 - } - ); - private static ValueTask TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class_95aea855_Body(ClassHookContext context, CancellationToken cancellationToken) - { - return new ValueTask(global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context, cancellationToken)); - } - static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test_234813ba = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - static __registrationIndex => - new InstanceHookMethod - { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "Setup", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = __registrationIndex, - Body = TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test_234813ba_Body - } - ); - private static ValueTask TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test_234813ba_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - return new ValueTask(typedInstance.Setup()); - } - static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test_81adbb20 = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - static __registrationIndex => - new InstanceHookMethod - { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "Setup", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), "Setup", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false) - }), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = __registrationIndex, - Body = TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test_81adbb20_Body - } - ); - private static ValueTask TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test_81adbb20_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - return new ValueTask(typedInstance.Setup(cancellationToken)); - } - static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test_01c9267a = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - static __registrationIndex => - new InstanceHookMethod - { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), "SetupWithContext", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false) - }), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = __registrationIndex, - Body = TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test_01c9267a_Body - } - ); - private static ValueTask TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test_01c9267a_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - return new ValueTask(typedInstance.SetupWithContext(context)); - } - static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test_5aec0dbc = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - static __registrationIndex => - new InstanceHookMethod - { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), "SetupWithContext", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false) - }), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = __registrationIndex, - Body = TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test_5aec0dbc_Body - } - ); - private static ValueTask TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test_5aec0dbc_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - return new ValueTask(typedInstance.SetupWithContext(context, cancellationToken)); - } - } -} diff --git a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet8_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet8_0.verified.txt rename to tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet11_0.verified.txt diff --git a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet9_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet9_0.verified.txt deleted file mode 100644 index 42f0214260e..00000000000 --- a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet9_0.verified.txt +++ /dev/null @@ -1,531 +0,0 @@ -// -#pragma warning disable - -#nullable enable -namespace TUnit.Generated; -[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] -[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")] -internal static class TUnit_TestProject_MatrixTests__TestSource -{ - private static readonly global::TUnit.Core.ClassMetadata __classMetadata = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.MatrixTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.MatrixTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.MatrixTests)), - Name = "MatrixTests", - Namespace = "TUnit.TestProject", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }); - private static readonly global::System.Type __classType = typeof(global::TUnit.TestProject.MatrixTests); - private static global::TUnit.TestProject.MatrixTests __CreateInstance(global::System.Type[] typeArgs, object?[] args) - { - return new global::TUnit.TestProject.MatrixTests(); - } - private static global::System.Threading.Tasks.ValueTask __Invoke(global::TUnit.TestProject.MatrixTests instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken) - { - try - { - switch (methodIndex) - { - case 0: - { - switch (args.Length) - { - case 3: - { - return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_One(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]))); - } - default: - throw new global::System.ArgumentException($"Expected exactly 3 arguments, but got {args.Length}"); - } - } - case 1: - { - switch (args.Length) - { - case 4: - { - return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Two(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3]))); - } - default: - throw new global::System.ArgumentException($"Expected exactly 4 arguments, but got {args.Length}"); - } - } - case 2: - { - switch (args.Length) - { - case 3: - { - return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Enum(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]))); - } - default: - throw new global::System.ArgumentException($"Expected exactly 3 arguments, but got {args.Length}"); - } - } - case 3: - { - switch (args.Length) - { - case 2: - { - return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]))); - } - default: - throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}"); - } - } - case 4: - { - switch (args.Length) - { - case 2: - { - return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools2(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]))); - } - default: - throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}"); - } - } - case 5: - { - switch (args.Length) - { - case 2: - { - return new global::System.Threading.Tasks.ValueTask(instance.ImplicitConversion(global::TUnit.Core.Helpers.CastHelper.Cast>(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]))); - } - default: - throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}"); - } - } - case 6: - { - switch (args.Length) - { - case 2: - { - return new global::System.Threading.Tasks.ValueTask(instance.ExcludingAutoGeneratedMatrixValues(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]))); - } - default: - throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}"); - } - } - case 7: - { - switch (args.Length) - { - case 1: - { - return new global::System.Threading.Tasks.ValueTask(instance.Method1(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]))); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 8: - { - switch (args.Length) - { - case 1: - { - return new global::System.Threading.Tasks.ValueTask(instance.Method2(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]))); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 9: - { - switch (args.Length) - { - case 1: - { - return new global::System.Threading.Tasks.ValueTask(instance.Method3(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]))); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 10: - { - switch (args.Length) - { - case 1: - { - return new global::System.Threading.Tasks.ValueTask(instance.Method4(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]))); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 11: - { - switch (args.Length) - { - case 2: - { - return new global::System.Threading.Tasks.ValueTask(instance.Exclusion(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]))); - } - default: - throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}"); - } - } - case 12: - { - switch (args.Length) - { - case 2: - { - return new global::System.Threading.Tasks.ValueTask(instance.MatrixMethod_WithEnumParameter_UsesOnlyMethodValues(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]))); - } - default: - throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}"); - } - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(methodIndex)); - } - } - catch (global::System.Exception ex) - { - return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex)); - } - } - private static global::System.Attribute[] __Attributes(int groupIndex) - { - switch (groupIndex) - { - case 0: - { - return - [ - new global::TUnit.Core.TestAttribute(), - new global::TUnit.TestProject.Attributes.EngineTest(global::TUnit.TestProject.Attributes.ExpectedResult.Pass) - ]; - } - case 1: - { - return - [ - new global::TUnit.Core.TestAttribute(), - new global::TUnit.Core.MatrixExclusionAttribute(1, 1), - new global::TUnit.Core.MatrixExclusionAttribute(2, 2), - new global::TUnit.Core.MatrixExclusionAttribute(3, 3), - new global::TUnit.TestProject.Attributes.EngineTest(global::TUnit.TestProject.Attributes.ExpectedResult.Pass) - ]; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(groupIndex)); - } - } - private static readonly global::System.Func __createInstance = __CreateInstance; - private static readonly global::System.Func __invoke = __Invoke; - private static readonly global::System.Func __attributes = __Attributes; - public static readonly global::TUnit.Core.TestEntry[] Entries = __CreateEntries(); - private static global::TUnit.Core.TestEntry[] __CreateEntries() - { - var entries = new global::TUnit.Core.TestEntry[13]; - __FillEntries0(entries); - __FillEntries1(entries); - return entries; - } - private static void __FillEntries0(global::TUnit.Core.TestEntry[] entries) - { - entries[0] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "MatrixTest_One", - fullyQualifiedName: "TUnit.TestProject.MatrixTests.MatrixTest_One", - filePath: "", - lineNumber: 9, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MatrixDataSourceAttribute(), -}, - returnType: typeof(global::System.Threading.Tasks.Task), - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MatrixTests), "MatrixTest_One", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "str", new global::TUnit.Core.ConcreteType(typeof(string)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "i", new global::TUnit.Core.ConcreteType(typeof(int)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(bool), "boolean", new global::TUnit.Core.ConcreteType(typeof(bool)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 0, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[1] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "MatrixTest_Two", - fullyQualifiedName: "TUnit.TestProject.MatrixTests.MatrixTest_Two", - filePath: "", - lineNumber: 19, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MatrixDataSourceAttribute(), -}, - returnType: typeof(global::System.Threading.Tasks.Task), - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MatrixTests), "MatrixTest_Two", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "i", new global::TUnit.Core.ConcreteType(typeof(int)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "i2", new global::TUnit.Core.ConcreteType(typeof(int)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "i3", new global::TUnit.Core.ConcreteType(typeof(int)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(bool), "boolean", new global::TUnit.Core.ConcreteType(typeof(bool)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 1, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[2] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "MatrixTest_Enum", - fullyQualifiedName: "TUnit.TestProject.MatrixTests.MatrixTest_Enum", - filePath: "", - lineNumber: 30, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MatrixDataSourceAttribute(), -}, - returnType: typeof(global::System.Threading.Tasks.Task), - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MatrixTests), "MatrixTest_Enum", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "i", new global::TUnit.Core.ConcreteType(typeof(int)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(TestEnum), "testEnum", new global::TUnit.Core.ConcreteType(typeof(TestEnum)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(TestEnum?), "testEnum2", new global::TUnit.Core.ConcreteType(typeof(TestEnum?)), true) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 2, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[3] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "AutoGenerateBools", - fullyQualifiedName: "TUnit.TestProject.MatrixTests.AutoGenerateBools", - filePath: "", - lineNumber: 40, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MatrixDataSourceAttribute(), -}, - returnType: typeof(global::System.Threading.Tasks.Task), - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MatrixTests), "AutoGenerateBools", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "str", new global::TUnit.Core.ConcreteType(typeof(string)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(bool), "boolean", new global::TUnit.Core.ConcreteType(typeof(bool)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 3, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[4] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "AutoGenerateBools2", - fullyQualifiedName: "TUnit.TestProject.MatrixTests.AutoGenerateBools2", - filePath: "", - lineNumber: 49, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MatrixDataSourceAttribute(), -}, - returnType: typeof(global::System.Threading.Tasks.Task), - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MatrixTests), "AutoGenerateBools2", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "str", new global::TUnit.Core.ConcreteType(typeof(string)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(bool?), "boolean", new global::TUnit.Core.ConcreteType(typeof(bool?)), true) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 4, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[5] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "ImplicitConversion", - fullyQualifiedName: "TUnit.TestProject.MatrixTests.ImplicitConversion", - filePath: "", - lineNumber: 58, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MatrixDataSourceAttribute(), -}, - returnType: typeof(global::System.Threading.Tasks.Task), - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MatrixTests), "ImplicitConversion", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(OneOf), "enum", new global::TUnit.Core.ConcreteType(typeof(OneOf)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(bool), "boolean", new global::TUnit.Core.ConcreteType(typeof(bool)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 5, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[6] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "ExcludingAutoGeneratedMatrixValues", - fullyQualifiedName: "TUnit.TestProject.MatrixTests.ExcludingAutoGeneratedMatrixValues", - filePath: "", - lineNumber: 67, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MatrixDataSourceAttribute(), -}, - returnType: typeof(global::System.Threading.Tasks.Task), - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MatrixTests), "ExcludingAutoGeneratedMatrixValues", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProject.MatrixTests.CountToTenEnum), "enum", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.MatrixTests.CountToTenEnum)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(bool), "boolean", new global::TUnit.Core.ConcreteType(typeof(bool)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 6, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[7] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "Method1", - fullyQualifiedName: "TUnit.TestProject.MatrixTests.Method1", - filePath: "", - lineNumber: 116, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MatrixDataSourceAttribute(), -}, - returnType: typeof(global::System.Threading.Tasks.Task), - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MatrixTests), "Method1", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "item", new global::TUnit.Core.ConcreteType(typeof(int)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 7, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[8] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "Method2", - fullyQualifiedName: "TUnit.TestProject.MatrixTests.Method2", - filePath: "", - lineNumber: 124, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MatrixDataSourceAttribute(), -}, - returnType: typeof(global::System.Threading.Tasks.Task), - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MatrixTests), "Method2", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "item", new global::TUnit.Core.ConcreteType(typeof(int)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 8, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[9] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "Method3", - fullyQualifiedName: "TUnit.TestProject.MatrixTests.Method3", - filePath: "", - lineNumber: 132, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MatrixDataSourceAttribute(), -}, - returnType: typeof(global::System.Threading.Tasks.Task), - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MatrixTests), "Method3", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "item", new global::TUnit.Core.ConcreteType(typeof(int)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 9, - createAttributes: __attributes, - attributeGroupIndex: 0); - } - private static void __FillEntries1(global::TUnit.Core.TestEntry[] entries) - { - entries[10] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "Method4", - fullyQualifiedName: "TUnit.TestProject.MatrixTests.Method4", - filePath: "", - lineNumber: 140, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MatrixDataSourceAttribute(), -}, - returnType: typeof(global::System.Threading.Tasks.Task), - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MatrixTests), "Method4", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "item", new global::TUnit.Core.ConcreteType(typeof(int)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 10, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[11] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "Exclusion", - fullyQualifiedName: "TUnit.TestProject.MatrixTests.Exclusion", - filePath: "", - lineNumber: 148, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MatrixDataSourceAttribute(), -}, - returnType: typeof(global::System.Threading.Tasks.Task), - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MatrixTests), "Exclusion", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "item", new global::TUnit.Core.ConcreteType(typeof(int)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "item2", new global::TUnit.Core.ConcreteType(typeof(int)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 11, - createAttributes: __attributes, - attributeGroupIndex: 1); - entries[12] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "MatrixMethod_WithEnumParameter_UsesOnlyMethodValues", - fullyQualifiedName: "TUnit.TestProject.MatrixTests.MatrixMethod_WithEnumParameter_UsesOnlyMethodValues", - filePath: "", - lineNumber: 197, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MatrixDataSourceAttribute(), -}, - returnType: typeof(global::System.Threading.Tasks.Task), - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MatrixTests), "MatrixMethod_WithEnumParameter_UsesOnlyMethodValues", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(bool), "flag", new global::TUnit.Core.ConcreteType(typeof(bool)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProject.MatrixTests.CountToTenEnum), "enum", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.MatrixTests.CountToTenEnum)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 12, - createAttributes: __attributes, - attributeGroupIndex: 0); - } -} -internal static partial class TUnit_TestRegistration -{ - static readonly int _r_TUnit_TestProject_MatrixTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterEntries(static () => TUnit_TestProject_MatrixTests__TestSource.Entries); -} diff --git a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet8_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet8_0.verified.txt rename to tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet11_0.verified.txt diff --git a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet9_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet9_0.verified.txt deleted file mode 100644 index 22ec502f231..00000000000 --- a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet9_0.verified.txt +++ /dev/null @@ -1,389 +0,0 @@ -// -#pragma warning disable - -#nullable enable -namespace TUnit.Generated; -[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] -[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")] -internal static class TUnit_TestProject_MethodDataSourceDrivenTests__TestSource -{ - private static readonly global::TUnit.Core.ClassMetadata __classMetadata = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.MethodDataSourceDrivenTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests)), - Name = "MethodDataSourceDrivenTests", - Namespace = "TUnit.TestProject", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }); - private static readonly global::System.Type __classType = typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests); - private static global::TUnit.TestProject.MethodDataSourceDrivenTests __CreateInstance(global::System.Type[] typeArgs, object?[] args) - { - return new global::TUnit.TestProject.MethodDataSourceDrivenTests(); - } - private static global::System.Threading.Tasks.ValueTask __Invoke(global::TUnit.TestProject.MethodDataSourceDrivenTests instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken) - { - try - { - switch (methodIndex) - { - case 0: - { - switch (args.Length) - { - case 1: - { - instance.DataSource_Method(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 1: - { - switch (args.Length) - { - case 1: - { - instance.DataSource_Method2(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 2: - { - switch (args.Length) - { - case 1: - { - instance.DataSource_Method_WithAction(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 3: - { - switch (args.Length) - { - case 1: - { - instance.DataSource_Method3(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 4: - { - switch (args.Length) - { - case 1: - { - instance.DataSource_Method4(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 5: - { - switch (args.Length) - { - case 1: - { - instance.DataSource_WithBaseReturn(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - case 6: - { - switch (args.Length) - { - case 0: - { - return new global::System.Threading.Tasks.ValueTask(instance.EnumerableFuncArrayTest(global::System.Array.Empty())); - } - case 1: - { - return new global::System.Threading.Tasks.ValueTask(instance.EnumerableFuncArrayTest((args[0] is null ? null : args[0] is string[] arr ? arr : global::TUnit.Core.Helpers.CastHelper.ToTrailingArray(args[0])))); - } - case 2: - { - return new global::System.Threading.Tasks.ValueTask(instance.EnumerableFuncArrayTest(new string[] { global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]) })); - } - case 3: - { - return new global::System.Threading.Tasks.ValueTask(instance.EnumerableFuncArrayTest(new string[] { global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]) })); - } - case 4: - { - return new global::System.Threading.Tasks.ValueTask(instance.EnumerableFuncArrayTest(new string[] { global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3]) })); - } - case 5: - { - return new global::System.Threading.Tasks.ValueTask(instance.EnumerableFuncArrayTest(new string[] { global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3]), global::TUnit.Core.Helpers.CastHelper.Cast(args[4]) })); - } - case 6: - { - return new global::System.Threading.Tasks.ValueTask(instance.EnumerableFuncArrayTest(new string[] { global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3]), global::TUnit.Core.Helpers.CastHelper.Cast(args[4]), global::TUnit.Core.Helpers.CastHelper.Cast(args[5]) })); - } - default: - return new global::System.Threading.Tasks.ValueTask(instance.EnumerableFuncArrayTest((args.Length > 0 ? global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(global::System.Linq.Enumerable.Range(0, args.Length), i => global::TUnit.Core.Helpers.CastHelper.Cast(args[i]))) : global::System.Array.Empty()))); - } - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(methodIndex)); - } - } - catch (global::System.Exception ex) - { - return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex)); - } - } - private static global::System.Attribute[] __Attributes(int groupIndex) - { - switch (groupIndex) - { - case 0: - { - return - [ - new global::TUnit.Core.TestAttribute(), - new global::TUnit.TestProject.Attributes.EngineTest(global::TUnit.TestProject.Attributes.ExpectedResult.Pass) - ]; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(groupIndex)); - } - } - private static readonly global::System.Func __createInstance = __CreateInstance; - private static readonly global::System.Func __invoke = __Invoke; - private static readonly global::System.Func __attributes = __Attributes; - public static readonly global::TUnit.Core.TestEntry[] Entries = new global::TUnit.Core.TestEntry[] - { - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "DataSource_Method", - fullyQualifiedName: "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_Method", - filePath: "", - lineNumber: 12, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MethodDataSourceAttribute("SomeMethod") - { - Factory = static dataGeneratorMetadata => global::TUnit.Core.Helpers.DataSourceFactories.FromValue(dataGeneratorMetadata, static () => global::TUnit.TestProject.MethodDataSourceDrivenTests.SomeMethod()), - }, -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), "DataSource_Method", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new global::TUnit.Core.ConcreteType(typeof(int)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 0, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "DataSource_Method2", - fullyQualifiedName: "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_Method2", - filePath: "", - lineNumber: 19, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MethodDataSourceAttribute("SomeMethod") - { - Factory = static dataGeneratorMetadata => global::TUnit.Core.Helpers.DataSourceFactories.FromValue(dataGeneratorMetadata, static () => global::TUnit.TestProject.MethodDataSourceDrivenTests.SomeMethod()), - }, -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), "DataSource_Method2", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new global::TUnit.Core.ConcreteType(typeof(int)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 1, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "DataSource_Method_WithAction", - fullyQualifiedName: "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_Method_WithAction", - filePath: "", - lineNumber: 26, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MethodDataSourceAttribute("SomeAction") - { - Factory = static dataGeneratorMetadata => global::TUnit.Core.Helpers.DataSourceFactories.FromValue(dataGeneratorMetadata, static () => global::TUnit.TestProject.MethodDataSourceDrivenTests.SomeAction()), - }, -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), "DataSource_Method_WithAction", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Action), "action", new global::TUnit.Core.ConcreteType(typeof(global::System.Action)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 2, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "DataSource_Method3", - fullyQualifiedName: "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_Method3", - filePath: "", - lineNumber: 33, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MethodDataSourceAttribute("SomeMethod") - { - Arguments = new object[] { 5 }, - Factory = static dataGeneratorMetadata => global::TUnit.Core.Helpers.DataSourceFactories.FromValue(dataGeneratorMetadata, static () => - { - var arguments = new object[] { 5 }; - return global::TUnit.TestProject.MethodDataSourceDrivenTests.SomeMethod(((int)arguments[0])); - }), - }, - new global::TUnit.Core.MethodDataSourceAttribute("SomeMethod") - { - Arguments = new object[] { 5 }, - Factory = static dataGeneratorMetadata => global::TUnit.Core.Helpers.DataSourceFactories.FromValue(dataGeneratorMetadata, static () => - { - var arguments = new object[] { 5 }; - return global::TUnit.TestProject.MethodDataSourceDrivenTests.SomeMethod(((int)arguments[0])); - }), - }, -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), "DataSource_Method3", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new global::TUnit.Core.ConcreteType(typeof(int)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 3, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "DataSource_Method4", - fullyQualifiedName: "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_Method4", - filePath: "", - lineNumber: 42, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MethodDataSourceAttribute("SomeMethod") - { - Arguments = new object[] { "Hello World!", 5, true }, - Factory = static dataGeneratorMetadata => global::TUnit.Core.Helpers.DataSourceFactories.FromValue(dataGeneratorMetadata, static () => - { - var arguments = new object[] { "Hello World!", 5, true }; - return global::TUnit.TestProject.MethodDataSourceDrivenTests.SomeMethod(((string)arguments[0]), ((int)arguments[1]), ((bool)arguments[2])); - }), - }, - new global::TUnit.Core.MethodDataSourceAttribute("SomeMethod") - { - Arguments = new object[] { "Hello World!", 6, true }, - Factory = static dataGeneratorMetadata => global::TUnit.Core.Helpers.DataSourceFactories.FromValue(dataGeneratorMetadata, static () => - { - var arguments = new object[] { "Hello World!", 6, true }; - return global::TUnit.TestProject.MethodDataSourceDrivenTests.SomeMethod(((string)arguments[0]), ((int)arguments[1]), ((bool)arguments[2])); - }), - }, - new global::TUnit.Core.MethodDataSourceAttribute("SomeMethod") - { - Arguments = new object[] { "Hello World!", 7, true }, - Factory = static dataGeneratorMetadata => global::TUnit.Core.Helpers.DataSourceFactories.FromValue(dataGeneratorMetadata, static () => - { - var arguments = new object[] { "Hello World!", 7, true }; - return global::TUnit.TestProject.MethodDataSourceDrivenTests.SomeMethod(((string)arguments[0]), ((int)arguments[1]), ((bool)arguments[2])); - }), - }, - new global::TUnit.Core.MethodDataSourceAttribute("SomeMethod") - { - Arguments = new object[] { "Hello World!", 8, true }, - Factory = static dataGeneratorMetadata => global::TUnit.Core.Helpers.DataSourceFactories.FromValue(dataGeneratorMetadata, static () => - { - var arguments = new object[] { "Hello World!", 8, true }; - return global::TUnit.TestProject.MethodDataSourceDrivenTests.SomeMethod(((string)arguments[0]), ((int)arguments[1]), ((bool)arguments[2])); - }), - }, -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), "DataSource_Method4", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new global::TUnit.Core.ConcreteType(typeof(int)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 4, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "DataSource_WithBaseReturn", - fullyQualifiedName: "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_WithBaseReturn", - filePath: "", - lineNumber: 53, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MethodDataSourceAttribute("MethodWithBaseReturn") - { - Factory = static dataGeneratorMetadata => global::TUnit.Core.Helpers.DataSourceFactories.FromValue(dataGeneratorMetadata, static () => global::TUnit.TestProject.MethodDataSourceDrivenTests.MethodWithBaseReturn()), - }, -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), "DataSource_WithBaseReturn", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests.BaseValue), "value", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests.BaseValue)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 5, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "EnumerableFuncArrayTest", - fullyQualifiedName: "TUnit.TestProject.MethodDataSourceDrivenTests.EnumerableFuncArrayTest", - filePath: "", - lineNumber: 59, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MethodDataSourceAttribute("EnumerableFuncArrayTestData") - { - Factory = static dataGeneratorMetadata => global::TUnit.Core.Helpers.DataSourceFactories.FromEnumerable(dataGeneratorMetadata, static () => global::TUnit.TestProject.MethodDataSourceDrivenTests.EnumerableFuncArrayTestData()), - }, -}, - returnType: typeof(global::System.Threading.Tasks.Task), - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), "EnumerableFuncArrayTest", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string[]), "strings", new global::TUnit.Core.ConcreteType(typeof(string[])), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 6, - createAttributes: __attributes, - attributeGroupIndex: 0), - }; -} -internal static partial class TUnit_TestRegistration -{ - static readonly int _r_TUnit_TestProject_MethodDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterEntries(static () => TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.Entries); -} diff --git a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet8_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet8_0.verified.txt rename to tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet11_0.verified.txt diff --git a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet9_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet9_0.verified.txt deleted file mode 100644 index 091173bdef7..00000000000 --- a/tests/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet9_0.verified.txt +++ /dev/null @@ -1,105 +0,0 @@ -// -#pragma warning disable - -#nullable enable -namespace TUnit.Generated; -[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] -[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")] -internal static class TUnit_TestProject_TupleDataSourceDrivenTests__TestSource -{ - private static readonly global::TUnit.Core.ClassMetadata __classMetadata = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.TupleDataSourceDrivenTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.TupleDataSourceDrivenTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.TupleDataSourceDrivenTests)), - Name = "TupleDataSourceDrivenTests", - Namespace = "TUnit.TestProject", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }); - private static readonly global::System.Type __classType = typeof(global::TUnit.TestProject.TupleDataSourceDrivenTests); - private static global::TUnit.TestProject.TupleDataSourceDrivenTests __CreateInstance(global::System.Type[] typeArgs, object?[] args) - { - return new global::TUnit.TestProject.TupleDataSourceDrivenTests(); - } - private static global::System.Threading.Tasks.ValueTask __Invoke(global::TUnit.TestProject.TupleDataSourceDrivenTests instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken) - { - try - { - switch (methodIndex) - { - case 0: - { - switch (args.Length) - { - case 3: - { - instance.DataSource_TupleMethod(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 3 arguments, but got {args.Length}"); - } - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(methodIndex)); - } - } - catch (global::System.Exception ex) - { - return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex)); - } - } - private static global::System.Attribute[] __Attributes(int groupIndex) - { - switch (groupIndex) - { - case 0: - { - return - [ - new global::TUnit.Core.TestAttribute(), - new global::TUnit.TestProject.Attributes.EngineTest(global::TUnit.TestProject.Attributes.ExpectedResult.Pass) - ]; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(groupIndex)); - } - } - private static readonly global::System.Func __createInstance = __CreateInstance; - private static readonly global::System.Func __invoke = __Invoke; - private static readonly global::System.Func __attributes = __Attributes; - public static readonly global::TUnit.Core.TestEntry[] Entries = new global::TUnit.Core.TestEntry[] - { - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "DataSource_TupleMethod", - fullyQualifiedName: "TUnit.TestProject.TupleDataSourceDrivenTests.DataSource_TupleMethod", - filePath: "", - lineNumber: 8, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MethodDataSourceAttribute("TupleMethod") - { - Factory = static dataGeneratorMetadata => global::TUnit.Core.Helpers.DataSourceFactories.FromValue(dataGeneratorMetadata, static () => global::TUnit.TestProject.TupleDataSourceDrivenTests.TupleMethod()), - }, -}, - parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.TupleDataSourceDrivenTests), "DataSource_TupleMethod", false, new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new global::TUnit.Core.ConcreteType(typeof(int)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "value2", new global::TUnit.Core.ConcreteType(typeof(string)), false), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(bool), "value3", new global::TUnit.Core.ConcreteType(typeof(bool)), false) - }), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 0, - createAttributes: __attributes, - attributeGroupIndex: 0), - }; -} -internal static partial class TUnit_TestRegistration -{ - static readonly int _r_TUnit_TestProject_TupleDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterEntries(static () => TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.Entries); -} diff --git a/tests/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet9_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet9_0.verified.txt rename to tests/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet11_0.verified.txt diff --git a/tests/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet8_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet8_0.verified.txt deleted file mode 100644 index 072f9cec859..00000000000 --- a/tests/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet8_0.verified.txt +++ /dev/null @@ -1,114 +0,0 @@ -// -#pragma warning disable - -#nullable enable -namespace TUnit.Generated; -[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] -[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")] -internal static class TUnit_TestProject_BasicTests__TestSource -{ - private static readonly global::TUnit.Core.ClassMetadata __classMetadata = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BasicTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BasicTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BasicTests)), - Name = "BasicTests", - Namespace = "TUnit.TestProject", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }); - private static readonly global::System.Type __classType = typeof(global::TUnit.TestProject.BasicTests); - private static global::TUnit.TestProject.BasicTests __CreateInstance(global::System.Type[] typeArgs, object?[] args) - { - return new global::TUnit.TestProject.BasicTests(); - } - private static global::System.Threading.Tasks.ValueTask __Invoke(global::TUnit.TestProject.BasicTests instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken) - { - try - { - switch (methodIndex) - { - case 0: - { - instance.SynchronousTest(); - return default(global::System.Threading.Tasks.ValueTask); - } - case 1: - { - return new global::System.Threading.Tasks.ValueTask(instance.AsynchronousTest()); - } - case 2: - { - return instance.ValueTaskAsynchronousTest(); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(methodIndex)); - } - } - catch (global::System.Exception ex) - { - return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex)); - } - } - private static global::System.Attribute[] __Attributes(int groupIndex) - { - switch (groupIndex) - { - case 0: - { - return - [ - new global::TUnit.Core.TestAttribute() - ]; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(groupIndex)); - } - } - private static readonly global::System.Func __createInstance = __CreateInstance; - private static readonly global::System.Func __invoke = __Invoke; - private static readonly global::System.Func __attributes = __Attributes; - public static readonly global::TUnit.Core.TestEntry[] Entries = new global::TUnit.Core.TestEntry[] - { - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "SynchronousTest", - fullyQualifiedName: "TUnit.TestProject.BasicTests.SynchronousTest", - filePath: "", - lineNumber: 5, - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 0, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "AsynchronousTest", - fullyQualifiedName: "TUnit.TestProject.BasicTests.AsynchronousTest", - filePath: "", - lineNumber: 11, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 1, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "ValueTaskAsynchronousTest", - fullyQualifiedName: "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", - filePath: "", - lineNumber: 17, - returnType: typeof(global::System.Threading.Tasks.ValueTask), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 2, - createAttributes: __attributes, - attributeGroupIndex: 0), - }; -} -internal static partial class TUnit_TestRegistration -{ - static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterEntries(static () => TUnit_TestProject_BasicTests__TestSource.Entries); -} diff --git a/tests/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet9_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet9_0.verified.txt deleted file mode 100644 index 072f9cec859..00000000000 --- a/tests/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet9_0.verified.txt +++ /dev/null @@ -1,114 +0,0 @@ -// -#pragma warning disable - -#nullable enable -namespace TUnit.Generated; -[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] -[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")] -internal static class TUnit_TestProject_BasicTests__TestSource -{ - private static readonly global::TUnit.Core.ClassMetadata __classMetadata = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BasicTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BasicTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BasicTests)), - Name = "BasicTests", - Namespace = "TUnit.TestProject", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }); - private static readonly global::System.Type __classType = typeof(global::TUnit.TestProject.BasicTests); - private static global::TUnit.TestProject.BasicTests __CreateInstance(global::System.Type[] typeArgs, object?[] args) - { - return new global::TUnit.TestProject.BasicTests(); - } - private static global::System.Threading.Tasks.ValueTask __Invoke(global::TUnit.TestProject.BasicTests instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken) - { - try - { - switch (methodIndex) - { - case 0: - { - instance.SynchronousTest(); - return default(global::System.Threading.Tasks.ValueTask); - } - case 1: - { - return new global::System.Threading.Tasks.ValueTask(instance.AsynchronousTest()); - } - case 2: - { - return instance.ValueTaskAsynchronousTest(); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(methodIndex)); - } - } - catch (global::System.Exception ex) - { - return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex)); - } - } - private static global::System.Attribute[] __Attributes(int groupIndex) - { - switch (groupIndex) - { - case 0: - { - return - [ - new global::TUnit.Core.TestAttribute() - ]; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(groupIndex)); - } - } - private static readonly global::System.Func __createInstance = __CreateInstance; - private static readonly global::System.Func __invoke = __Invoke; - private static readonly global::System.Func __attributes = __Attributes; - public static readonly global::TUnit.Core.TestEntry[] Entries = new global::TUnit.Core.TestEntry[] - { - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "SynchronousTest", - fullyQualifiedName: "TUnit.TestProject.BasicTests.SynchronousTest", - filePath: "", - lineNumber: 5, - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 0, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "AsynchronousTest", - fullyQualifiedName: "TUnit.TestProject.BasicTests.AsynchronousTest", - filePath: "", - lineNumber: 11, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 1, - createAttributes: __attributes, - attributeGroupIndex: 0), - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "ValueTaskAsynchronousTest", - fullyQualifiedName: "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", - filePath: "", - lineNumber: 17, - returnType: typeof(global::System.Threading.Tasks.ValueTask), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 2, - createAttributes: __attributes, - attributeGroupIndex: 0), - }; -} -internal static partial class TUnit_TestRegistration -{ - static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterEntries(static () => TUnit_TestProject_BasicTests__TestSource.Entries); -} diff --git a/tests/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet8_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet8_0.verified.txt rename to tests/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet11_0.verified.txt diff --git a/tests/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet9_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet9_0.verified.txt deleted file mode 100644 index 0d938ba771a..00000000000 --- a/tests/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet9_0.verified.txt +++ /dev/null @@ -1,129 +0,0 @@ -// -#pragma warning disable - -using TUnit.Core.Logging; -[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] -[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")] -file static class TUnitInfrastructure -{ - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - try - { - global::TUnit.Core.SourceRegistrar.IsEnabled = true; - } - catch { /* TUnit.Core not available - skip source registrar */ } - try - { - global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogDebug("[ModuleInitializer:TestsBase`1] TUnit infrastructure initializing..."); - } - catch { /* TUnit.Core not available - skip logging */ } - try - { - global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Loading 3 assembly reference(s)..."); - } - catch { /* TUnit.Core not available - skip logging */ } - try - { - try - { - global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Loading assembly containing: global::TUnit.TestProject.Library.AsyncBaseTests"); - } - catch { /* TUnit.Core not available - skip logging */ } - var type_0 = typeof(global::TUnit.TestProject.Library.AsyncBaseTests); - // Force module initializer to complete before proceeding - // RunClassConstructor triggers static constructor, which can only run AFTER module initializer completes - global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(type_0.TypeHandle); - try - { - global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Assembly initialized: global::TUnit.TestProject.Library.AsyncBaseTests"); - } - catch { /* TUnit.Core not available - skip logging */ } - } - catch (global::System.Exception ex) - { - try - { - global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Failed to load global::TUnit.TestProject.Library.AsyncBaseTests: " + ex.Message); - } - catch { /* TUnit.Core not available - skip logging */ } - } - try - { - try - { - global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Loading assembly containing: global::VerifyTUnit.DerivePathInfo"); - } - catch { /* TUnit.Core not available - skip logging */ } - var type_1 = typeof(global::VerifyTUnit.DerivePathInfo); - // Force module initializer to complete before proceeding - // RunClassConstructor triggers static constructor, which can only run AFTER module initializer completes - global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(type_1.TypeHandle); - try - { - global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Assembly initialized: global::VerifyTUnit.DerivePathInfo"); - } - catch { /* TUnit.Core not available - skip logging */ } - } - catch (global::System.Exception ex) - { - try - { - global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Failed to load global::VerifyTUnit.DerivePathInfo: " + ex.Message); - } - catch { /* TUnit.Core not available - skip logging */ } - } - try - { - try - { - global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Loading assembly containing: global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests"); - } - catch { /* TUnit.Core not available - skip logging */ } - var type_2 = typeof(global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests); - // Force module initializer to complete before proceeding - // RunClassConstructor triggers static constructor, which can only run AFTER module initializer completes - global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(type_2.TypeHandle); - try - { - global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Assembly initialized: global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests"); - } - catch { /* TUnit.Core not available - skip logging */ } - } - catch (global::System.Exception ex) - { - try - { - global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Failed to load global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests: " + ex.Message); - } - catch { /* TUnit.Core not available - skip logging */ } - } - global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(global::TUnit.Generated.TUnit_TestRegistration).TypeHandle); - global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(global::TUnit.Generated.TUnit_HookRegistration).TypeHandle); - global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(global::TUnit.Generated.TUnit_PropertyRegistration).TypeHandle); - global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(global::TUnit.Generated.TUnit_ConverterRegistration).TypeHandle); - global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(global::TUnit.Generated.TUnit_StaticPropertyRegistration).TypeHandle); - global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(global::TUnit.Generated.TUnit_DynamicTestRegistration).TypeHandle); - try - { - global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogDebug("[ModuleInitializer:TestsBase`1] TUnit infrastructure initialized"); - } - catch { /* TUnit.Core not available - skip logging */ } - } -} -namespace TUnit.Generated -{ - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] - internal static partial class TUnit_TestRegistration { } - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] - internal static partial class TUnit_HookRegistration { } - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] - internal static partial class TUnit_PropertyRegistration { } - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] - internal static partial class TUnit_ConverterRegistration { } - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] - internal static partial class TUnit_StaticPropertyRegistration { } - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] - internal static partial class TUnit_DynamicTestRegistration { } -} diff --git a/tests/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet8_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet8_0.verified.txt rename to tests/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet11_0.verified.txt diff --git a/tests/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet9_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet9_0.verified.txt deleted file mode 100644 index fb6af1e0f71..00000000000 --- a/tests/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet9_0.verified.txt +++ /dev/null @@ -1,346 +0,0 @@ -// -#pragma warning disable - -#nullable enable -namespace TUnit.Generated; -[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] -[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")] -internal static class TUnit_TestProject_STAThreadTests__TestSource -{ - private static readonly global::TUnit.Core.ClassMetadata __classMetadata = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.STAThreadTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.STAThreadTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.STAThreadTests)), - Name = "STAThreadTests", - Namespace = "TUnit.TestProject", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }); - private static readonly global::System.Type __classType = typeof(global::TUnit.TestProject.STAThreadTests); - private static global::TUnit.TestProject.STAThreadTests __CreateInstance(global::System.Type[] typeArgs, object?[] args) - { - return new global::TUnit.TestProject.STAThreadTests(); - } - private static global::System.Threading.Tasks.ValueTask __Invoke(global::TUnit.TestProject.STAThreadTests instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken) - { - try - { - switch (methodIndex) - { - case 0: - { - return new global::System.Threading.Tasks.ValueTask(instance.With_STA()); - } - case 1: - { - return new global::System.Threading.Tasks.ValueTask(instance.Without_STA()); - } - case 2: - { - return new global::System.Threading.Tasks.ValueTask(instance.STA_WithSimpleAwait()); - } - case 3: - { - return new global::System.Threading.Tasks.ValueTask(instance.STA_WithTaskYield()); - } - case 4: - { - return new global::System.Threading.Tasks.ValueTask(instance.STA_WithConfigureAwaitTrue()); - } - case 5: - { - return new global::System.Threading.Tasks.ValueTask(instance.STA_WithNestedAsyncCalls()); - } - case 6: - { - return new global::System.Threading.Tasks.ValueTask(instance.STA_WithTaskFromResult()); - } - case 7: - { - return new global::System.Threading.Tasks.ValueTask(instance.STA_WithCompletedTask()); - } - case 8: - { - return new global::System.Threading.Tasks.ValueTask(instance.STA_WithTaskRun()); - } - case 9: - { - return new global::System.Threading.Tasks.ValueTask(instance.STA_WithMultipleAwaits()); - } - case 10: - { - return new global::System.Threading.Tasks.ValueTask(instance.STA_WithAsyncEnumerable()); - } - case 11: - { - return new global::System.Threading.Tasks.ValueTask(instance.STA_WithTaskWhenAll()); - } - case 12: - { - return new global::System.Threading.Tasks.ValueTask(instance.STA_WithExceptionHandling()); - } - case 13: - { - return new global::System.Threading.Tasks.ValueTask(instance.STA_WithThrowsNothingAssertion()); - } - case 14: - { - return new global::System.Threading.Tasks.ValueTask(instance.STA_WithFuncAssertion()); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(methodIndex)); - } - } - catch (global::System.Exception ex) - { - return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex)); - } - } - private static global::System.Attribute[] __Attributes(int groupIndex) - { - switch (groupIndex) - { - case 0: - { - return - [ - new global::TUnit.Core.TestAttribute(), - new global::TUnit.Core.Executors.STAThreadExecutorAttribute(), - new global::TUnit.TestProject.Attributes.EngineTest(global::TUnit.TestProject.Attributes.ExpectedResult.Pass), - new global::TUnit.Core.RunOnAttribute(global::TUnit.Core.Enums.OS.Windows), - new global::TUnit.Core.RepeatAttribute(10) - ]; - } - case 1: - { - return - [ - new global::TUnit.Core.TestAttribute(), - new global::TUnit.TestProject.Attributes.EngineTest(global::TUnit.TestProject.Attributes.ExpectedResult.Pass), - new global::TUnit.Core.RunOnAttribute(global::TUnit.Core.Enums.OS.Windows), - new global::TUnit.Core.RepeatAttribute(10) - ]; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(groupIndex)); - } - } - private static readonly global::System.Func __createInstance = __CreateInstance; - private static readonly global::System.Func __invoke = __Invoke; - private static readonly global::System.Func __attributes = __Attributes; - public static readonly global::TUnit.Core.TestEntry[] Entries = __CreateEntries(); - private static global::TUnit.Core.TestEntry[] __CreateEntries() - { - var entries = new global::TUnit.Core.TestEntry[15]; - __FillEntries0(entries); - __FillEntries1(entries); - return entries; - } - private static void __FillEntries0(global::TUnit.Core.TestEntry[] entries) - { - entries[0] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "With_STA", - fullyQualifiedName: "TUnit.TestProject.STAThreadTests.With_STA", - filePath: "", - lineNumber: 19, - repeatCount: 10, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 0, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[1] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "Without_STA", - fullyQualifiedName: "TUnit.TestProject.STAThreadTests.Without_STA", - filePath: "", - lineNumber: 25, - repeatCount: 10, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 1, - createAttributes: __attributes, - attributeGroupIndex: 1); - entries[2] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "STA_WithSimpleAwait", - fullyQualifiedName: "TUnit.TestProject.STAThreadTests.STA_WithSimpleAwait", - filePath: "", - lineNumber: 31, - repeatCount: 10, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 2, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[3] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "STA_WithTaskYield", - fullyQualifiedName: "TUnit.TestProject.STAThreadTests.STA_WithTaskYield", - filePath: "", - lineNumber: 41, - repeatCount: 10, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 3, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[4] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "STA_WithConfigureAwaitTrue", - fullyQualifiedName: "TUnit.TestProject.STAThreadTests.STA_WithConfigureAwaitTrue", - filePath: "", - lineNumber: 50, - repeatCount: 10, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 4, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[5] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "STA_WithNestedAsyncCalls", - fullyQualifiedName: "TUnit.TestProject.STAThreadTests.STA_WithNestedAsyncCalls", - filePath: "", - lineNumber: 59, - repeatCount: 10, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 5, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[6] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "STA_WithTaskFromResult", - fullyQualifiedName: "TUnit.TestProject.STAThreadTests.STA_WithTaskFromResult", - filePath: "", - lineNumber: 69, - repeatCount: 10, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 6, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[7] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "STA_WithCompletedTask", - fullyQualifiedName: "TUnit.TestProject.STAThreadTests.STA_WithCompletedTask", - filePath: "", - lineNumber: 79, - repeatCount: 10, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 7, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[8] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "STA_WithTaskRun", - fullyQualifiedName: "TUnit.TestProject.STAThreadTests.STA_WithTaskRun", - filePath: "", - lineNumber: 88, - repeatCount: 10, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 8, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[9] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "STA_WithMultipleAwaits", - fullyQualifiedName: "TUnit.TestProject.STAThreadTests.STA_WithMultipleAwaits", - filePath: "", - lineNumber: 103, - repeatCount: 10, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 9, - createAttributes: __attributes, - attributeGroupIndex: 0); - } - private static void __FillEntries1(global::TUnit.Core.TestEntry[] entries) - { - entries[10] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "STA_WithAsyncEnumerable", - fullyQualifiedName: "TUnit.TestProject.STAThreadTests.STA_WithAsyncEnumerable", - filePath: "", - lineNumber: 121, - repeatCount: 10, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 10, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[11] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "STA_WithTaskWhenAll", - fullyQualifiedName: "TUnit.TestProject.STAThreadTests.STA_WithTaskWhenAll", - filePath: "", - lineNumber: 135, - repeatCount: 10, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 11, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[12] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "STA_WithExceptionHandling", - fullyQualifiedName: "TUnit.TestProject.STAThreadTests.STA_WithExceptionHandling", - filePath: "", - lineNumber: 152, - repeatCount: 10, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 12, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[13] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "STA_WithThrowsNothingAssertion", - fullyQualifiedName: "TUnit.TestProject.STAThreadTests.STA_WithThrowsNothingAssertion", - filePath: "", - lineNumber: 199, - repeatCount: 10, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 13, - createAttributes: __attributes, - attributeGroupIndex: 0); - entries[14] = global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "STA_WithFuncAssertion", - fullyQualifiedName: "TUnit.TestProject.STAThreadTests.STA_WithFuncAssertion", - filePath: "", - lineNumber: 216, - repeatCount: 10, - returnType: typeof(global::System.Threading.Tasks.Task), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 14, - createAttributes: __attributes, - attributeGroupIndex: 0); - } -} -internal static partial class TUnit_TestRegistration -{ - static readonly int _r_TUnit_TestProject_STAThreadTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterEntries(static () => TUnit_TestProject_STAThreadTests__TestSource.Entries); -} diff --git a/tests/TUnit.Core.SourceGenerator.Tests/TUnit.Core.SourceGenerator.Tests.csproj b/tests/TUnit.Core.SourceGenerator.Tests/TUnit.Core.SourceGenerator.Tests.csproj index 1c7bb71f485..a8b8b1470b9 100644 --- a/tests/TUnit.Core.SourceGenerator.Tests/TUnit.Core.SourceGenerator.Tests.csproj +++ b/tests/TUnit.Core.SourceGenerator.Tests/TUnit.Core.SourceGenerator.Tests.csproj @@ -3,7 +3,7 @@ - $(WindowsNetFrameworkTestTarget)net8.0;net9.0;net10.0 + $(WindowsNetFrameworkTestTarget)net10.0;net11.0 diff --git a/tests/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet8_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet8_0.verified.txt rename to tests/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet11_0.verified.txt diff --git a/tests/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet9_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet9_0.verified.txt deleted file mode 100644 index adc5d86546a..00000000000 --- a/tests/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet9_0.verified.txt +++ /dev/null @@ -1,242 +0,0 @@ -// -#pragma warning disable - -#nullable enable -namespace TUnit.Generated; -[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] -[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")] -internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource -{ - private static readonly global::TUnit.Core.ClassMetadata __classMetadata = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.Bugs._1889.DerivedTest", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest)), - Name = "DerivedTest", - Namespace = "TUnit.TestProject.Bugs._1889", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }); - private static readonly global::System.Type __classType = typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest); - private static readonly global::TUnit.Core.MethodMetadata __mm_0 = global::TUnit.Core.MethodMetadataFactory.Create("Test1", __classType, typeof(void), __classMetadata); - private static global::TUnit.TestProject.Bugs._1889.DerivedTest __CreateInstance_0(global::System.Type[] typeArgs, object?[] args) - { - return new global::TUnit.TestProject.Bugs._1889.DerivedTest(); - } - private static global::System.Threading.Tasks.ValueTask __Invoke_0(global::TUnit.TestProject.Library.Bugs._1889.BaseTest instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken) - { - try - { - instance.Test1(); - return default(global::System.Threading.Tasks.ValueTask); - } - catch (global::System.Exception ex) - { - return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex)); - } - } - private static global::System.Attribute[] __Attributes_0(int groupIndex) - { - return new global::System.Attribute[] - { - new global::TUnit.Core.TestAttribute(), - new global::TUnit.TestProject.Attributes.EngineTest(global::TUnit.TestProject.Attributes.ExpectedResult.Pass), - new global::TUnit.Core.InheritsTestsAttribute() - }; - } - public static readonly global::TUnit.Core.TestEntry[] Entries_0 = new global::TUnit.Core.TestEntry[] - { - global::TUnit.Core.TestEntryFactory.Create( - methodName: "Test1", - fullyQualifiedName: "TUnit.TestProject.Bugs._1889.DerivedTest.Test1", - filePath: "", - lineNumber: 6, - methodMetadata: __mm_0, - createInstance: __CreateInstance_0, - invokeBody: __Invoke_0, - methodIndex: 0, - createAttributes: __Attributes_0, - attributeGroupIndex: 0), - }; -} -internal static partial class TUnit_TestRegistration -{ - static readonly int _r_TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource_0 = global::TUnit.Core.SourceRegistrar.RegisterEntries(static () => TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource.Entries_0); -} - - -// ===== FILE SEPARATOR ===== - -// -#pragma warning disable - -#nullable enable -namespace TUnit.Generated; -[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] -[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")] -internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource -{ - private static readonly global::TUnit.Core.ClassMetadata __classMetadata = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.Bugs._1889.DerivedTest", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest)), - Name = "DerivedTest", - Namespace = "TUnit.TestProject.Bugs._1889", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }); - private static readonly global::System.Type __classType = typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest); - private static readonly global::TUnit.Core.MethodMetadata __mm_0 = global::TUnit.Core.MethodMetadataFactory.Create("Test2", __classType, typeof(void), __classMetadata, parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.Library.Bugs._1889.BaseTest), "Test2", false, new global::TUnit.Core.ParameterMetadata[] -{ -global::TUnit.Core.ParameterMetadataFactory.Create(typeof(bool), "condition", new global::TUnit.Core.ConcreteType(typeof(bool)), false) -})); - private static global::TUnit.TestProject.Bugs._1889.DerivedTest __CreateInstance_0(global::System.Type[] typeArgs, object?[] args) - { - return new global::TUnit.TestProject.Bugs._1889.DerivedTest(); - } - private static global::System.Threading.Tasks.ValueTask __Invoke_0(global::TUnit.TestProject.Library.Bugs._1889.BaseTest instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken) - { - try - { - switch (args.Length) - { - case 1: - { - instance.Test2(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - catch (global::System.Exception ex) - { - return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex)); - } - } - private static global::System.Attribute[] __Attributes_0(int groupIndex) - { - return new global::System.Attribute[] - { - new global::TUnit.Core.TestAttribute(), - new global::TUnit.Core.MatrixDataSourceAttribute(), - new global::TUnit.TestProject.Attributes.EngineTest(global::TUnit.TestProject.Attributes.ExpectedResult.Pass), - new global::TUnit.Core.InheritsTestsAttribute() - }; - } - public static readonly global::TUnit.Core.TestEntry[] Entries_0 = new global::TUnit.Core.TestEntry[] - { - global::TUnit.Core.TestEntryFactory.Create( - methodName: "Test2", - fullyQualifiedName: "TUnit.TestProject.Bugs._1889.DerivedTest.Test2", - filePath: "", - lineNumber: 12, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.MatrixDataSourceAttribute(), -}, - methodMetadata: __mm_0, - createInstance: __CreateInstance_0, - invokeBody: __Invoke_0, - methodIndex: 0, - createAttributes: __Attributes_0, - attributeGroupIndex: 0), - }; -} -internal static partial class TUnit_TestRegistration -{ - static readonly int _r_TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource_0 = global::TUnit.Core.SourceRegistrar.RegisterEntries(static () => TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource.Entries_0); -} - - -// ===== FILE SEPARATOR ===== - -// -#pragma warning disable - -#nullable enable -namespace TUnit.Generated; -[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] -[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")] -internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource -{ - private static readonly global::TUnit.Core.ClassMetadata __classMetadata = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.Bugs._1889.DerivedTest", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest)), - Name = "DerivedTest", - Namespace = "TUnit.TestProject.Bugs._1889", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }); - private static readonly global::System.Type __classType = typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest); - private static readonly global::TUnit.Core.MethodMetadata __mm_0 = global::TUnit.Core.MethodMetadataFactory.Create("Test3", __classType, typeof(void), __classMetadata, parameters: global::TUnit.Core.ParameterMetadataFactory.ForMethod(typeof(global::TUnit.TestProject.Library.Bugs._1889.BaseTest), "Test3", false, new global::TUnit.Core.ParameterMetadata[] -{ -global::TUnit.Core.ParameterMetadataFactory.Create(typeof(bool), "condition", new global::TUnit.Core.ConcreteType(typeof(bool)), false) -})); - private static global::TUnit.TestProject.Bugs._1889.DerivedTest __CreateInstance_0(global::System.Type[] typeArgs, object?[] args) - { - return new global::TUnit.TestProject.Bugs._1889.DerivedTest(); - } - private static global::System.Threading.Tasks.ValueTask __Invoke_0(global::TUnit.TestProject.Library.Bugs._1889.BaseTest instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken) - { - try - { - switch (args.Length) - { - case 1: - { - instance.Test3(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); - return default(global::System.Threading.Tasks.ValueTask); - } - default: - throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}"); - } - } - catch (global::System.Exception ex) - { - return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex)); - } - } - private static global::System.Attribute[] __Attributes_0(int groupIndex) - { - return new global::System.Attribute[] - { - new global::TUnit.Core.TestAttribute(), - new global::TUnit.Core.ArgumentsAttribute(false), - new global::TUnit.Core.ArgumentsAttribute(true), - new global::TUnit.TestProject.Attributes.EngineTest(global::TUnit.TestProject.Attributes.ExpectedResult.Pass), - new global::TUnit.Core.InheritsTestsAttribute() - }; - } - public static readonly global::TUnit.Core.TestEntry[] Entries_0 = new global::TUnit.Core.TestEntry[] - { - global::TUnit.Core.TestEntryFactory.Create( - methodName: "Test3", - fullyQualifiedName: "TUnit.TestProject.Bugs._1889.DerivedTest.Test3", - filePath: "", - lineNumber: 19, - hasDataSource: true, - testDataSources: new global::TUnit.Core.IDataSourceAttribute[] -{ - new global::TUnit.Core.ArgumentsAttribute(false), - new global::TUnit.Core.ArgumentsAttribute(true), -}, - methodMetadata: __mm_0, - createInstance: __CreateInstance_0, - invokeBody: __Invoke_0, - methodIndex: 0, - createAttributes: __Attributes_0, - attributeGroupIndex: 0), - }; -} -internal static partial class TUnit_TestRegistration -{ - static readonly int _r_TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource_0 = global::TUnit.Core.SourceRegistrar.RegisterEntries(static () => TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource.Entries_0); -} diff --git a/tests/TUnit.Core.SourceGenerator.Tests/ValueTaskResultTests.Test.DotNet8_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/ValueTaskResultTests.Test.DotNet11_0.verified.txt similarity index 100% rename from tests/TUnit.Core.SourceGenerator.Tests/ValueTaskResultTests.Test.DotNet8_0.verified.txt rename to tests/TUnit.Core.SourceGenerator.Tests/ValueTaskResultTests.Test.DotNet11_0.verified.txt diff --git a/tests/TUnit.Core.SourceGenerator.Tests/ValueTaskResultTests.Test.DotNet9_0.verified.txt b/tests/TUnit.Core.SourceGenerator.Tests/ValueTaskResultTests.Test.DotNet9_0.verified.txt deleted file mode 100644 index 1ef031df63e..00000000000 --- a/tests/TUnit.Core.SourceGenerator.Tests/ValueTaskResultTests.Test.DotNet9_0.verified.txt +++ /dev/null @@ -1,151 +0,0 @@ -// -#pragma warning disable - -#nullable enable -namespace TUnit.Generated; -[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] -[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")] -internal static class TUnit_TestProject_ValueTaskResultTests_GenericMethodValueTaskResult_TestSource -{ - private static readonly global::TUnit.Core.ClassMetadata __classMetadata = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.ValueTaskResultTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.ValueTaskResultTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.ValueTaskResultTests)), - Name = "ValueTaskResultTests", - Namespace = "TUnit.TestProject", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }); - private static readonly global::System.Type __classType = typeof(global::TUnit.TestProject.ValueTaskResultTests); - private static readonly global::TUnit.Core.MethodMetadata __mm_0 = global::TUnit.Core.MethodMetadataFactory.Create("GenericMethodValueTaskResult", __classType, typeof(global::System.Threading.Tasks.ValueTask), __classMetadata, genericTypeCount: 1); - private static global::TUnit.TestProject.ValueTaskResultTests __CreateInstance_0(global::System.Type[] typeArgs, object?[] args) - { - return new global::TUnit.TestProject.ValueTaskResultTests(); - } - private static global::System.Threading.Tasks.ValueTask __Invoke_0(global::TUnit.TestProject.ValueTaskResultTests instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken) - { - try - { - return new global::System.Threading.Tasks.ValueTask(instance.GenericMethodValueTaskResult().AsTask()); - } - catch (global::System.Exception ex) - { - return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex)); - } - } - private static global::System.Attribute[] __Attributes_0(int groupIndex) - { - return new global::System.Attribute[] - { - new global::TUnit.Core.TestAttribute(), - new global::TUnit.Core.GenerateGenericTestAttribute(typeof(int)) - }; - } - public static readonly global::TUnit.Core.TestEntry[] Entries_0 = new global::TUnit.Core.TestEntry[] - { - global::TUnit.Core.TestEntryFactory.Create( - methodName: "GenericMethodValueTaskResult", - fullyQualifiedName: "TUnit.TestProject.ValueTaskResultTests.GenericMethodValueTaskResult", - methodTypeArgumentsIdentity: "", - filePath: "", - lineNumber: 8, - methodMetadata: __mm_0, - createInstance: __CreateInstance_0, - invokeBody: __Invoke_0, - methodIndex: 0, - createAttributes: __Attributes_0, - attributeGroupIndex: 0), - }; -} -internal static partial class TUnit_TestRegistration -{ - static readonly int _r_TUnit_TestProject_ValueTaskResultTests_GenericMethodValueTaskResult_TestSource_0 = global::TUnit.Core.SourceRegistrar.RegisterEntries(static () => TUnit_TestProject_ValueTaskResultTests_GenericMethodValueTaskResult_TestSource.Entries_0); -} - - -// ===== FILE SEPARATOR ===== - -// -#pragma warning disable - -#nullable enable -namespace TUnit.Generated; -[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] -[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")] -internal static class TUnit_TestProject_ValueTaskResultTests__TestSource -{ - private static readonly global::TUnit.Core.ClassMetadata __classMetadata = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.ValueTaskResultTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.ValueTaskResultTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.ValueTaskResultTests)), - Name = "ValueTaskResultTests", - Namespace = "TUnit.TestProject", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }); - private static readonly global::System.Type __classType = typeof(global::TUnit.TestProject.ValueTaskResultTests); - private static global::TUnit.TestProject.ValueTaskResultTests __CreateInstance(global::System.Type[] typeArgs, object?[] args) - { - return new global::TUnit.TestProject.ValueTaskResultTests(); - } - private static global::System.Threading.Tasks.ValueTask __Invoke(global::TUnit.TestProject.ValueTaskResultTests instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken) - { - try - { - switch (methodIndex) - { - case 0: - { - return new global::System.Threading.Tasks.ValueTask(instance.GenericValueTaskResult().AsTask()); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(methodIndex)); - } - } - catch (global::System.Exception ex) - { - return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex)); - } - } - private static global::System.Attribute[] __Attributes(int groupIndex) - { - switch (groupIndex) - { - case 0: - { - return - [ - new global::TUnit.Core.TestAttribute() - ]; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(groupIndex)); - } - } - private static readonly global::System.Func __createInstance = __CreateInstance; - private static readonly global::System.Func __invoke = __Invoke; - private static readonly global::System.Func __attributes = __Attributes; - public static readonly global::TUnit.Core.TestEntry[] Entries = new global::TUnit.Core.TestEntry[] - { - global::TUnit.Core.TestEntryFactory.CreateWithClassMetadata( - methodName: "GenericValueTaskResult", - fullyQualifiedName: "TUnit.TestProject.ValueTaskResultTests.GenericValueTaskResult", - filePath: "", - lineNumber: 5, - returnType: typeof(global::System.Threading.Tasks.ValueTask), - classMetadata: __classMetadata, - createInstance: __createInstance, - invokeBody: __invoke, - methodIndex: 0, - createAttributes: __attributes, - attributeGroupIndex: 0), - }; -} -internal static partial class TUnit_TestRegistration -{ - static readonly int _r_TUnit_TestProject_ValueTaskResultTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterEntries(static () => TUnit_TestProject_ValueTaskResultTests__TestSource.Entries); -} diff --git a/tests/TUnit.Mocks.Http.Tests/TUnit.Mocks.Http.Tests.csproj b/tests/TUnit.Mocks.Http.Tests/TUnit.Mocks.Http.Tests.csproj index cbc975737b2..63df3b41ffe 100644 --- a/tests/TUnit.Mocks.Http.Tests/TUnit.Mocks.Http.Tests.csproj +++ b/tests/TUnit.Mocks.Http.Tests/TUnit.Mocks.Http.Tests.csproj @@ -3,7 +3,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 diff --git a/tests/TUnit.Mocks.Logging.Tests/TUnit.Mocks.Logging.Tests.csproj b/tests/TUnit.Mocks.Logging.Tests/TUnit.Mocks.Logging.Tests.csproj index 48c270286a5..176614eed8a 100644 --- a/tests/TUnit.Mocks.Logging.Tests/TUnit.Mocks.Logging.Tests.csproj +++ b/tests/TUnit.Mocks.Logging.Tests/TUnit.Mocks.Logging.Tests.csproj @@ -3,7 +3,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 diff --git a/tests/TUnit.Mocks.SourceGenerator.Tests/MockGeneratorTests.cs b/tests/TUnit.Mocks.SourceGenerator.Tests/MockGeneratorTests.cs index 9b400d23bf7..037901df8e3 100644 --- a/tests/TUnit.Mocks.SourceGenerator.Tests/MockGeneratorTests.cs +++ b/tests/TUnit.Mocks.SourceGenerator.Tests/MockGeneratorTests.cs @@ -1868,7 +1868,7 @@ void M() public Task External_Interface_With_Indexer_Static_Extension_Discovery() { var externalSource = """ - namespace Microsoft.Extensions.Configuration + namespace External.Configuration { public interface IConfiguration { @@ -1878,10 +1878,12 @@ public interface IConfiguration } """; - var externalRef = CreateExternalAssemblyReference(externalSource, "Microsoft.Extensions.Configuration.Abstractions"); + // Not named after a real assembly: .NET 11 ships Microsoft.Extensions.Configuration.Abstractions + // in the shared framework, and a stand-in with that name collides with it. + var externalRef = CreateExternalAssemblyReference(externalSource, "External.Configuration.Abstractions"); var source = """ - using Microsoft.Extensions.Configuration; + using External.Configuration; using TUnit.Mocks; public class MyService @@ -1905,12 +1907,12 @@ void M() AssertContains( generated, "sealed class IConfigurationMock : " - + "global::TUnit.Mocks.Mock, " - + "global::Microsoft.Extensions.Configuration.IConfiguration"); - AssertContains(generated, "string? global::Microsoft.Extensions.Configuration.IConfiguration.this[string key]"); + + "global::TUnit.Mocks.Mock, " + + "global::External.Configuration.IConfiguration"); + AssertContains(generated, "string? global::External.Configuration.IConfiguration.this[string key]"); AssertContains( generated, - "public static global::Microsoft.Extensions.Configuration.IConfigurationMock Mock" + "public static global::External.Configuration.IConfigurationMock Mock" + "(global::TUnit.Mocks.MockBehavior behavior)"); return VerifyGeneratorOutput(source, [externalRef]); diff --git a/tests/TUnit.Mocks.SourceGenerator.Tests/Snapshots/External_Interface_With_Indexer_Static_Extension_Discovery.verified.txt b/tests/TUnit.Mocks.SourceGenerator.Tests/Snapshots/External_Interface_With_Indexer_Static_Extension_Discovery.verified.txt index 118e3e16232..db8680144ad 100644 --- a/tests/TUnit.Mocks.SourceGenerator.Tests/Snapshots/External_Interface_With_Indexer_Static_Extension_Discovery.verified.txt +++ b/tests/TUnit.Mocks.SourceGenerator.Tests/Snapshots/External_Interface_With_Indexer_Static_Extension_Discovery.verified.txt @@ -2,17 +2,17 @@ #pragma warning disable #nullable enable -namespace Microsoft.Extensions.Configuration +namespace External.Configuration { - public sealed class IConfigurationMock : global::TUnit.Mocks.Mock, global::Microsoft.Extensions.Configuration.IConfiguration + public sealed class IConfigurationMock : global::TUnit.Mocks.Mock, global::External.Configuration.IConfiguration { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - internal IConfigurationMock(global::Microsoft.Extensions.Configuration.IConfiguration mockObject, global::TUnit.Mocks.MockEngine engine) + internal IConfigurationMock(global::External.Configuration.IConfiguration mockObject, global::TUnit.Mocks.MockEngine engine) : base(mockObject, engine) { } - string? global::Microsoft.Extensions.Configuration.IConfiguration.GetSectionValue(string key) => Object.GetSectionValue(key); + string? global::External.Configuration.IConfiguration.GetSectionValue(string key) => Object.GetSectionValue(key); - string? global::Microsoft.Extensions.Configuration.IConfiguration.this[string key] { get => Object[key]; set => Object[key] = value; } + string? global::External.Configuration.IConfiguration.this[string key] { get => Object[key]; set => Object[key] = value; } } } @@ -23,16 +23,16 @@ namespace Microsoft.Extensions.Configuration #pragma warning disable #nullable enable -namespace Microsoft.Extensions.Configuration +namespace External.Configuration { - file sealed class IConfigurationMockImpl : global::Microsoft.Extensions.Configuration.IConfiguration, global::TUnit.Mocks.IRaisable, global::TUnit.Mocks.IMockObject + file sealed class IConfigurationMockImpl : global::External.Configuration.IConfiguration, global::TUnit.Mocks.IRaisable, global::TUnit.Mocks.IMockObject { - private readonly global::TUnit.Mocks.MockEngine _engine; + private readonly global::TUnit.Mocks.MockEngine _engine; [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] global::TUnit.Mocks.IMock? global::TUnit.Mocks.IMockObject.MockWrapper { get; set; } - internal IConfigurationMockImpl(global::TUnit.Mocks.MockEngine engine) + internal IConfigurationMockImpl(global::TUnit.Mocks.MockEngine engine) { _engine = engine; } @@ -60,22 +60,22 @@ namespace Microsoft.Extensions.Configuration [global::System.Runtime.CompilerServices.ModuleInitializer] internal static void Register() { - global::TUnit.Mocks.MockRegistry.RegisterFactory(Create); + global::TUnit.Mocks.MockRegistry.RegisterFactory(Create); } - internal static global::TUnit.Mocks.Mock CreateAutoMock(global::TUnit.Mocks.MockBehavior behavior) + internal static global::TUnit.Mocks.Mock CreateAutoMock(global::TUnit.Mocks.MockBehavior behavior) { - var engine = new global::TUnit.Mocks.MockEngine(behavior); + var engine = new global::TUnit.Mocks.MockEngine(behavior); var impl = new IConfigurationMockImpl(engine); engine.Raisable = impl; var mock = new IConfigurationMock(impl, engine); return mock; } - internal static global::TUnit.Mocks.Mock Create(global::TUnit.Mocks.MockBehavior behavior, object[] constructorArgs) + internal static global::TUnit.Mocks.Mock Create(global::TUnit.Mocks.MockBehavior behavior, object[] constructorArgs) { - if (constructorArgs.Length > 0) throw new global::System.ArgumentException($"Interface mock 'global::Microsoft.Extensions.Configuration.IConfiguration' does not support constructor arguments, but {constructorArgs.Length} were provided."); - var engine = new global::TUnit.Mocks.MockEngine(behavior); + if (constructorArgs.Length > 0) throw new global::System.ArgumentException($"Interface mock 'global::External.Configuration.IConfiguration' does not support constructor arguments, but {constructorArgs.Length} were provided."); + var engine = new global::TUnit.Mocks.MockEngine(behavior); var impl = new IConfigurationMockImpl(engine); engine.Raisable = impl; var mock = new IConfigurationMock(impl, engine); @@ -93,28 +93,28 @@ namespace Microsoft.Extensions.Configuration namespace TUnit.Mocks.Generated { - public static class Microsoft_Extensions_Configuration_IConfiguration_MockMemberExtensions + public static class External_Configuration_IConfiguration_MockMemberExtensions { - public static Microsoft_Extensions_Configuration_IConfiguration_GetSectionValue_M0_MockCall GetSectionValue(this global::TUnit.Mocks.Mock mock, global::TUnit.Mocks.Arguments.Arg key) + public static External_Configuration_IConfiguration_GetSectionValue_M0_MockCall GetSectionValue(this global::TUnit.Mocks.Mock mock, global::TUnit.Mocks.Arguments.Arg key) { var matchers = new global::TUnit.Mocks.Arguments.IArgumentMatcher[] { key.Matcher }; - return new Microsoft_Extensions_Configuration_IConfiguration_GetSectionValue_M0_MockCall(global::TUnit.Mocks.MockRegistry.GetEngine(mock), 0, "GetSectionValue", matchers); + return new External_Configuration_IConfiguration_GetSectionValue_M0_MockCall(global::TUnit.Mocks.MockRegistry.GetEngine(mock), 0, "GetSectionValue", matchers); } - public static Microsoft_Extensions_Configuration_IConfiguration_GetSectionValue_M0_MockCall GetSectionValue(this global::TUnit.Mocks.Mock mock, global::System.Func? key) + public static External_Configuration_IConfiguration_GetSectionValue_M0_MockCall GetSectionValue(this global::TUnit.Mocks.Mock mock, global::System.Func? key) { global::TUnit.Mocks.Arguments.Arg __fa_key = key is null ? global::TUnit.Mocks.Arguments.Arg.Is(default(string)!) : (global::TUnit.Mocks.Arguments.Arg)key; var matchers = new global::TUnit.Mocks.Arguments.IArgumentMatcher[] { __fa_key.Matcher }; - return new Microsoft_Extensions_Configuration_IConfiguration_GetSectionValue_M0_MockCall(global::TUnit.Mocks.MockRegistry.GetEngine(mock), 0, "GetSectionValue", matchers); + return new External_Configuration_IConfiguration_GetSectionValue_M0_MockCall(global::TUnit.Mocks.MockRegistry.GetEngine(mock), 0, "GetSectionValue", matchers); } - public static global::TUnit.Mocks.MockMethodCall Item(this global::TUnit.Mocks.Mock mock, global::TUnit.Mocks.Arguments.Arg key) + public static global::TUnit.Mocks.MockMethodCall Item(this global::TUnit.Mocks.Mock mock, global::TUnit.Mocks.Arguments.Arg key) { var matchers = new global::TUnit.Mocks.Arguments.IArgumentMatcher[] { key.Matcher }; return new global::TUnit.Mocks.MockMethodCall(global::TUnit.Mocks.MockRegistry.GetEngine(mock), 1, "get_Item", matchers); } - public static global::TUnit.Mocks.VoidMockMethodCall SetItem(this global::TUnit.Mocks.Mock mock, global::TUnit.Mocks.Arguments.Arg key, global::TUnit.Mocks.Arguments.Arg value) + public static global::TUnit.Mocks.VoidMockMethodCall SetItem(this global::TUnit.Mocks.Mock mock, global::TUnit.Mocks.Arguments.Arg key, global::TUnit.Mocks.Arguments.Arg value) { var matchers = new global::TUnit.Mocks.Arguments.IArgumentMatcher[] { key.Matcher, value.Matcher }; return new global::TUnit.Mocks.VoidMockMethodCall(global::TUnit.Mocks.MockRegistry.GetEngine(mock), 2, "set_Item", matchers); @@ -122,38 +122,38 @@ namespace TUnit.Mocks.Generated #if NET9_0_OR_GREATER [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static void ClearCalls(this global::TUnit.Mocks.Mock mock) + public static void ClearCalls(this global::TUnit.Mocks.Mock mock) => global::TUnit.Mocks.Mock.ClearCalls(mock); [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static void Reset(this global::TUnit.Mocks.Mock mock) + public static void Reset(this global::TUnit.Mocks.Mock mock) => global::TUnit.Mocks.Mock.Reset(mock); [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static void VerifyAll(this global::TUnit.Mocks.Mock mock) + public static void VerifyAll(this global::TUnit.Mocks.Mock mock) => global::TUnit.Mocks.Mock.VerifyAll(mock); [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static void VerifyNoOtherCalls(this global::TUnit.Mocks.Mock mock) + public static void VerifyNoOtherCalls(this global::TUnit.Mocks.Mock mock) => global::TUnit.Mocks.Mock.VerifyNoOtherCalls(mock); [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static void SetupAllProperties(this global::TUnit.Mocks.Mock mock) + public static void SetupAllProperties(this global::TUnit.Mocks.Mock mock) => global::TUnit.Mocks.Mock.SetupAllProperties(mock); [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static global::TUnit.Mocks.Diagnostics.MockDiagnostics GetDiagnostics(this global::TUnit.Mocks.Mock mock) + public static global::TUnit.Mocks.Diagnostics.MockDiagnostics GetDiagnostics(this global::TUnit.Mocks.Mock mock) => global::TUnit.Mocks.Mock.GetDiagnostics(mock); [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static void SetState(this global::TUnit.Mocks.Mock mock, string? stateName) + public static void SetState(this global::TUnit.Mocks.Mock mock, string? stateName) => global::TUnit.Mocks.Mock.SetState(mock, stateName); [global::System.Runtime.CompilerServices.OverloadResolutionPriority(-1)] - public static void InState(this global::TUnit.Mocks.Mock mock, string stateName, global::System.Action> configure) + public static void InState(this global::TUnit.Mocks.Mock mock, string stateName, global::System.Action> configure) => global::TUnit.Mocks.Mock.InState(mock, stateName, configure); - extension(global::TUnit.Mocks.Mock mock) + extension(global::TUnit.Mocks.Mock mock) { public global::System.Collections.Generic.IReadOnlyList Invocations => global::TUnit.Mocks.Mock.Invocations(mock); @@ -169,27 +169,27 @@ namespace TUnit.Mocks.Generated } [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public sealed class Microsoft_Extensions_Configuration_IConfiguration_GetSectionValue_M0_MockCall : global::TUnit.Mocks.MockMethodCallBase + public sealed class External_Configuration_IConfiguration_GetSectionValue_M0_MockCall : global::TUnit.Mocks.MockMethodCallBase { - internal Microsoft_Extensions_Configuration_IConfiguration_GetSectionValue_M0_MockCall(global::TUnit.Mocks.IMockEngineAccess engine, int memberId, string memberName, global::TUnit.Mocks.Arguments.IArgumentMatcher[] matchers) + internal External_Configuration_IConfiguration_GetSectionValue_M0_MockCall(global::TUnit.Mocks.IMockEngineAccess engine, int memberId, string memberName, global::TUnit.Mocks.Arguments.IArgumentMatcher[] matchers) : base(engine, memberId, memberName, matchers, default) { } /// Configure a typed computed return value using the actual method parameters. - public Microsoft_Extensions_Configuration_IConfiguration_GetSectionValue_M0_MockCall Returns(global::System.Func factory) + public External_Configuration_IConfiguration_GetSectionValue_M0_MockCall Returns(global::System.Func factory) { EnsureSetup().Returns(args => factory((string)args[0]!)); return this; } /// Execute a typed callback using the actual method parameters. - public Microsoft_Extensions_Configuration_IConfiguration_GetSectionValue_M0_MockCall Callback(global::System.Action callback) + public External_Configuration_IConfiguration_GetSectionValue_M0_MockCall Callback(global::System.Action callback) { EnsureSetup().Callback(callback); return this; } /// Configure a typed computed exception using the actual method parameters. - public Microsoft_Extensions_Configuration_IConfiguration_GetSectionValue_M0_MockCall Throws(global::System.Func exceptionFactory) + public External_Configuration_IConfiguration_GetSectionValue_M0_MockCall Throws(global::System.Func exceptionFactory) { EnsureSetup().Throws(args => exceptionFactory((string)args[0]!)); return this; @@ -206,18 +206,18 @@ namespace TUnit.Mocks.Generated namespace TUnit.Mocks { - public static class Microsoft_Extensions_Configuration_IConfiguration_MockStaticExtension + public static class External_Configuration_IConfiguration_MockStaticExtension { - extension(global::Microsoft.Extensions.Configuration.IConfiguration _) + extension(global::External.Configuration.IConfiguration _) { - public static global::Microsoft.Extensions.Configuration.IConfigurationMock Mock() + public static global::External.Configuration.IConfigurationMock Mock() { - return (global::Microsoft.Extensions.Configuration.IConfigurationMock)global::Microsoft.Extensions.Configuration.IConfigurationMockFactory.CreateAutoMock(global::TUnit.Mocks.Mock.DefaultBehavior); + return (global::External.Configuration.IConfigurationMock)global::External.Configuration.IConfigurationMockFactory.CreateAutoMock(global::TUnit.Mocks.Mock.DefaultBehavior); } - public static global::Microsoft.Extensions.Configuration.IConfigurationMock Mock(global::TUnit.Mocks.MockBehavior behavior) + public static global::External.Configuration.IConfigurationMock Mock(global::TUnit.Mocks.MockBehavior behavior) { - return (global::Microsoft.Extensions.Configuration.IConfigurationMock)global::Microsoft.Extensions.Configuration.IConfigurationMockFactory.CreateAutoMock(behavior); + return (global::External.Configuration.IConfigurationMock)global::External.Configuration.IConfigurationMockFactory.CreateAutoMock(behavior); } } } diff --git a/tests/TUnit.Mocks.Tests/TUnit.Mocks.Tests.csproj b/tests/TUnit.Mocks.Tests/TUnit.Mocks.Tests.csproj index c6bed4eb7c8..fd0c26d97e1 100644 --- a/tests/TUnit.Mocks.Tests/TUnit.Mocks.Tests.csproj +++ b/tests/TUnit.Mocks.Tests/TUnit.Mocks.Tests.csproj @@ -30,7 +30,7 @@ - + diff --git a/tests/TUnit.PlatformSmoke/SmokeTest.cs b/tests/TUnit.PlatformSmoke/SmokeTest.cs index 13abf262085..0ec1353038e 100644 --- a/tests/TUnit.PlatformSmoke/SmokeTest.cs +++ b/tests/TUnit.PlatformSmoke/SmokeTest.cs @@ -21,8 +21,6 @@ public async Task RunsOnTheExpectedPlatform() await Assert.That(OperatingSystem.IsTvOS()).IsTrue(); #elif MACCATALYST await Assert.That(OperatingSystem.IsMacCatalyst()).IsTrue(); -#elif WASI - await Assert.That(OperatingSystem.IsWasi()).IsTrue(); #endif #if IOS || TVOS || MACCATALYST await Assert.That(System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture) diff --git a/tests/TUnit.PlatformSmoke/TUnit.PlatformSmoke.csproj b/tests/TUnit.PlatformSmoke/TUnit.PlatformSmoke.csproj index a373b0f15c1..c85711a09b6 100644 --- a/tests/TUnit.PlatformSmoke/TUnit.PlatformSmoke.csproj +++ b/tests/TUnit.PlatformSmoke/TUnit.PlatformSmoke.csproj @@ -1,4 +1,9 @@ + + + false + @@ -29,20 +34,17 @@ true + + net.dot.TUnitSmoke.TestInstrumentation apk false - - 11.0.0-rc.1.26425.128 - true + true false - - wasi-wasm - $(DefineConstants);WASI - browser-wasm true diff --git a/tests/TUnit.PublicAPI/TUnit.PublicAPI.csproj b/tests/TUnit.PublicAPI/TUnit.PublicAPI.csproj index f9d5736ba21..90f7f2569c4 100644 --- a/tests/TUnit.PublicAPI/TUnit.PublicAPI.csproj +++ b/tests/TUnit.PublicAPI/TUnit.PublicAPI.csproj @@ -3,7 +3,7 @@ - $(WindowsNetFrameworkTestTarget)net8.0;net9.0;net10.0 + $(WindowsNetFrameworkTestTarget)net10.0;net11.0 diff --git a/tests/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet9_0.verified.txt b/tests/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet11_0.verified.txt similarity index 99% rename from tests/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet9_0.verified.txt rename to tests/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet11_0.verified.txt index f9c6e8e2930..43e7e05cc3e 100644 --- a/tests/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet9_0.verified.txt +++ b/tests/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet11_0.verified.txt @@ -1,4 +1,4 @@ -[assembly: .(".NETCoreApp,Version=v9.0", FrameworkDisplayName=".NET 9.0")] +[assembly: .(".NETCoreApp,Version=v11.0", FrameworkDisplayName=".NET 11.0")] namespace .Abstractions { public interface ICollectionAdapter : ., . diff --git a/tests/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet8_0.verified.txt b/tests/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet8_0.verified.txt deleted file mode 100644 index 7e78d55b183..00000000000 --- a/tests/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet8_0.verified.txt +++ /dev/null @@ -1,7482 +0,0 @@ -[assembly: .(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")] -namespace .Abstractions -{ - public interface ICollectionAdapter : ., . - { - string? Description { get; } - } - public interface IContainsCheck - { - bool Contains(TItem item, .? comparer = null); - } - public interface ICountable - { - int Count { get; } - bool IsEmpty { get; } - } - public interface IDictionaryAdapter : .<.>, ., .<.>, ., . { } - public interface IIndexable - { - TItem this[int index] { get; } - int Length { get; } - } - public interface IItemSequence - { - . AsEnumerable(); - } - public interface IKeyLookup - { - bool ContainsKey(TKey key); - } - public interface IKeyValueAccess : . - { - . Keys { get; } - . Values { get; } - bool ContainsValue(TValue value, .? comparer = null); - bool TryGetValue(TKey key, out TValue? value); - } - public interface ISetAdapter : ., ., ., ., . { } - public interface ISetOperations - { - bool IsProperSubsetOf(. other); - bool IsProperSupersetOf(. other); - bool IsSubsetOf(. other); - bool IsSupersetOf(. other); - bool Overlaps(. other); - bool SetEquals(. other); - } -} -namespace .Adapters -{ - public readonly struct DictionaryAdapter : .<.>, ., ., .<.>, ., . - where TKey : notnull - { - public DictionaryAdapter(.? source) { } - public int Count { get; } - public string? Description { get; } - public bool IsEmpty { get; } - public . Keys { get; } - public . Values { get; } - public .<.> AsEnumerable() { } - public bool ContainsKey(TKey key) { } - public bool ContainsValue(TValue value, .? comparer = null) { } - public bool TryGetValue(TKey key, out TValue? value) { } - } - public readonly struct EnumerableAdapter : ., ., ., . - { - public EnumerableAdapter(.? source) { } - public int Count { get; } - public string? Description { get; } - public bool IsEmpty { get; } - public . AsEnumerable() { } - public bool Contains(TItem item, .? comparer = null) { } - } - public readonly struct ListAdapter : ., ., ., ., . - { - public ListAdapter(.? source) { } - public int Count { get; } - public string? Description { get; } - public bool IsEmpty { get; } - public TItem this[int index] { get; } - public int Length { get; } - public . AsEnumerable() { } - public bool Contains(TItem item, .? comparer = null) { } - } - public readonly struct MemoryAdapter : ., ., ., ., . - { - public MemoryAdapter( source) { } - public int Count { get; } - public string? Description { get; } - public bool IsEmpty { get; } - public TItem this[int index] { get; } - public int Length { get; } - public . AsEnumerable() { } - public bool Contains(TItem item, .? comparer = null) { } - } - public readonly struct ReadOnlyDictionaryAdapter : .<.>, ., ., .<.>, ., . - where TKey : notnull - { - public ReadOnlyDictionaryAdapter(.? source) { } - public int Count { get; } - public string? Description { get; } - public bool IsEmpty { get; } - public . Keys { get; } - public . Values { get; } - public .<.> AsEnumerable() { } - public bool ContainsKey(TKey key) { } - public bool ContainsValue(TValue value, .? comparer = null) { } - public bool TryGetValue(TKey key, out TValue? value) { } - } - public readonly struct ReadOnlyListAdapter : ., ., ., ., . - { - public ReadOnlyListAdapter(.? source) { } - public int Count { get; } - public string? Description { get; } - public bool IsEmpty { get; } - public TItem this[int index] { get; } - public int Length { get; } - public . AsEnumerable() { } - public bool Contains(TItem item, .? comparer = null) { } - } - public readonly struct ReadOnlyMemoryAdapter : ., ., ., ., . - { - public ReadOnlyMemoryAdapter( source) { } - public int Count { get; } - public string? Description { get; } - public bool IsEmpty { get; } - public TItem this[int index] { get; } - public int Length { get; } - public . AsEnumerable() { } - public bool Contains(TItem item, .? comparer = null) { } - } - public readonly struct ReadOnlySetAdapter : ., ., ., ., ., . - { - public ReadOnlySetAdapter(.? source) { } - public int Count { get; } - public string? Description { get; } - public bool IsEmpty { get; } - public . AsEnumerable() { } - public bool Contains(TItem item, .? comparer = null) { } - public bool IsProperSubsetOf(. other) { } - public bool IsProperSupersetOf(. other) { } - public bool IsSubsetOf(. other) { } - public bool IsSupersetOf(. other) { } - public bool Overlaps(. other) { } - public bool SetEquals(. other) { } - } - public readonly struct SetAdapter : ., ., ., ., ., . - { - public SetAdapter(.? source) { } - public int Count { get; } - public string? Description { get; } - public bool IsEmpty { get; } - public . AsEnumerable() { } - public bool Contains(TItem item, .? comparer = null) { } - public bool IsProperSubsetOf(. other) { } - public bool IsProperSupersetOf(. other) { } - public bool IsSubsetOf(. other) { } - public bool IsSupersetOf(. other) { } - public bool Overlaps(. other) { } - public bool SetEquals(. other) { } - } -} -namespace -{ - public static class Assert - { - public static void Fail(string reason) { } - public static Multiple() { } - public static void NotNull([.] T? value, [.("value")] string? expression = null) - where T : class { } - public static void NotNull([.] T? value, [.("value")] string? expression = null) - where T : struct { } - public static void Null(T? value, [.("value")] string? expression = null) - where T : class { } - public static void Null(T? value, [.("value")] string? expression = null) - where T : struct { } - public static void PropertyChanged(.INotifyPropertyChanged @object, string propertyName, action) { } - public static . PropertyChangedAsync(.INotifyPropertyChanged @object, string propertyName, <.> action) { } - public static .RaisedEvent Raises(<> attach, <> detach, action) - where T : { } - public static .RaisedEvent RaisesAny(<> attach, <> detach, action) - where T : { } - public static .<.RaisedEvent> RaisesAnyAsync(<> attach, <> detach, <.> action) - where T : { } - public static .<.RaisedEvent> RaisesAsync(<> attach, <> detach, <.> action) - where T : { } - public static . That( action, [.("action")] string? expression = null) { } - public static . That(.IEnumerable? value, [.("value")] string? expression = null) { } - public static . That(<.> action, [.("action")] string? expression = null) { } - public static . That(. task, [.("task")] string? expression = null) { } - public static . That(? value, [.("value")] string? expression = null) { } - public static . That(.StringValue value, [.("value")] string? expression = null) { } - public static . That(.? value, [.("value")] string? expression = null) { } - public static . That(. value, [.("value")] string? expression = null) { } - public static . That(.? value, [.("value")] string? expression = null) { } - public static . That(.? value, [.("value")] string? expression = null) { } - public static . That(.? value, [.("value")] string? expression = null) { } - public static . That(.? value, [.("value")] string? expression = null) { } - public static . That(.? value, [.("value")] string? expression = null) { } - public static . That(.? value, [.("value")] string? expression = null) { } - public static . That(.? value, [.("value")] string? expression = null) { } - public static . That(<.?> func, [.("func")] string? expression = null) { } - public static . That(<.<.?>> func, [.("func")] string? expression = null) { } - public static . That(<.> func, [.("func")] string? expression = null) { } - public static . That( func, [.("func")] string? expression = null) { } - public static . That( value, [.("value")] string? expression = null) { } - public static . That( value, [.("value")] string? expression = null) { } - public static . That(. task, [.("task")] string? expression = null) { } - public static . That(TItem[]? value, [.("value")] string? expression = null) { } - public static . That(TValue? value, [.("value")] string? expression = null) { } - public static . That(.? value, [.("value")] string? expression = null) - where TKey : notnull { } - public static . That(.? value, [.("value")] string? expression = null) - where TKey : notnull { } - public static Throws( exceptionType, action) { } - public static TException Throws( action) - where TException : { } - public static TException Throws(string parameterName, action) - where TException : { } - public static .<> ThrowsAsync(<.> action) { } - public static .<> ThrowsAsync(. task) { } - public static .<> ThrowsAsync(. task) { } - public static . ThrowsAsync( exceptionType, <.> action) { } - public static . ThrowsAsync(<.> action) - where TException : { } - public static . ThrowsAsync(string parameterName, <.> action) - where TException : { } - public static TException ThrowsExactly( action) - where TException : { } - public static TException ThrowsExactly(string parameterName, action) - where TException : { } - public static . ThrowsExactlyAsync(<.> action) - where TException : { } - public static . ThrowsExactlyAsync(string parameterName, <.> action) - where TException : { } - } - public static class Fail - { - public static void Test(string reason) { } - public static void Unless([.(false)] bool condition, string reason) { } - public static void When([.(true)] bool condition, string reason) { } - } - public class RaisedEvent - where T : - { - public RaisedEvent(object? sender, T arguments) { } - public T Arguments { get; } - public object? Sender { get; } - } - public class StringMatcher - { - public .StringMatcher IgnoringCase() { } - public bool IsMatch(string? input) { } - public override string ToString() { } - public static .StringMatcher AsRegex(string pattern) { } - public static .StringMatcher AsWildcard(string pattern) { } - } - public readonly struct StringValue - { - public string? Value { get; } - public static .StringValue op_Implicit(string? value) { } - } -} -namespace . -{ - public static class EnumAssertionExtensions - { - [.(ExpectationMessage="to not have flag {unexpectedFlag}")] - public static . DoesNotHaveFlag(this TEnum value, TEnum unexpectedFlag) - where TEnum : struct, { } - [.(ExpectationMessage="to not have the same name as {otherEnumValue}")] - public static . DoesNotHaveSameNameAs(this TEnum value, otherEnumValue) - where TEnum : struct, { } - [.(ExpectationMessage="to not have the same value as {otherEnumValue}")] - public static . DoesNotHaveSameValueAs(this TEnum value, otherEnumValue) - where TEnum : struct, { } - [.(ExpectationMessage="to have flag {expectedFlag}")] - public static . HasFlag(this TEnum value, TEnum expectedFlag) - where TEnum : struct, { } - [.(ExpectationMessage="to have the same name as {otherEnumValue}")] - public static . HasSameNameAs(this TEnum value, otherEnumValue) - where TEnum : struct, { } - [.(ExpectationMessage="to have the same value as {otherEnumValue}")] - public static . HasSameValueAs(this TEnum value, otherEnumValue) - where TEnum : struct, { } - } - public class IsDefinedAssertion : . - where TEnum : struct, - { - public IsDefinedAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class IsNotDefinedAssertion : . - where TEnum : struct, - { - public IsNotDefinedAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } -} -namespace .Assertions -{ - public class PropertyAssertionResult : ., . - { - public . Context { get; } - public . GetAwaiter() { } - public . IsAssignableFrom() { } - public . IsAssignableTo() { } - public . IsNotAssignableFrom() { } - public . IsNotAssignableTo() { } - public . IsNotTypeOf() { } - public . IsTypeOf() { } - } - public class PropertyAssertion - { - public . IsEqualTo(TProperty expected) { } - public . IsNotEqualTo(TProperty expected) { } - public . IsNotNull() { } - public . IsNull() { } - } -} -namespace . -{ - public class GroupAssertion : .<..RegexMatchCollection> - { - protected override .<.> CheckAsync(.<..RegexMatchCollection> metadata) { } - protected override string GetExpectation() { } - } - public class MatchAssertion : .<..RegexMatchCollection> - { - protected override .<.> CheckAsync(.<..RegexMatchCollection> metadata) { } - protected override string GetExpectation() { } - } - public class MatchGroupAssertion : .<..RegexMatch> - { - protected override .<.> CheckAsync(.<..RegexMatch> metadata) { } - protected override string GetExpectation() { } - } - public class MatchIndexAssertion : .<..RegexMatch> - { - protected override .<.> CheckAsync(.<..RegexMatch> metadata) { } - protected override string GetExpectation() { } - } - public class RegexMatch - { - public int Index { get; } - public int Length { get; } - public string Value { get; } - public string GetGroup(int groupIndex) { } - public string GetGroup(string groupName) { } - } - public class RegexMatchCollection : .<..RegexMatch>, .<..RegexMatch>, .<..RegexMatch>, .IEnumerable - { - public int Count { get; } - public ..RegexMatch First { get; } - public ..RegexMatch this[int index] { get; } - public .<..RegexMatch> GetEnumerator() { } - } -} -namespace . -{ - public class IsNotParsableIntoAssertion<[.(..None | ..PublicMethods | ..Interfaces)] T> : . - { - public IsNotParsableIntoAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public ..IsNotParsableIntoAssertion WithFormatProvider( formatProvider) { } - } - public class IsParsableIntoAssertion<[.(..None | ..PublicMethods | ..Interfaces)] T> : . - { - public IsParsableIntoAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public ..IsParsableIntoAssertion WithFormatProvider( formatProvider) { } - } - public class WhenParsedIntoAssertion<[.(..None | ..PublicMethods | ..Interfaces)] T> : ., ., . - { - public WhenParsedIntoAssertion(. stringContext, ? formatProvider = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . IsAssignableFrom() { } - public . IsAssignableTo() { } - public . IsNotAssignableFrom() { } - public . IsNotAssignableTo() { } - public . IsNotTypeOf() { } - public . IsTypeOf() { } - public ..WhenParsedIntoAssertion WithFormatProvider( formatProvider) { } - } -} -namespace .Attributes -{ - [(.Class, AllowMultiple=false)] - public class AssertionExtensionAttribute : - { - public AssertionExtensionAttribute(string methodName) { } - public string MethodName { get; } - public string? NegatedMethodName { get; set; } - public int OverloadResolutionPriority { get; set; } - } - [(.Class, AllowMultiple=true, Inherited=false)] - public class AssertionFromAttribute : - { - public AssertionFromAttribute( targetType, string methodName) { } - public AssertionFromAttribute( targetType, containingType, string methodName) { } - public ? ContainingType { get; } - public string? CustomName { get; set; } - public string? ExpectationMessage { get; set; } - public string MethodName { get; } - public bool NegateLogic { get; set; } - public bool RequiresGenericTypeParameter { get; set; } - public TargetType { get; } - public bool TreatAsInstance { get; set; } - } - [(.Class, AllowMultiple=true, Inherited=false)] - public sealed class AssertionFromAttribute : - { - public AssertionFromAttribute(string methodName) { } - public AssertionFromAttribute( containingType, string methodName) { } - public ? ContainingType { get; } - public string? CustomName { get; set; } - public string? ExpectationMessage { get; set; } - public string MethodName { get; } - public bool NegateLogic { get; set; } - public bool RequiresGenericTypeParameter { get; set; } - public TargetType { get; } - public bool TreatAsInstance { get; set; } - } - [(.Method, AllowMultiple=false, Inherited=false)] - public sealed class GenerateAssertionAttribute : - { - public GenerateAssertionAttribute() { } - public string? ExpectationMessage { get; set; } - public bool InlineMethodBody { get; set; } - } -} -namespace .Chaining -{ - public class AndAssertion : . - { - public AndAssertion(. first, . second) { } - public new . Or { get; } - public override . AssertAsync() { } - protected override string GetExpectation() { } - } - public class OrAssertion : . - { - public OrAssertion(. first, . second) { } - public new . And { get; } - public override . AssertAsync() { } - protected override string GetExpectation() { } - } -} -namespace .Collections -{ - public static class CollectionChecks - { - public static . CheckAll(. adapter, predicate, string predicateExpression) { } - public static . CheckAllKeys(. adapter, predicate) { } - public static . CheckAllValues(. adapter, predicate) { } - public static . CheckAny(. adapter, predicate) { } - public static . CheckAnyKey(. adapter, predicate) { } - public static . CheckAnyValue(. adapter, predicate) { } - public static . CheckContains(. adapter, TItem expected, .? comparer = null) { } - public static . CheckContainsKey(. adapter, TKey key) { } - public static . CheckContainsKeyWithValue(. adapter, TKey key, TValue expectedValue, .? comparer = null) { } - public static . CheckContainsPredicate(. adapter, predicate, out TItem? foundItem) { } - public static . CheckContainsValue(. adapter, TValue value, .? comparer = null) { } - public static . CheckCount(. adapter, int expected) { } - public static . CheckDoesNotContain(. adapter, TItem expected, .? comparer = null) { } - public static . CheckDoesNotContainKey(. adapter, TKey key) { } - public static . CheckDoesNotContainPredicate(. adapter, predicate) { } - public static . CheckDoesNotContainValue(. adapter, TValue value, .? comparer = null) { } - public static . CheckDoesNotOverlap(. adapter, . other) { } - public static . CheckHasAtLeast(. adapter, int minCount) { } - public static . CheckHasAtMost(. adapter, int maxCount) { } - public static . CheckHasCountBetween(. adapter, int min, int max) { } - public static . CheckHasDistinctItems(. adapter, .? comparer = null) { } - public static . CheckHasSingleItem(. adapter) { } - public static . CheckHasSingleItem(. adapter, out TItem? singleItem) { } - public static . CheckHasSingleItemPredicate(. adapter, predicate, out TItem? matchingItem) { } - public static . CheckIsEmpty(. adapter) { } - public static . CheckIsInDescendingOrder(. adapter, .? comparer = null) { } - public static . CheckIsInOrder(. adapter, .? comparer = null) { } - public static . CheckIsNotEmpty(. adapter) { } - public static . CheckIsProperSubsetOf(. adapter, . other) { } - public static . CheckIsProperSupersetOf(. adapter, . other) { } - public static . CheckIsSubsetOf(. adapter, . other) { } - public static . CheckIsSupersetOf(. adapter, . other) { } - public static . CheckOverlaps(. adapter, . other) { } - public static . CheckSetEquals(. adapter, . other) { } - } - public class MemoryAllAssertion : . - { - public MemoryAllAssertion(. context, > adapterFactory, predicate, string predicateExpression) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateAdapter(TMemory value) { } - protected override string GetExpectation() { } - } - public class MemoryAnyAssertion : . - { - public MemoryAnyAssertion(. context, > adapterFactory, predicate) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateAdapter(TMemory value) { } - protected override string GetExpectation() { } - } - public class MemoryContainsAssertion : . - { - public MemoryContainsAssertion(. context, > adapterFactory, TItem expected, .? comparer = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateAdapter(TMemory value) { } - protected override string GetExpectation() { } - } - public class MemoryCountEqualsAssertion : . - { - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateAdapter(TMemory value) { } - protected override string GetExpectation() { } - } - public class MemoryCountSource - { - public MemoryCountSource(. context, > adapterFactory) { } - public . IsEqualTo(int expected, [.("expected")] string? expression = null) { } - public . IsGreaterThan(int expected, [.("expected")] string? expression = null) { } - public . IsGreaterThanOrEqualTo(int expected, [.("expected")] string? expression = null) { } - public . IsLessThan(int expected, [.("expected")] string? expression = null) { } - public . IsLessThanOrEqualTo(int expected, [.("expected")] string? expression = null) { } - public . IsNotEqualTo(int expected, [.("expected")] string? expression = null) { } - public . IsPositive() { } - public . IsZero() { } - } - public class MemoryDoesNotContainAssertion : . - { - public MemoryDoesNotContainAssertion(. context, > adapterFactory, TItem expected, .? comparer = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateAdapter(TMemory value) { } - protected override string GetExpectation() { } - } - public class MemoryHasDistinctItemsAssertion : . - { - public MemoryHasDistinctItemsAssertion(. context, > adapterFactory, .? comparer = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateAdapter(TMemory value) { } - protected override string GetExpectation() { } - } - public class MemoryHasSingleItemAssertion : . - { - public MemoryHasSingleItemAssertion(. context, > adapterFactory) { } - public . Item { get; } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateAdapter(TMemory value) { } - protected override string GetExpectation() { } - } - public class MemoryIsEmptyAssertion : . - { - public MemoryIsEmptyAssertion(. context, > adapterFactory) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateAdapter(TMemory value) { } - protected override string GetExpectation() { } - } - public class MemoryIsEquivalentToAssertion : . - { - [.("Collection equivalency uses structural comparison for complex objects, which requ" + - "ires reflection and is not compatible with AOT")] - public MemoryIsEquivalentToAssertion(. context, > adapterFactory, . expected, . ordering = 0) { } - public MemoryIsEquivalentToAssertion(. context, > adapterFactory, . expected, . comparer, . ordering = 0) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateAdapter(TMemory value) { } - protected override string GetExpectation() { } - } - public class MemoryIsInDescendingOrderAssertion : . - { - public MemoryIsInDescendingOrderAssertion(. context, > adapterFactory, .? comparer = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateAdapter(TMemory value) { } - protected override string GetExpectation() { } - } - public class MemoryIsInOrderAssertion : . - { - public MemoryIsInOrderAssertion(. context, > adapterFactory, .? comparer = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateAdapter(TMemory value) { } - protected override string GetExpectation() { } - } - public class MemoryIsNotEmptyAssertion : . - { - public MemoryIsNotEmptyAssertion(. context, > adapterFactory) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateAdapter(TMemory value) { } - protected override string GetExpectation() { } - } -} -namespace .Conditions -{ - public class AssertionSourceAdapter : ., . - { - public AssertionSourceAdapter(. context) { } - public . Context { get; } - public . IsAssignableFrom() { } - public . IsAssignableTo() { } - public . IsNotAssignableFrom() { } - public . IsNotAssignableTo() { } - public . IsNotTypeOf() { } - public . IsTypeOf() { } - } - public class AsyncEnumerableAllAssertion : . - { - public AsyncEnumerableAllAssertion(.<.> context, predicate) { } - protected override . CheckMaterialized(. items) { } - protected override string GetExpectation() { } - } - public class AsyncEnumerableAnyAssertion : . - { - public AsyncEnumerableAnyAssertion(.<.> context, predicate) { } - protected override . CheckMaterialized(. items) { } - protected override string GetExpectation() { } - } - public abstract class AsyncEnumerableAssertionConditionBase : . - { - protected AsyncEnumerableAssertionConditionBase(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected abstract . CheckMaterialized(. items); - } - public class AsyncEnumerableContainsAssertion : . - { - public AsyncEnumerableContainsAssertion(.<.> context, TItem expected, .? comparer, bool expectContains) { } - protected override . CheckMaterialized(. items) { } - protected override string GetExpectation() { } - } - public class AsyncEnumerableHasAtLeastAssertion : . - { - public AsyncEnumerableHasAtLeastAssertion(.<.> context, int minCount) { } - protected override . CheckMaterialized(. items) { } - protected override string GetExpectation() { } - } - public class AsyncEnumerableHasAtMostAssertion : . - { - public AsyncEnumerableHasAtMostAssertion(.<.> context, int maxCount) { } - protected override . CheckMaterialized(. items) { } - protected override string GetExpectation() { } - } - public class AsyncEnumerableHasCountAssertion : . - { - public AsyncEnumerableHasCountAssertion(.<.> context, int expected) { } - protected override . CheckMaterialized(. items) { } - protected override string GetExpectation() { } - } - public class AsyncEnumerableHasCountBetweenAssertion : . - { - public AsyncEnumerableHasCountBetweenAssertion(.<.> context, int min, int max) { } - protected override . CheckMaterialized(. items) { } - protected override string GetExpectation() { } - } - public class AsyncEnumerableIsEmptyAssertion : . - { - public AsyncEnumerableIsEmptyAssertion(.<.> context, bool expectEmpty) { } - protected override . CheckMaterialized(. items) { } - protected override string GetExpectation() { } - } - public class AsyncMappedSatisfiesAssertion : . - { - public AsyncMappedSatisfiesAssertion(. context, > selector, <., .?> assertions, string selectorDescription) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public abstract class BaseThrowsAssertion : . - where TException : - where TSelf : . - { - protected BaseThrowsAssertion(. context, bool allowSubclasses) { } - protected abstract bool IsExactTypeMatch { get; } - protected override sealed .<.> CheckAsync(. metadata) { } - protected abstract bool CheckExceptionType( actualException, out string? errorMessage); - protected override string GetExpectation() { } - } - [.("IsBetween")] - public class BetweenAssertion : . - where TValue : - { - public BetweenAssertion(. context, TValue minimum, TValue maximum) { } - protected override .<.> CheckAsync(. metadata) { } - public . Exclusive() { } - protected override string GetExpectation() { } - public . Inclusive() { } - public . InclusiveMaximum() { } - public . InclusiveMinimum() { } - } - [.<.BigInteger>("IsEven", CustomName="IsNotEven", ExpectationMessage="be even", NegateLogic=true)] - [.<.BigInteger>("IsEven", ExpectationMessage="be even")] - [.<.BigInteger>("IsOne", CustomName="IsNotOne", ExpectationMessage="be one", NegateLogic=true)] - [.<.BigInteger>("IsOne", ExpectationMessage="be one")] - [.<.BigInteger>("IsPowerOfTwo", CustomName="IsNotPowerOfTwo", ExpectationMessage="be a power of two", NegateLogic=true)] - [.<.BigInteger>("IsPowerOfTwo", ExpectationMessage="be a power of two")] - [.<.BigInteger>("IsZero", CustomName="IsNotZero", ExpectationMessage="be zero", NegateLogic=true)] - [.<.BigInteger>("IsZero", ExpectationMessage="be zero")] - public static class BigIntegerAssertionExtensions { } - [.("IsControl", CustomName="IsNotControl", ExpectationMessage="be a control character", NegateLogic=true)] - [.("IsControl", ExpectationMessage="be a control character")] - [.("IsDigit", CustomName="IsNotDigit", ExpectationMessage="be a digit", NegateLogic=true)] - [.("IsDigit", ExpectationMessage="be a digit")] - [.("IsHighSurrogate", CustomName="IsNotHighSurrogate", ExpectationMessage="be a high surrogate", NegateLogic=true)] - [.("IsHighSurrogate", ExpectationMessage="be a high surrogate")] - [.("IsLetter", CustomName="IsNotLetter", ExpectationMessage="be a letter", NegateLogic=true)] - [.("IsLetter", ExpectationMessage="be a letter")] - [.("IsLetterOrDigit", CustomName="IsNotLetterOrDigit", ExpectationMessage="be a letter or digit", NegateLogic=true)] - [.("IsLetterOrDigit", ExpectationMessage="be a letter or digit")] - [.("IsLowSurrogate", CustomName="IsNotLowSurrogate", ExpectationMessage="be a low surrogate", NegateLogic=true)] - [.("IsLowSurrogate", ExpectationMessage="be a low surrogate")] - [.("IsLower", CustomName="IsNotLower", ExpectationMessage="be lowercase", NegateLogic=true)] - [.("IsLower", ExpectationMessage="be lowercase")] - [.("IsNumber", CustomName="IsNotNumber", ExpectationMessage="be a number", NegateLogic=true)] - [.("IsNumber", ExpectationMessage="be a number")] - [.("IsPunctuation", CustomName="IsNotPunctuation", ExpectationMessage="be punctuation", NegateLogic=true)] - [.("IsPunctuation", ExpectationMessage="be punctuation")] - [.("IsSeparator", CustomName="IsNotSeparator", ExpectationMessage="be a separator", NegateLogic=true)] - [.("IsSeparator", ExpectationMessage="be a separator")] - [.("IsSurrogate", CustomName="IsNotSurrogate", ExpectationMessage="be a surrogate", NegateLogic=true)] - [.("IsSurrogate", ExpectationMessage="be a surrogate")] - [.("IsSymbol", CustomName="IsNotSymbol", ExpectationMessage="be a symbol", NegateLogic=true)] - [.("IsSymbol", ExpectationMessage="be a symbol")] - [.("IsUpper", CustomName="IsNotUpper", ExpectationMessage="be uppercase", NegateLogic=true)] - [.("IsUpper", ExpectationMessage="be uppercase")] - [.("IsWhiteSpace", CustomName="IsNotWhiteSpace", ExpectationMessage="be whitespace", NegateLogic=true)] - [.("IsWhiteSpace", ExpectationMessage="be whitespace")] - public static class CharAssertionExtensions { } - [.("All")] - public class CollectionAllAssertion : . - where TCollection : . - { - public CollectionAllAssertion(. context, predicate, string predicateDescription) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CollectionAllSatisfyAssertion : . - where TCollection : . - { - public CollectionAllSatisfyAssertion(. context, <., .?> assertion, string assertionDescription) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CollectionAllSatisfyHelper - where TCollection : . - { - public CollectionAllSatisfyHelper(. context) { } - public . Satisfy(<., TAssertion?> assertion, [.("assertion")] string? expression = null) - where TAssertion : . { } - public . Satisfy( mapper, <., TAssertion?> assertion, [.("mapper")] string? mapperExpression = null, [.("assertion")] string? assertionExpression = null) - where TAssertion : . { } - } - public class CollectionAllSatisfyMappedAssertion : . - where TCollection : . - { - public CollectionAllSatisfyMappedAssertion(. context, mapper, <., .?> assertion, string mapperDescription, string assertionDescription) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Any")] - public class CollectionAnyAssertion : . - where TCollection : . - { - public CollectionAnyAssertion(. context, predicate, string predicateDescription) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public abstract class CollectionComparerBasedAssertion : . - where TCollection : . - { - protected .? Comparer; - protected CollectionComparerBasedAssertion(. context) { } - protected . GetComparer() { } - protected void SetComparer(. comparer) { } - } - [.("Contains")] - public class CollectionContainsAssertion : . - where TCollection : . - { - public CollectionContainsAssertion(. context, TItem expected, .? comparer = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Contains")] - public class CollectionContainsPredicateAssertion : . - where TCollection : . - { - public CollectionContainsPredicateAssertion(. context, predicate) { } - protected override .<.> CheckAsync(. metadata) { } - public . GetAwaiter() { } - protected override string GetExpectation() { } - } - public class CollectionCountAssertion : . - where TCollection : . - { - public CollectionCountAssertion(. context, int expectedCount) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CollectionCountEqualsAssertion : . - where TCollection : . - { - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CollectionCountSource - where TCollection : . - { - public . IsEqualTo(int expected, [.("expected")] string? expression = null) { } - public . IsGreaterThan(int expected, [.("expected")] string? expression = null) { } - public . IsGreaterThanOrEqualTo(int expected, [.("expected")] string? expression = null) { } - public . IsLessThan(int expected, [.("expected")] string? expression = null) { } - public . IsLessThanOrEqualTo(int expected, [.("expected")] string? expression = null) { } - public . IsNotEqualTo(int expected, [.("expected")] string? expression = null) { } - public . IsPositive() { } - public . IsZero() { } - } - public class CollectionCountWithInlineAssertionAssertion : . - where TCollection : . - { - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("DoesNotContain")] - public class CollectionDoesNotContainAssertion : . - where TCollection : . - { - public CollectionDoesNotContainAssertion(. context, TItem expected, .? comparer = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("DoesNotContain")] - public class CollectionDoesNotContainPredicateAssertion : . - where TCollection : . - { - public CollectionDoesNotContainPredicateAssertion(. context, predicate, string predicateDescription) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CollectionHasAtLeastAssertion : . - where TCollection : . - { - public CollectionHasAtLeastAssertion(. context, int minCount) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CollectionHasAtMostAssertion : . - where TCollection : . - { - public CollectionHasAtMostAssertion(. context, int maxCount) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CollectionHasCountBetweenAssertion : . - where TCollection : . - { - public CollectionHasCountBetweenAssertion(. context, int min, int max) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CollectionIsEmptyAssertion : . - where TCollection : . - { - public CollectionIsEmptyAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsInDescendingOrder")] - public class CollectionIsInDescendingOrderAssertion : . - where TCollection : . - { - public CollectionIsInDescendingOrderAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsInOrder")] - public class CollectionIsInOrderAssertion : . - where TCollection : . - { - public CollectionIsInOrderAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CollectionIsNotEmptyAssertion : . - where TCollection : . - { - public CollectionIsNotEmptyAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CollectionIsOrderedByAssertion : . - where TCollection : . - { - public CollectionIsOrderedByAssertion(. context, keySelector, .? comparer = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CollectionIsOrderedByDescendingAssertion : . - where TCollection : . - { - public CollectionIsOrderedByDescendingAssertion(. context, keySelector, .? comparer = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CollectionMemberAssertionAdapter : . - where TCollection : . { } - public abstract class ComparerBasedAssertion : . - { - protected ComparerBasedAssertion(. context) { } - protected . GetComparer() { } - protected bool HasCustomComparer() { } - protected void SetComparer(. comparer) { } - } - public static class ComparisonAssertionExtensions - { - [.(ExpectationMessage="to be greater than {minimum}")] - public static . IsGreaterThan(this TValue value, TValue minimum) - where TValue : { } - [.(ExpectationMessage="to be greater than or equal to {minimum}")] - public static . IsGreaterThanOrEqualTo(this TValue value, TValue minimum) - where TValue : { } - [.(ExpectationMessage="to be less than {maximum}")] - public static . IsLessThan(this TValue value, TValue maximum) - where TValue : { } - [.(ExpectationMessage="to be less than or equal to {maximum}")] - public static . IsLessThanOrEqualTo(this TValue value, TValue maximum) - where TValue : { } - } - public class CompletesWithinActionAssertion : . - { - public CompletesWithinActionAssertion( action, timeout, .? context = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CompletesWithinAsyncAssertion : . - { - public CompletesWithinAsyncAssertion(<.> asyncAction, timeout, .? context = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.<.Cookie>("Expired", CustomName="IsNotExpired", ExpectationMessage="be expired", NegateLogic=true)] - [.<.Cookie>("Expired", ExpectationMessage="be expired")] - [.<.Cookie>("HttpOnly", CustomName="IsNotHttpOnly", ExpectationMessage="be HTTP-only", NegateLogic=true)] - [.<.Cookie>("HttpOnly", ExpectationMessage="be HTTP-only")] - [.<.Cookie>("Secure", CustomName="IsNotSecure", ExpectationMessage="be secure", NegateLogic=true)] - [.<.Cookie>("Secure", ExpectationMessage="be secure")] - public static class CookieAssertionExtensions { } - [.("IsEqualTo", OverloadResolutionPriority=2)] - public class DateOnlyEqualsAssertion : .<, int> - { - public DateOnlyEqualsAssertion(.<> context, expected) { } - protected override bool AreExactlyEqual( actual, expected) { } - protected override object CalculateDifference( actual, expected) { } - protected override string FormatDifferenceMessage( actual, object difference) { } - protected override string GetExpectation() { } - protected override bool HasToleranceValue() { } - protected override bool IsWithinTolerance( actual, expected, int toleranceDays) { } - public . WithinDays(int days) { } - } - [.("IsEqualTo", OverloadResolutionPriority=2)] - public class DateTimeEqualsAssertion : .<, > - { - public DateTimeEqualsAssertion(.<> context, expected) { } - protected override bool AreExactlyEqual( actual, expected) { } - protected override object CalculateDifference( actual, expected) { } - protected override string FormatDifferenceMessage( actual, object difference) { } - protected override string GetExpectation() { } - protected override bool HasToleranceValue() { } - protected override bool IsWithinTolerance( actual, expected, tolerance) { } - } - [.("EqualsExact")] - public class DateTimeEqualsExactAssertion : .<> - { - public DateTimeEqualsExactAssertion(.<> context, expected) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - [.("IsEqualTo", OverloadResolutionPriority=2)] - public class DateTimeOffsetEqualsAssertion : .<, > - { - public DateTimeOffsetEqualsAssertion(.<> context, expected) { } - protected override bool AreExactlyEqual( actual, expected) { } - protected override object CalculateDifference( actual, expected) { } - protected override bool HasToleranceValue() { } - protected override bool IsWithinTolerance( actual, expected, tolerance) { } - } - [.("IsEqualTo", OverloadResolutionPriority=2)] - public class DecimalEqualsAssertion : . - { - public DecimalEqualsAssertion(. context, decimal expected) { } - protected override bool AreExactlyEqual(decimal actual, decimal expected) { } - protected override object CalculateDifference(decimal actual, decimal expected) { } - protected override bool HasToleranceValue() { } - protected override bool IsWithinRelativeTolerance(decimal actual, decimal expected, double percentTolerance) { } - protected override bool IsWithinTolerance(decimal actual, decimal expected, decimal tolerance) { } - } - [.("IsCloseTo", OverloadResolutionPriority=2)] - public class DecimalIsCloseToAssertion : . - { - public DecimalIsCloseToAssertion(. context, decimal expected, decimal tolerance) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsWithinPercentOf", OverloadResolutionPriority=2)] - public class DecimalIsWithinPercentOfAssertion : . - { - public DecimalIsWithinPercentOfAssertion(. context, decimal expected, decimal percent) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class DictionaryAllKeysAssertion : . - where TDictionary : . - where TKey : notnull - { - public DictionaryAllKeysAssertion(. context, predicate) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class DictionaryAllValuesAssertion : . - where TDictionary : . - where TKey : notnull - { - public DictionaryAllValuesAssertion(. context, predicate) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class DictionaryAnyKeyAssertion : . - where TDictionary : . - where TKey : notnull - { - public DictionaryAnyKeyAssertion(. context, predicate) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class DictionaryAnyValueAssertion : . - where TDictionary : . - where TKey : notnull - { - public DictionaryAnyValueAssertion(. context, predicate) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class DictionaryContainsKeyAndContinuation : . - where TDictionary : . - where TKey : notnull - { - public . Value { get; } - } - public class DictionaryContainsKeyAssertion : . - where TDictionary : . - where TKey : notnull - { - public DictionaryContainsKeyAssertion(. context, TKey expectedKey, .? comparer = null) { } - public new . And { get; } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . Using(. comparer) { } - public . Using( equalityPredicate) { } - } - public class DictionaryContainsKeyWithValueAssertion : . - where TDictionary : . - where TKey : notnull - { - public DictionaryContainsKeyWithValueAssertion(. context, TKey expectedKey, TValue expectedValue, .? comparer = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class DictionaryContainsValueAssertion : . - where TDictionary : . - where TKey : notnull - { - public DictionaryContainsValueAssertion(. context, TValue expectedValue, .? comparer = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class DictionaryCountSource - where TDictionary : . - where TKey : notnull - { - public . IsEqualTo(int expected, [.("expected")] string? expression = null) { } - public . IsGreaterThan(int expected, [.("expected")] string? expression = null) { } - public . IsGreaterThanOrEqualTo(int expected, [.("expected")] string? expression = null) { } - public . IsLessThan(int expected, [.("expected")] string? expression = null) { } - public . IsLessThanOrEqualTo(int expected, [.("expected")] string? expression = null) { } - public . IsNotEqualTo(int expected, [.("expected")] string? expression = null) { } - public . IsPositive() { } - public . IsZero() { } - } - public class DictionaryDoesNotContainKeyAssertion : . - where TDictionary : . - where TKey : notnull - { - public DictionaryDoesNotContainKeyAssertion(. context, TKey expectedKey) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class DictionaryDoesNotContainValueAssertion : . - where TDictionary : . - where TKey : notnull - { - public DictionaryDoesNotContainValueAssertion(. context, TValue expectedValue, .? comparer = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class DictionaryMemberAssertionAdapter : . - where TDictionary : . - where TKey : notnull { } - public sealed class DictionaryValueSource : . { } - [.("HasFiles")] - public class DirectoryHasFilesAssertion : .<.DirectoryInfo> - { - public DirectoryHasFilesAssertion(.<.DirectoryInfo> context) { } - protected override .<.> CheckAsync(.<.DirectoryInfo> metadata) { } - protected override string GetExpectation() { } - } - [.("HasNoSubdirectories")] - public class DirectoryHasNoSubdirectoriesAssertion : .<.DirectoryInfo> - { - public DirectoryHasNoSubdirectoriesAssertion(.<.DirectoryInfo> context) { } - protected override .<.> CheckAsync(.<.DirectoryInfo> metadata) { } - protected override string GetExpectation() { } - } - [.("IsFinite", CustomName="IsNotFinite", ExpectationMessage="be finite", NegateLogic=true)] - [.("IsFinite", ExpectationMessage="be finite")] - [.("IsInfinity", CustomName="IsNotInfinity", ExpectationMessage="be infinity", NegateLogic=true)] - [.("IsInfinity", ExpectationMessage="be infinity")] - [.("IsNaN", CustomName="IsNotNaN", ExpectationMessage="be NaN", NegateLogic=true)] - [.("IsNaN", ExpectationMessage="be NaN")] - [.("IsNegativeInfinity", CustomName="IsNotNegativeInfinity", ExpectationMessage="be negative infinity", NegateLogic=true)] - [.("IsNegativeInfinity", ExpectationMessage="be negative infinity")] - [.("IsNormal", CustomName="IsNotNormal", ExpectationMessage="be normal", NegateLogic=true)] - [.("IsNormal", ExpectationMessage="be normal")] - [.("IsPositiveInfinity", CustomName="IsNotPositiveInfinity", ExpectationMessage="be positive infinity", NegateLogic=true)] - [.("IsPositiveInfinity", ExpectationMessage="be positive infinity")] - [.("IsSubnormal", CustomName="IsNotSubnormal", ExpectationMessage="be subnormal", NegateLogic=true)] - [.("IsSubnormal", ExpectationMessage="be subnormal")] - public static class DoubleAssertionExtensions { } - [.("IsEqualTo", OverloadResolutionPriority=2)] - public class DoubleEqualsAssertion : . - { - public DoubleEqualsAssertion(. context, double expected) { } - protected override bool AreExactlyEqual(double actual, double expected) { } - protected override object CalculateDifference(double actual, double expected) { } - protected override bool HasToleranceValue() { } - protected override bool IsWithinRelativeTolerance(double actual, double expected, double percentTolerance) { } - protected override bool IsWithinTolerance(double actual, double expected, double tolerance) { } - } - [.("IsCloseTo", OverloadResolutionPriority=2)] - public class DoubleIsCloseToAssertion : . - { - public DoubleIsCloseToAssertion(. context, double expected, double tolerance) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsWithinPercentOf", OverloadResolutionPriority=2)] - public class DoubleIsWithinPercentOfAssertion : . - { - public DoubleIsWithinPercentOfAssertion(. context, double expected, double percent) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsEqualTo")] - public class EqualsAssertion : . - { - public EqualsAssertion(. context, TValue? expected) { } - public EqualsAssertion(. context, TValue? expected, . comparer) { } - public TValue Expected { get; } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . IgnoringType( type) { } - public . IgnoringType() { } - } - [.("IsEquatableTo")] - public class EquatableAssertion : . - where TActual : - { - public EquatableAssertion(. context, TExpected expected) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ExceptionInnerExceptionOfTypeAssertion : . - where TException : - where TInnerException : - { - public ExceptionInnerExceptionOfTypeAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ExceptionMessageContainsAssertion : . - where TException : - { - public ExceptionMessageContainsAssertion(. context, string expectedSubstring, comparison = 4) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ExceptionMessageEqualsAssertion : . - where TException : - { - public ExceptionMessageEqualsAssertion(. context, string expectedMessage, comparison = 4) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ExceptionMessageMatchesAssertion : . - where TException : - { - public ExceptionMessageMatchesAssertion(. context, .StringMatcher matcher) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ExceptionMessageMatchesPatternAssertion : . - where TException : - { - public ExceptionMessageMatchesPatternAssertion(. context, string pattern) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ExceptionMessageNotContainsAssertion : . - where TException : - { - public ExceptionMessageNotContainsAssertion(. context, string notExpectedSubstring, comparison = 4) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ExceptionParameterNameAssertion : . - where TException : - { - public ExceptionParameterNameAssertion(. context, string expectedParameterName, bool requireExactType = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ExceptionStackTraceContainsAssertion : . - where TException : - { - public ExceptionStackTraceContainsAssertion(. context, string expectedSubstring, comparison = 4) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsNotExecutable")] - public class FileIsNotExecutableAssertion : .<.FileInfo> - { - public FileIsNotExecutableAssertion(.<.FileInfo> context) { } - protected override .<.> CheckAsync(.<.FileInfo> metadata) { } - protected override string GetExpectation() { } - } - [.("IsNotSystem")] - public class FileIsNotSystemAssertion : .<.FileInfo> - { - public FileIsNotSystemAssertion(.<.FileInfo> context) { } - protected override .<.> CheckAsync(.<.FileInfo> metadata) { } - protected override string GetExpectation() { } - } - public static class FileSystemComparisonAssertions - { - [.(ExpectationMessage="to not have same content as {expected}")] - public static . DoesNotHaveSameContentAs(this .FileInfo value, .FileInfo expected) { } - [.(ExpectationMessage="to have same content as {expected}")] - public static . HasSameContentAs(this .FileInfo value, .FileInfo expected) { } - [.(ExpectationMessage="to have same structure as {expected}")] - public static . HasSameStructureAs(this .DirectoryInfo value, .DirectoryInfo expected) { } - [.(ExpectationMessage="to be equivalent to {expected}")] - public static . IsEquivalentTo(this .DirectoryInfo value, .DirectoryInfo expected) { } - [.(ExpectationMessage="to not be equivalent to {expected}")] - public static . IsNotEquivalentTo(this .DirectoryInfo value, .DirectoryInfo expected) { } - } - [.("IsEqualTo", OverloadResolutionPriority=2)] - public class FloatEqualsAssertion : . - { - public FloatEqualsAssertion(. context, float expected) { } - protected override bool AreExactlyEqual(float actual, float expected) { } - protected override object CalculateDifference(float actual, float expected) { } - protected override bool HasToleranceValue() { } - protected override bool IsWithinRelativeTolerance(float actual, float expected, double percentTolerance) { } - protected override bool IsWithinTolerance(float actual, float expected, float tolerance) { } - } - [.("IsCloseTo", OverloadResolutionPriority=2)] - public class FloatIsCloseToAssertion : . - { - public FloatIsCloseToAssertion(. context, float expected, float tolerance) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsWithinPercentOf", OverloadResolutionPriority=2)] - public class FloatIsWithinPercentOfAssertion : . - { - public FloatIsWithinPercentOfAssertion(. context, float expected, float percent) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class HasDistinctItemsAssertion : . - where TCollection : . - { - public HasDistinctItemsAssertion(. context) { } - public HasDistinctItemsAssertion(. context, . comparer) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class HasMessageContainingAssertion : . - { - public HasMessageContainingAssertion(. context, string expectedSubstring, comparison = 4) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class HasMessageEqualToAssertion : . - { - public HasMessageEqualToAssertion(. context, string expectedMessage, comparison = 4) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class HasMessageStartingWithAssertion : . - { - public HasMessageStartingWithAssertion(. context, string expectedPrefix, comparison = 4) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("HasSingleItem")] - public class HasSingleItemAssertion : . - where TCollection : . - { - public HasSingleItemAssertion(. context) { } - public . Item { get; } - protected override .<.> CheckAsync(. metadata) { } - public . GetAwaiter() { } - protected override string GetExpectation() { } - } - [.("HasSingleItem")] - public class HasSingleItemPredicateAssertion : . - where TCollection : . - { - public HasSingleItemPredicateAssertion(. context, predicate, string predicateDescription) { } - public . Item { get; } - protected override .<.> CheckAsync(. metadata) { } - public . GetAwaiter() { } - protected override string GetExpectation() { } - } - [.<.>("IsSuccessStatusCode", CustomName="IsNotSuccessStatusCode", ExpectationMessage="have a success status code", NegateLogic=true)] - [.<.>("IsSuccessStatusCode", ExpectationMessage="have a success status code")] - public static class HttpResponseMessageAssertionExtensions - { - [.(ExpectationMessage="have content type {contentType}", InlineMethodBody=true)] - public static bool HasContentType(this . response, string contentType) { } - [.(ExpectationMessage="have header \'{headerName}\'")] - public static bool HasHeader(this . response, string headerName) { } - [.(ExpectationMessage="have JSON content type", InlineMethodBody=true)] - public static bool HasJsonContent(this . response) { } - [.(ExpectationMessage="have status code {statusCode}", InlineMethodBody=true)] - public static bool HasStatusCode(this . response, .HttpStatusCode statusCode) { } - [.(ExpectationMessage="have status code 400 Bad Request", InlineMethodBody=true)] - public static bool IsBadRequest(this . response) { } - [.(ExpectationMessage="have a client error status code (4xx)", InlineMethodBody=true)] - public static bool IsClientErrorStatusCode(this . response) { } - [.(ExpectationMessage="have status code 409 Conflict", InlineMethodBody=true)] - public static bool IsConflict(this . response) { } - [.(ExpectationMessage="have status code 201 Created", InlineMethodBody=true)] - public static bool IsCreated(this . response) { } - [.(ExpectationMessage="have status code 403 Forbidden", InlineMethodBody=true)] - public static bool IsForbidden(this . response) { } - [.(ExpectationMessage="have status code 204 No Content", InlineMethodBody=true)] - public static bool IsNoContent(this . response) { } - [.(ExpectationMessage="have status code 404 Not Found", InlineMethodBody=true)] - public static bool IsNotFound(this . response) { } - [.(ExpectationMessage="have status code 200 OK", InlineMethodBody=true)] - public static bool IsOk(this . response) { } - [.(ExpectationMessage="have a redirection status code (3xx)", InlineMethodBody=true)] - public static bool IsRedirectStatusCode(this . response) { } - [.(ExpectationMessage="have a server error status code (5xx)", InlineMethodBody=true)] - public static bool IsServerErrorStatusCode(this . response) { } - [.(ExpectationMessage="have status code 401 Unauthorized", InlineMethodBody=true)] - public static bool IsUnauthorized(this . response) { } - } - [.<.IPAddress>("IsIPv4MappedToIPv6", CustomName="IsNotIPv4MappedToIPv6", ExpectationMessage="be an IPv4-mapped IPv6 address", NegateLogic=true)] - [.<.IPAddress>("IsIPv4MappedToIPv6", ExpectationMessage="be an IPv4-mapped IPv6 address")] - [.<.IPAddress>("IsIPv6LinkLocal", CustomName="IsNotIPv6LinkLocal", ExpectationMessage="be an IPv6 link-local address", NegateLogic=true)] - [.<.IPAddress>("IsIPv6LinkLocal", ExpectationMessage="be an IPv6 link-local address")] - [.<.IPAddress>("IsIPv6Multicast", CustomName="IsNotIPv6Multicast", ExpectationMessage="be an IPv6 multicast address", NegateLogic=true)] - [.<.IPAddress>("IsIPv6Multicast", ExpectationMessage="be an IPv6 multicast address")] - [.<.IPAddress>("IsIPv6SiteLocal", CustomName="IsNotIPv6SiteLocal", ExpectationMessage="be an IPv6 site-local address", NegateLogic=true)] - [.<.IPAddress>("IsIPv6SiteLocal", ExpectationMessage="be an IPv6 site-local address")] - [.<.IPAddress>("IsIPv6Teredo", CustomName="IsNotIPv6Teredo", ExpectationMessage="be an IPv6 Teredo address", NegateLogic=true)] - [.<.IPAddress>("IsIPv6Teredo", ExpectationMessage="be an IPv6 Teredo address")] - public static class IPAddressAssertionExtensions { } - [.<>("IsFromEnd", CustomName="IsNotFromEnd", ExpectationMessage="be from the end", NegateLogic=true)] - [.<>("IsFromEnd", ExpectationMessage="be from the end")] - public static class IndexAssertionExtensions { } - [.("IsEqualTo", OverloadResolutionPriority=2)] - public class IntEqualsAssertion : . - { - public IntEqualsAssertion(. context, int expected) { } - protected override bool AreExactlyEqual(int actual, int expected) { } - protected override object CalculateDifference(int actual, int expected) { } - protected override bool HasToleranceValue() { } - protected override bool IsWithinRelativeTolerance(int actual, int expected, double percentTolerance) { } - protected override bool IsWithinTolerance(int actual, int expected, int tolerance) { } - } - [.("IsCloseTo", OverloadResolutionPriority=2)] - public class IntIsCloseToAssertion : . - { - public IntIsCloseToAssertion(. context, int expected, int tolerance) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsWithinPercentOf", OverloadResolutionPriority=2)] - public class IntIsWithinPercentOfAssertion : . - { - public IntIsWithinPercentOfAssertion(. context, int expected, double percent) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class IsAssignableFromAssertion : . - { - public IsAssignableFromAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class IsAssignableToAssertion : . - { - public IsAssignableToAssertion(. context) { } - protected override .<.> CheckAsync(. _) { } - protected override string GetExpectation() { } - } - [.("IsDefault")] - public class IsDefaultAssertion : . - where TValue : struct - { - public IsDefaultAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsDefault")] - public class IsDefaultNullableAssertion : . - where TValue : struct - { - public IsDefaultNullableAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsDefault")] - public class IsDefaultReferenceAssertion : . - where TValue : class - { - public IsDefaultReferenceAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsEquatableOrEqualTo")] - public class IsEquatableOrEqualToAssertion : . - { - public IsEquatableOrEqualToAssertion(. context, TValue expected) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . Using(. comparer) { } - public . Using( equalityPredicate) { } - } - [.("IsEquivalentTo")] - public class IsEquivalentToAssertion : . - where TCollection : . - { - [.("Collection equivalency uses structural comparison for complex objects, which requ" + - "ires reflection and is not compatible with AOT")] - public IsEquivalentToAssertion(. context, . expected, . ordering = 0) { } - public IsEquivalentToAssertion(. context, . expected, . comparer, . ordering = 0) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . Using(. comparer) { } - public . Using( equalityPredicate) { } - } - public class IsNotAssignableFromAssertion : . - { - public IsNotAssignableFromAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class IsNotAssignableToAssertion : . - { - public IsNotAssignableToAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsNotDefault")] - public class IsNotDefaultAssertion : . - where TValue : struct - { - public IsNotDefaultAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsNotDefault")] - public class IsNotDefaultNullableAssertion : . - where TValue : struct - { - public IsNotDefaultNullableAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsNotDefault")] - public class IsNotDefaultReferenceAssertion : . - where TValue : class - { - public IsNotDefaultReferenceAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class IsNotTypeOfAssertion : . - { - public IsNotTypeOfAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class IsTypeOfRuntimeAssertion : . - { - public IsTypeOfRuntimeAssertion(. context, expectedType) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ListHasItemAtAssertion : . - where TList : . - { - public ListHasItemAtAssertion(. context, int index, TItem expected) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ListItemAtEqualsAssertion : . - where TList : . - { - public ListItemAtEqualsAssertion(. context, int index, TItem expected, bool negate) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ListItemAtNullAssertion : . - where TList : . - { - public ListItemAtNullAssertion(. context, int index, bool expectNull) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ListItemAtSatisfiesAssertion : . - where TList : . - { - public ListItemAtSatisfiesAssertion(. context, int index, <., .?> assertion) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ListItemAtSource : ., ., .> - where TList : . - { - public ListItemAtSource(. listContext, int index) { } - public . Context { get; } - public . IsAssignableFrom() { } - public . IsAssignableTo() { } - public . IsEqualTo(TItem expected, [.("expected")] string? expression = null) { } - public . IsNotAssignableFrom() { } - public . IsNotAssignableTo() { } - public . IsNotEqualTo(TItem expected, [.("expected")] string? expression = null) { } - public . IsNotNull() { } - public . IsNotTypeOf() { } - public . IsNull() { } - public . IsTypeOf() { } - public . Satisfies(<., .?> assertion, [.("assertion")] string? expression = null) { } - public . Satisfies( assertion, [.("assertion")] string? expression = null) - where TSource : . { } - } - public class ListLastItemEqualsAssertion : . - where TList : . - { - public ListLastItemEqualsAssertion(. context, TItem expected, bool negate) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ListLastItemNullAssertion : . - where TList : . - { - public ListLastItemNullAssertion(. context, bool expectNull) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ListLastItemSatisfiesAssertion : . - where TList : . - { - public ListLastItemSatisfiesAssertion(. context, <., .?> assertion) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ListLastItemSource : ., ., .> - where TList : . - { - public ListLastItemSource(. listContext) { } - public . Context { get; } - public . IsAssignableFrom() { } - public . IsAssignableTo() { } - public . IsEqualTo(TItem expected, [.("expected")] string? expression = null) { } - public . IsNotAssignableFrom() { } - public . IsNotAssignableTo() { } - public . IsNotEqualTo(TItem expected, [.("expected")] string? expression = null) { } - public . IsNotNull() { } - public . IsNotTypeOf() { } - public . IsNull() { } - public . IsTypeOf() { } - public . Satisfies(<., .?> assertion, [.("assertion")] string? expression = null) { } - public . Satisfies( assertion, [.("assertion")] string? expression = null) - where TSource : . { } - } - [.("IsEqualTo", OverloadResolutionPriority=2)] - public class LongEqualsAssertion : . - { - public LongEqualsAssertion(. context, long expected) { } - protected override bool AreExactlyEqual(long actual, long expected) { } - protected override object CalculateDifference(long actual, long expected) { } - protected override bool HasToleranceValue() { } - protected override bool IsWithinRelativeTolerance(long actual, long expected, double percentTolerance) { } - protected override bool IsWithinTolerance(long actual, long expected, long tolerance) { } - } - [.("IsCloseTo", OverloadResolutionPriority=2)] - public class LongIsCloseToAssertion : . - { - public LongIsCloseToAssertion(. context, long expected, long tolerance) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsWithinPercentOf", OverloadResolutionPriority=2)] - public class LongIsWithinPercentOfAssertion : . - { - public LongIsWithinPercentOfAssertion(. context, long expected, double percent) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class MappedSatisfiesAssertion : . - { - public MappedSatisfiesAssertion(. context, selector, <., .?> assertions, string selectorDescription) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class MemberAssertionResult : . - { - public . And { get; } - public . Or { get; } - public . GetAwaiter() { } - public static . op_Implicit(. result) { } - } - public class MutableDictionaryAllKeysAssertion : . - where TDictionary : . - where TKey : notnull - { - public MutableDictionaryAllKeysAssertion(. context, predicate) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class MutableDictionaryAllValuesAssertion : . - where TDictionary : . - where TKey : notnull - { - public MutableDictionaryAllValuesAssertion(. context, predicate) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class MutableDictionaryAnyKeyAssertion : . - where TDictionary : . - where TKey : notnull - { - public MutableDictionaryAnyKeyAssertion(. context, predicate) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class MutableDictionaryAnyValueAssertion : . - where TDictionary : . - where TKey : notnull - { - public MutableDictionaryAnyValueAssertion(. context, predicate) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class MutableDictionaryContainsKeyAndContinuation : . - where TDictionary : . - where TKey : notnull - { - public . Value { get; } - } - public class MutableDictionaryContainsKeyAssertion : . - where TDictionary : . - where TKey : notnull - { - public MutableDictionaryContainsKeyAssertion(. context, TKey expectedKey, .? comparer = null) { } - public new . And { get; } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . Using(. comparer) { } - public . Using( equalityPredicate) { } - } - public class MutableDictionaryContainsKeyWithValueAssertion : . - where TDictionary : . - where TKey : notnull - { - public MutableDictionaryContainsKeyWithValueAssertion(. context, TKey expectedKey, TValue expectedValue) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class MutableDictionaryContainsValueAssertion : . - where TDictionary : . - where TKey : notnull - { - public MutableDictionaryContainsValueAssertion(. context, TValue expectedValue) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class MutableDictionaryCountSource - where TDictionary : . - where TKey : notnull - { - public . IsEqualTo(int expected, [.("expected")] string? expression = null) { } - public . IsGreaterThan(int expected, [.("expected")] string? expression = null) { } - public . IsGreaterThanOrEqualTo(int expected, [.("expected")] string? expression = null) { } - public . IsLessThan(int expected, [.("expected")] string? expression = null) { } - public . IsLessThanOrEqualTo(int expected, [.("expected")] string? expression = null) { } - public . IsNotEqualTo(int expected, [.("expected")] string? expression = null) { } - public . IsPositive() { } - public . IsZero() { } - } - public class MutableDictionaryDoesNotContainKeyAssertion : . - where TDictionary : . - where TKey : notnull - { - public MutableDictionaryDoesNotContainKeyAssertion(. context, TKey expectedKey) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class MutableDictionaryDoesNotContainValueAssertion : . - where TDictionary : . - where TKey : notnull - { - public MutableDictionaryDoesNotContainValueAssertion(. context, TValue expectedValue) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsNotEqualTo")] - public class NotEqualsAssertion : . - { - public NotEqualsAssertion(. context, TValue notExpected, .? comparer = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . IgnoringType( type) { } - public . IgnoringType() { } - } - [.("IsNotEquivalentTo")] - public class NotEquivalentToAssertion : . - where TCollection : . - { - [.("Collection equivalency uses structural comparison for complex objects, which requ" + - "ires reflection and is not compatible with AOT")] - public NotEquivalentToAssertion(. context, . notExpected, . ordering = 0) { } - public NotEquivalentToAssertion(. context, . notExpected, . comparer, . ordering = 0) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . Using(. comparer) { } - public . Using( equalityPredicate) { } - } - public class NotNullAssertion : . - { - public NotNullAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - public new . GetAwaiter() { } - protected override string GetExpectation() { } - } - [.("Uses reflection for structural equivalency comparison")] - public class NotStructuralEquivalencyAssertion : . - { - public NotStructuralEquivalencyAssertion(. context, object? notExpected, string? notExpectedExpression = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . IgnoringMember(string memberPath) { } - public . IgnoringType( type) { } - public . IgnoringType() { } - public . WithPartialEquivalency() { } - } - [.(typeof(int?), "HasValue", CustomName="DoesNotHaveValue", ExpectationMessage="have a value", NegateLogic=true)] - [.(typeof(int?), "HasValue", ExpectationMessage="have a value")] - public static class NullableAssertionExtensions { } - [.("IsEquatableTo")] - public class NullableEquatableAssertion : . - where TActual : struct, - { - public NullableEquatableAssertion(. context, TExpected expected) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.<.Process>("EnableRaisingEvents", CustomName="DoesNotHaveEventRaisingEnabled", ExpectationMessage="have event raising enabled", NegateLogic=true)] - [.<.Process>("EnableRaisingEvents", ExpectationMessage="have event raising enabled")] - [.<.Process>("HasExited", CustomName="HasNotExited", ExpectationMessage="have exited", NegateLogic=true)] - [.<.Process>("HasExited", ExpectationMessage="have exited")] - [.<.Process>("Responding", CustomName="IsNotResponding", ExpectationMessage="be responding", NegateLogic=true)] - [.<.Process>("Responding", ExpectationMessage="be responding")] - public static class ProcessAssertionExtensions { } - public class ReadOnlyListHasItemAtAssertion : . - where TList : . - { - public ReadOnlyListHasItemAtAssertion(. context, int index, TItem expected, .? comparer) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ReadOnlyListItemAtEqualsAssertion : . - where TList : . - { - public ReadOnlyListItemAtEqualsAssertion(. context, int index, TItem expected, bool negate) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ReadOnlyListItemAtNullAssertion : . - where TList : . - { - public ReadOnlyListItemAtNullAssertion(. context, int index, bool expectNull) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ReadOnlyListItemAtSatisfiesAssertion : . - where TList : . - { - public ReadOnlyListItemAtSatisfiesAssertion(. context, int index, <., .?> assertion) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ReadOnlyListItemAtSource : ., ., .> - where TList : . - { - public ReadOnlyListItemAtSource(. listContext, int index) { } - public . Context { get; } - public . IsAssignableFrom() { } - public . IsAssignableTo() { } - public . IsEqualTo(TItem expected, [.("expected")] string? expression = null) { } - public . IsNotAssignableFrom() { } - public . IsNotAssignableTo() { } - public . IsNotEqualTo(TItem expected, [.("expected")] string? expression = null) { } - public . IsNotNull() { } - public . IsNotTypeOf() { } - public . IsNull() { } - public . IsTypeOf() { } - public . Satisfies(<., .?> assertion, [.("assertion")] string? expression = null) { } - public . Satisfies( assertion, [.("assertion")] string? expression = null) - where TSource : . { } - } - public class ReadOnlyListLastItemEqualsAssertion : . - where TList : . - { - public ReadOnlyListLastItemEqualsAssertion(. context, TItem expected, bool negate) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ReadOnlyListLastItemNullAssertion : . - where TList : . - { - public ReadOnlyListLastItemNullAssertion(. context, bool expectNull) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ReadOnlyListLastItemSatisfiesAssertion : . - where TList : . - { - public ReadOnlyListLastItemSatisfiesAssertion(. context, <., .?> assertion) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class ReadOnlyListLastItemSource : ., ., .> - where TList : . - { - public ReadOnlyListLastItemSource(. listContext) { } - public . Context { get; } - public . IsAssignableFrom() { } - public . IsAssignableTo() { } - public . IsEqualTo(TItem expected, [.("expected")] string? expression = null) { } - public . IsNotAssignableFrom() { } - public . IsNotAssignableTo() { } - public . IsNotEqualTo(TItem expected, [.("expected")] string? expression = null) { } - public . IsNotNull() { } - public . IsNotTypeOf() { } - public . IsNull() { } - public . IsTypeOf() { } - public . Satisfies(<., .?> assertion, [.("assertion")] string? expression = null) { } - public . Satisfies( assertion, [.("assertion")] string? expression = null) - where TSource : . { } - } - [.<.Rune>("IsAscii", CustomName="IsNotAscii", ExpectationMessage="be ASCII", NegateLogic=true)] - [.<.Rune>("IsAscii", ExpectationMessage="be ASCII")] - [.<.Rune>("IsBmp", CustomName="IsNotBmp", ExpectationMessage="be in the Basic Multilingual Plane", NegateLogic=true)] - [.<.Rune>("IsBmp", ExpectationMessage="be in the Basic Multilingual Plane")] - [.<.Rune>(typeof(.Rune), "IsControl", CustomName="IsNotControl", ExpectationMessage="be a control character", NegateLogic=true)] - [.<.Rune>(typeof(.Rune), "IsControl", ExpectationMessage="be a control character")] - [.<.Rune>(typeof(.Rune), "IsDigit", CustomName="IsNotDigit", ExpectationMessage="be a digit", NegateLogic=true)] - [.<.Rune>(typeof(.Rune), "IsDigit", ExpectationMessage="be a digit")] - [.<.Rune>(typeof(.Rune), "IsLetter", CustomName="IsNotLetter", ExpectationMessage="be a letter", NegateLogic=true)] - [.<.Rune>(typeof(.Rune), "IsLetter", ExpectationMessage="be a letter")] - [.<.Rune>(typeof(.Rune), "IsLetterOrDigit", CustomName="IsNotLetterOrDigit", ExpectationMessage="be a letter or digit", NegateLogic=true)] - [.<.Rune>(typeof(.Rune), "IsLetterOrDigit", ExpectationMessage="be a letter or digit")] - [.<.Rune>(typeof(.Rune), "IsLower", CustomName="IsNotLower", ExpectationMessage="be lowercase", NegateLogic=true)] - [.<.Rune>(typeof(.Rune), "IsLower", ExpectationMessage="be lowercase")] - [.<.Rune>(typeof(.Rune), "IsNumber", CustomName="IsNotNumber", ExpectationMessage="be a number", NegateLogic=true)] - [.<.Rune>(typeof(.Rune), "IsNumber", ExpectationMessage="be a number")] - [.<.Rune>(typeof(.Rune), "IsPunctuation", CustomName="IsNotPunctuation", ExpectationMessage="be punctuation", NegateLogic=true)] - [.<.Rune>(typeof(.Rune), "IsPunctuation", ExpectationMessage="be punctuation")] - [.<.Rune>(typeof(.Rune), "IsSeparator", CustomName="IsNotSeparator", ExpectationMessage="be a separator", NegateLogic=true)] - [.<.Rune>(typeof(.Rune), "IsSeparator", ExpectationMessage="be a separator")] - [.<.Rune>(typeof(.Rune), "IsSymbol", CustomName="IsNotSymbol", ExpectationMessage="be a symbol", NegateLogic=true)] - [.<.Rune>(typeof(.Rune), "IsSymbol", ExpectationMessage="be a symbol")] - [.<.Rune>(typeof(.Rune), "IsUpper", CustomName="IsNotUpper", ExpectationMessage="be uppercase", NegateLogic=true)] - [.<.Rune>(typeof(.Rune), "IsUpper", ExpectationMessage="be uppercase")] - [.<.Rune>(typeof(.Rune), "IsWhiteSpace", CustomName="IsNotWhiteSpace", ExpectationMessage="be whitespace", NegateLogic=true)] - [.<.Rune>(typeof(.Rune), "IsWhiteSpace", ExpectationMessage="be whitespace")] - public static class RuneAssertionExtensions { } - public class SatisfiesAssertion : . - { - public SatisfiesAssertion(. context, predicate, string predicateDescription) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class SetDoesNotOverlapAssertion : . - where TSet : . - { - public SetDoesNotOverlapAssertion(. context, > adapterFactory, . other) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateSetAdapter(TSet value) { } - protected override string GetExpectation() { } - } - public class SetEqualsAssertion : . - where TSet : . - { - public SetEqualsAssertion(. context, > adapterFactory, . other) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateSetAdapter(TSet value) { } - protected override string GetExpectation() { } - } - public class SetIsProperSubsetOfAssertion : . - where TSet : . - { - public SetIsProperSubsetOfAssertion(. context, > adapterFactory, . other) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateSetAdapter(TSet value) { } - protected override string GetExpectation() { } - } - public class SetIsProperSupersetOfAssertion : . - where TSet : . - { - public SetIsProperSupersetOfAssertion(. context, > adapterFactory, . other) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateSetAdapter(TSet value) { } - protected override string GetExpectation() { } - } - public class SetIsSubsetOfAssertion : . - where TSet : . - { - public SetIsSubsetOfAssertion(. context, > adapterFactory, . other) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateSetAdapter(TSet value) { } - protected override string GetExpectation() { } - } - public class SetIsSupersetOfAssertion : . - where TSet : . - { - public SetIsSupersetOfAssertion(. context, > adapterFactory, . other) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateSetAdapter(TSet value) { } - protected override string GetExpectation() { } - } - public class SetOverlapsAssertion : . - where TSet : . - { - public SetOverlapsAssertion(. context, > adapterFactory, . other) { } - protected override .<.> CheckAsync(. metadata) { } - protected override . CreateSetAdapter(TSet value) { } - protected override string GetExpectation() { } - } - [.("IsFinite", CustomName="IsNotFinite", ExpectationMessage="be finite", NegateLogic=true)] - [.("IsFinite", ExpectationMessage="be finite")] - [.("IsInfinity", CustomName="IsNotInfinity", ExpectationMessage="be infinity", NegateLogic=true)] - [.("IsInfinity", ExpectationMessage="be infinity")] - [.("IsNaN", CustomName="IsNotNaN", ExpectationMessage="be NaN", NegateLogic=true)] - [.("IsNaN", ExpectationMessage="be NaN")] - [.("IsNegativeInfinity", CustomName="IsNotNegativeInfinity", ExpectationMessage="be negative infinity", NegateLogic=true)] - [.("IsNegativeInfinity", ExpectationMessage="be negative infinity")] - [.("IsNormal", CustomName="IsNotNormal", ExpectationMessage="be normal", NegateLogic=true)] - [.("IsNormal", ExpectationMessage="be normal")] - [.("IsPositiveInfinity", CustomName="IsNotPositiveInfinity", ExpectationMessage="be positive infinity", NegateLogic=true)] - [.("IsPositiveInfinity", ExpectationMessage="be positive infinity")] - [.("IsSubnormal", CustomName="IsNotSubnormal", ExpectationMessage="be subnormal", NegateLogic=true)] - [.("IsSubnormal", ExpectationMessage="be subnormal")] - public static class SingleAssertionExtensions { } - public sealed class SingleItemSource : . { } - public static class SpanAssertionExtensions { } - [.("Contains")] - public class StringContainsAssertion : . - { - public StringContainsAssertion(. context, string expected) { } - public StringContainsAssertion(. context, string expected, comparison) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . IgnoringCase() { } - public . IgnoringWhitespace() { } - public . WithComparison( comparison) { } - public . WithTrimming() { } - } - [.("DoesNotContain")] - public class StringDoesNotContainAssertion : . - { - public StringDoesNotContainAssertion(. context, string expected) { } - public StringDoesNotContainAssertion(. context, string expected, comparison) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . IgnoringCase() { } - public . WithComparison( comparison) { } - } - [.("DoesNotEndWith")] - public class StringDoesNotEndWithAssertion : . - { - public StringDoesNotEndWithAssertion(. context, string expected) { } - public StringDoesNotEndWithAssertion(. context, string expected, comparison) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . IgnoringCase() { } - public . WithComparison( comparison) { } - } - [.("DoesNotMatch")] - public class StringDoesNotMatchAssertion : . - { - public StringDoesNotMatchAssertion(. context, . regex) { } - public StringDoesNotMatchAssertion(. context, string pattern) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . IgnoringCase() { } - public . WithOptions(. options) { } - } - [.("DoesNotStartWith")] - public class StringDoesNotStartWithAssertion : . - { - public StringDoesNotStartWithAssertion(. context, string expected) { } - public StringDoesNotStartWithAssertion(. context, string expected, comparison) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . IgnoringCase() { } - public . WithComparison( comparison) { } - } - public static class StringEmptyAssertionExtensions - { - [.(ExpectationMessage="to be empty")] - public static . IsEmpty(this string value) { } - [.(ExpectationMessage="to not be null or empty")] - public static . IsNotEmpty(this string value) { } - } - [.("EndsWith")] - public class StringEndsWithAssertion : . - { - public StringEndsWithAssertion(. context, string expected) { } - public StringEndsWithAssertion(. context, string expected, comparison) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . IgnoringCase() { } - public . WithComparison( comparison) { } - } - [.("IsEqualTo")] - public class StringEqualsAssertion : . - { - public StringEqualsAssertion(. context, string? expected) { } - public StringEqualsAssertion(. context, string? expected, . comparer) { } - public StringEqualsAssertion(. context, string? expected, comparison) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . IgnoringCase() { } - public . IgnoringWhitespace() { } - public . WithComparison( comparison) { } - public . WithNullAndEmptyEquality() { } - public . WithTrimming() { } - } - public class StringLengthAssertion : . - { - public StringLengthAssertion(. context, int expectedLength) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class StringLengthRangeAssertionExtensions - { - [.(ExpectationMessage="to have length between {minLength} and {maxLength}")] - public static . HasLengthBetween(this string value, int minLength, int maxLength) { } - [.(ExpectationMessage="to have a maximum length of {maxLength}")] - public static . HasMaxLength(this string value, int maxLength) { } - [.(ExpectationMessage="to have a minimum length of {minLength}")] - public static . HasMinLength(this string value, int minLength) { } - } - public class StringLengthValueAssertion : . - { - public StringLengthValueAssertion(. stringContext) { } - } - public class StringLengthWithInlineAssertionAssertion : . - { - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class StringMatchesAssertion : .<..RegexMatchCollection> - { - public StringMatchesAssertion(. context, . regex) { } - public StringMatchesAssertion(. context, string pattern) { } - protected override .<.> CheckAsync(.<..RegexMatchCollection> metadata) { } - protected override string GetExpectation() { } - public . IgnoringCase() { } - public . WithOptions(. options) { } - } - [.("StartsWith")] - public class StringStartsWithAssertion : . - { - public StringStartsWithAssertion(. context, string expected) { } - public StringStartsWithAssertion(. context, string expected, comparison) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . IgnoringCase() { } - public . WithComparison( comparison) { } - } - [.("IsNullOrEmpty", CustomName="IsNotNullOrEmpty", ExpectationMessage="be null or empty", NegateLogic=true)] - [.("IsNullOrEmpty", ExpectationMessage="be null or empty")] - [.("IsNullOrWhiteSpace", CustomName="IsNotNullOrWhiteSpace", ExpectationMessage="be null, empty, or whitespace", NegateLogic=true)] - [.("IsNullOrWhiteSpace", ExpectationMessage="be null, empty, or whitespace")] - public static class StringStaticMethodAssertions { } - [.("Uses reflection to compare object properties and fields.")] - public class StructuralEquivalencyAssertion : . - { - public StructuralEquivalencyAssertion(. context, object? expected, string? expectedExpression = null) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - public . IgnoringMember(string memberPath) { } - public . IgnoringType( type) { } - public . IgnoringType() { } - public . WithPartialEquivalency() { } - } - [.<.>("IsCanceled", CustomName="IsNotCanceled", ExpectationMessage="be canceled", NegateLogic=true)] - [.<.>("IsCanceled", ExpectationMessage="be canceled")] - [.<.>("IsCompleted", CustomName="IsNotCompleted", ExpectationMessage="be completed", NegateLogic=true)] - [.<.>("IsCompleted", ExpectationMessage="be completed")] - [.<.>("IsCompletedSuccessfully", CustomName="IsNotCompletedSuccessfully", ExpectationMessage="be completed successfully", NegateLogic=true)] - [.<.>("IsCompletedSuccessfully", ExpectationMessage="be completed successfully")] - [.<.>("IsFaulted", CustomName="IsNotFaulted", ExpectationMessage="be faulted", NegateLogic=true)] - [.<.>("IsFaulted", ExpectationMessage="be faulted")] - public static class TaskAssertionExtensions { } - [.<.Thread>("IsAlive", CustomName="IsNotAlive", ExpectationMessage="be alive", NegateLogic=true)] - [.<.Thread>("IsAlive", ExpectationMessage="be alive")] - [.<.Thread>("IsBackground", CustomName="IsNotBackground", ExpectationMessage="be a background thread", NegateLogic=true)] - [.<.Thread>("IsBackground", ExpectationMessage="be a background thread")] - [.<.Thread>("IsThreadPoolThread", CustomName="IsNotThreadPoolThread", ExpectationMessage="be a thread pool thread", NegateLogic=true)] - [.<.Thread>("IsThreadPoolThread", ExpectationMessage="be a thread pool thread")] - public static class ThreadAssertionExtensions { } - public class ThrowsAssertion : .> - where TException : - { - public ThrowsAssertion(. context) { } - protected override bool IsExactTypeMatch { get; } - protected override bool CheckExceptionType( actualException, out string? errorMessage) { } - public . WithExceptionType( expectedExceptionType) { } - public .<> WithInnerException() { } - public . WithInnerException() - where TInnerException : { } - public . WithMessage(string expectedMessage) { } - public . WithMessage(string expectedMessage, comparison) { } - public . WithMessageContaining(string expectedSubstring) { } - public . WithMessageContaining(string expectedSubstring, comparison) { } - public . WithMessageMatching(.StringMatcher matcher) { } - public . WithMessageMatching(string pattern) { } - public . WithMessageNotContaining(string notExpectedSubstring) { } - public . WithMessageNotContaining(string notExpectedSubstring, comparison) { } - public . WithParameterName(string expectedParameterName) { } - public . WithStackTraceContaining(string expectedSubstring) { } - public . WithStackTraceContaining(string expectedSubstring, comparison) { } - } - public class ThrowsExactlyAssertion : .> - where TException : - { - public ThrowsExactlyAssertion(. context) { } - protected override bool IsExactTypeMatch { get; } - protected override bool CheckExceptionType( actualException, out string? errorMessage) { } - public . WithInnerException() - where TInnerException : { } - public . WithMessage(string expectedMessage) { } - public . WithMessage(string expectedMessage, comparison) { } - public . WithMessageContaining(string expectedSubstring) { } - public . WithMessageContaining(string expectedSubstring, comparison) { } - public . WithMessageMatching(.StringMatcher matcher) { } - public . WithMessageMatching(string pattern) { } - public . WithMessageNotContaining(string notExpectedSubstring) { } - public . WithMessageNotContaining(string notExpectedSubstring, comparison) { } - public . WithParameterName(string expectedParameterName) { } - public . WithStackTraceContaining(string expectedSubstring) { } - public . WithStackTraceContaining(string expectedSubstring, comparison) { } - } - public class ThrowsNothingAssertion : . - { - public ThrowsNothingAssertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("IsEqualTo", OverloadResolutionPriority=2)] - public class TimeOnlyEqualsAssertion : .<, > - { - public TimeOnlyEqualsAssertion(.<> context, expected) { } - protected override bool AreExactlyEqual( actual, expected) { } - protected override object CalculateDifference( actual, expected) { } - protected override string FormatDifferenceMessage( actual, object difference) { } - protected override bool HasToleranceValue() { } - protected override bool IsWithinTolerance( actual, expected, tolerance) { } - } - [.("IsEqualTo", OverloadResolutionPriority=2)] - public class TimeSpanEqualsAssertion : .<> - { - public TimeSpanEqualsAssertion(.<> context, expected) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - public . Within( tolerance) { } - } - [.<>("HasIanaId", CustomName="DoesNotHaveIanaId", ExpectationMessage="have an IANA ID", NegateLogic=true)] - [.<>("HasIanaId", ExpectationMessage="have an IANA ID")] - [.<>("SupportsDaylightSavingTime", CustomName="DoesNotSupportDaylightSavingTime", ExpectationMessage="support daylight saving time", NegateLogic=true)] - [.<>("SupportsDaylightSavingTime", ExpectationMessage="support daylight saving time")] - public static class TimeZoneInfoAssertionExtensions { } - public abstract class ToleranceBasedEqualsAssertion : . - { - protected ToleranceBasedEqualsAssertion(. context, TValue expected) { } - protected abstract bool AreExactlyEqual(TValue actual, TValue expected); - protected abstract object CalculateDifference(TValue actual, TValue expected); - protected override .<.> CheckAsync(. metadata) { } - protected virtual string FormatDifferenceMessage(TValue actual, object difference) { } - protected virtual string FormatRelativeDifferenceMessage(TValue actual, object difference, double percentTolerance) { } - protected override string GetExpectation() { } - protected abstract bool HasToleranceValue(); - protected virtual bool IsWithinRelativeTolerance(TValue actual, TValue expected, double percentTolerance) { } - protected abstract bool IsWithinTolerance(TValue actual, TValue expected, TTolerance tolerance); - public . Within(TTolerance tolerance) { } - public . WithinRelativeTolerance(double percentTolerance) { } - } - [.<>("ContainsGenericParameters", CustomName="DoesNotContainGenericParameters", ExpectationMessage="contain generic parameters", NegateLogic=true)] - [.<>("ContainsGenericParameters", ExpectationMessage="contain generic parameters")] - [.<>("IsAbstract", CustomName="IsNotAbstract", ExpectationMessage="be abstract", NegateLogic=true)] - [.<>("IsAbstract", ExpectationMessage="be abstract")] - [.<>("IsArray", CustomName="IsNotArray", ExpectationMessage="be an array", NegateLogic=true)] - [.<>("IsArray", ExpectationMessage="be an array")] - [.<>("IsByRef", CustomName="IsNotByRef", ExpectationMessage="be a by-ref type", NegateLogic=true)] - [.<>("IsByRef", ExpectationMessage="be a by-ref type")] - [.<>("IsByRefLike", CustomName="IsNotByRefLike", ExpectationMessage="be a by-ref-like type", NegateLogic=true)] - [.<>("IsByRefLike", ExpectationMessage="be a by-ref-like type")] - [.<>("IsCOMObject", CustomName="IsNotCOMObject", ExpectationMessage="be a COM object", NegateLogic=true)] - [.<>("IsCOMObject", ExpectationMessage="be a COM object")] - [.<>("IsClass", CustomName="IsNotClass", ExpectationMessage="be a class", NegateLogic=true)] - [.<>("IsClass", ExpectationMessage="be a class")] - [.<>("IsConstructedGenericType", CustomName="IsNotConstructedGenericType", ExpectationMessage="be a constructed generic type", NegateLogic=true)] - [.<>("IsConstructedGenericType", ExpectationMessage="be a constructed generic type")] - [.<>("IsEnum", CustomName="IsNotEnum", ExpectationMessage="be an enum", NegateLogic=true)] - [.<>("IsEnum", ExpectationMessage="be an enum")] - [.<>("IsGenericType", CustomName="IsNotGenericType", ExpectationMessage="be a generic type", NegateLogic=true)] - [.<>("IsGenericType", ExpectationMessage="be a generic type")] - [.<>("IsGenericTypeDefinition", CustomName="IsNotGenericTypeDefinition", ExpectationMessage="be a generic type definition", NegateLogic=true)] - [.<>("IsGenericTypeDefinition", ExpectationMessage="be a generic type definition")] - [.<>("IsInterface", CustomName="IsNotInterface", ExpectationMessage="be an interface", NegateLogic=true)] - [.<>("IsInterface", ExpectationMessage="be an interface")] - [.<>("IsNested", CustomName="IsNotNested", ExpectationMessage="be a nested type", NegateLogic=true)] - [.<>("IsNested", ExpectationMessage="be a nested type")] - [.<>("IsNestedAssembly", CustomName="IsNotNestedAssembly", ExpectationMessage="be a nested assembly type", NegateLogic=true)] - [.<>("IsNestedAssembly", ExpectationMessage="be a nested assembly type")] - [.<>("IsNestedFamily", CustomName="IsNotNestedFamily", ExpectationMessage="be a nested family type", NegateLogic=true)] - [.<>("IsNestedFamily", ExpectationMessage="be a nested family type")] - [.<>("IsNestedPrivate", CustomName="IsNotNestedPrivate", ExpectationMessage="be a nested private type", NegateLogic=true)] - [.<>("IsNestedPrivate", ExpectationMessage="be a nested private type")] - [.<>("IsNestedPublic", CustomName="IsNotNestedPublic", ExpectationMessage="be a nested public type", NegateLogic=true)] - [.<>("IsNestedPublic", ExpectationMessage="be a nested public type")] - [.<>("IsPointer", CustomName="IsNotPointer", ExpectationMessage="be a pointer type", NegateLogic=true)] - [.<>("IsPointer", ExpectationMessage="be a pointer type")] - [.<>("IsPrimitive", CustomName="IsNotPrimitive", ExpectationMessage="be a primitive type", NegateLogic=true)] - [.<>("IsPrimitive", ExpectationMessage="be a primitive type")] - [.<>("IsPublic", CustomName="IsNotPublic", ExpectationMessage="be public", NegateLogic=true)] - [.<>("IsPublic", ExpectationMessage="be public")] - [.<>("IsSealed", CustomName="IsNotSealed", ExpectationMessage="be sealed", NegateLogic=true)] - [.<>("IsSealed", ExpectationMessage="be sealed")] - [.<>("IsValueType", CustomName="IsNotValueType", ExpectationMessage="be a value type", NegateLogic=true)] - [.<>("IsValueType", ExpectationMessage="be a value type")] - [.<>("IsVisible", CustomName="IsNotVisible", ExpectationMessage="be visible", NegateLogic=true)] - [.<>("IsVisible", ExpectationMessage="be visible")] - public static class TypeAssertionExtensions - { - [.(ExpectationMessage="be assignable from {sourceType}", InlineMethodBody=true)] - public static . IsAssignableFrom(this value, sourceType) { } - [.(ExpectationMessage="be assignable to {expectedType}", InlineMethodBody=true)] - public static . IsAssignableTo(this value, expectedType) { } - } - public sealed class TypeIsAssignableToAssertion : .<> - { - public TypeIsAssignableToAssertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeOfAssertion : . - { - public TypeOfAssertion(. parentContext) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.<>("IsAbsoluteUri", CustomName="IsNotAbsoluteUri", ExpectationMessage="be an absolute URI", NegateLogic=true)] - [.<>("IsAbsoluteUri", ExpectationMessage="be an absolute URI")] - [.<>("IsDefaultPort", CustomName="IsNotDefaultPort", ExpectationMessage="use the default port", NegateLogic=true)] - [.<>("IsDefaultPort", ExpectationMessage="use the default port")] - [.<>("IsFile", CustomName="IsNotFile", ExpectationMessage="be a file URI", NegateLogic=true)] - [.<>("IsFile", ExpectationMessage="be a file URI")] - [.<>("IsLoopback", CustomName="IsNotLoopback", ExpectationMessage="be a loopback URI", NegateLogic=true)] - [.<>("IsLoopback", ExpectationMessage="be a loopback URI")] - [.<>("IsUnc", CustomName="IsNotUnc", ExpectationMessage="be a UNC URI", NegateLogic=true)] - [.<>("IsUnc", ExpectationMessage="be a UNC URI")] - [.<>("UserEscaped", CustomName="IsNotUserEscaped", ExpectationMessage="be user-escaped", NegateLogic=true)] - [.<>("UserEscaped", ExpectationMessage="be user-escaped")] - public static class UriAssertionExtensions { } - [.<.>("IsCanceled", CustomName="IsNotCanceled", ExpectationMessage="be canceled", NegateLogic=true)] - [.<.>("IsCanceled", ExpectationMessage="be canceled")] - [.<.>("IsCompleted", CustomName="IsNotCompleted", ExpectationMessage="be completed", NegateLogic=true)] - [.<.>("IsCompleted", ExpectationMessage="be completed")] - [.<.>("IsCompletedSuccessfully", CustomName="IsNotCompletedSuccessfully", ExpectationMessage="be completed successfully", NegateLogic=true)] - [.<.>("IsCompletedSuccessfully", ExpectationMessage="be completed successfully")] - [.<.>("IsFaulted", CustomName="IsNotFaulted", ExpectationMessage="be faulted", NegateLogic=true)] - [.<.>("IsFaulted", ExpectationMessage="be faulted")] - public static class ValueTaskAssertionExtensions { } - public class WaitsForAssertion : . - { - public WaitsForAssertion(. context, <., .> assertionBuilder, timeout, ? pollingInterval = default, .CancellationToken cancellationToken = default) { } - public override . AssertAsync() { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.<>("IsAlive", CustomName="IsNotAlive", ExpectationMessage="be alive", NegateLogic=true)] - [.<>("IsAlive", ExpectationMessage="be alive")] - [.<>("TrackResurrection", CustomName="DoesNotTrackResurrection", ExpectationMessage="track resurrection", NegateLogic=true)] - [.<>("TrackResurrection", ExpectationMessage="track resurrection")] - public static class WeakReferenceAssertionExtensions { } - public class WithInnerExceptionsAssertion : .<> - { - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } -} -namespace . -{ - public sealed class ReferenceEqualityComparer : . - where T : class - { - public static readonly ..ReferenceEqualityComparer Instance; - public bool Equals(T? x, T? y) { } - public int GetHashCode(T obj) { } - } - [.("Structural equality comparison uses reflection to access object members and is no" + - "t compatible with AOT")] - public sealed class StructuralEqualityComparer : . - { - public static readonly ..StructuralEqualityComparer Instance; - public bool Equals(T? x, T? y) { } - public int GetHashCode(T obj) { } - } -} -namespace . -{ - public static class JsonElementAssertionExtensions - { - [.(ExpectationMessage="to not have property \'{propertyName}\'", InlineMethodBody=true)] - public static bool DoesNotHaveProperty(this . value, string propertyName) { } - [.(ExpectationMessage="to have property \'{propertyName}\'", InlineMethodBody=true)] - public static bool HasProperty(this . value, string propertyName) { } - [.(ExpectationMessage="to be a JSON array", InlineMethodBody=true)] - public static bool IsArray(this . value) { } - [.(ExpectationMessage="to be a JSON boolean", InlineMethodBody=true)] - public static bool IsBoolean(this . value) { } - [.(ExpectationMessage="to not be JSON null", InlineMethodBody=true)] - public static bool IsNotNull(this . value) { } - [.(ExpectationMessage="to be JSON null", InlineMethodBody=true)] - public static bool IsNull(this . value) { } - [.(ExpectationMessage="to be a JSON number", InlineMethodBody=true)] - public static bool IsNumber(this . value) { } - [.(ExpectationMessage="to be a JSON object", InlineMethodBody=true)] - public static bool IsObject(this . value) { } - [.(ExpectationMessage="to be a JSON string", InlineMethodBody=true)] - public static bool IsString(this . value) { } - } - public static class JsonNodeAssertionExtensions - { - [.(ExpectationMessage="to not have property \'{propertyName}\'")] - public static . DoesNotHaveJsonProperty(this ..JsonNode? value, string propertyName) { } - [.(ExpectationMessage="to have {expected} elements")] - public static . HasJsonArrayCount(this ..JsonNode? value, int expected) { } - [.(ExpectationMessage="to have property \'{propertyName}\'")] - public static . HasJsonProperty(this ..JsonNode? value, string propertyName) { } - [.(ExpectationMessage="to be equal to {expected}")] - public static . IsDeepEqualTo(this ..JsonNode? value, ..JsonNode? expected) { } - [.(ExpectationMessage="to be a JsonArray")] - public static . IsJsonArray(this ..JsonNode? value) { } - [.(ExpectationMessage="to be an empty JSON array")] - public static . IsJsonArrayEmpty(this ..JsonNode? value) { } - [.(ExpectationMessage="to not be an empty JSON array")] - public static . IsJsonArrayNotEmpty(this ..JsonNode? value) { } - [.(ExpectationMessage="to be a JsonObject")] - public static . IsJsonObject(this ..JsonNode? value) { } - [.(ExpectationMessage="to be a JsonValue")] - public static . IsJsonValue(this ..JsonNode? value) { } - [.(ExpectationMessage="to not be equal to {expected}")] - public static . IsNotDeepEqualTo(this ..JsonNode? value, ..JsonNode? expected) { } - } - public static class JsonStringAssertionExtensions - { - [.(ExpectationMessage="to not be valid JSON")] - public static . IsNotValidJson(this string value) { } - [.(ExpectationMessage="to be valid JSON")] - public static . IsValidJson(this string value) { } - [.(ExpectationMessage="to be a valid JSON array")] - public static . IsValidJsonArray(this string value) { } - [.(ExpectationMessage="to be a valid JSON object")] - public static . IsValidJsonObject(this string value) { } - } -} -namespace . -{ - public class CountWrapper : ., . - where TCollection : . - { - public CountWrapper(. context) { } - public . Between(int minimum, int maximum, [.("minimum")] string? minExpression = null, [.("maximum")] string? maxExpression = null) { } - public . EqualTo(int expectedCount, [.("expectedCount")] string? expression = null) { } - public ._IsGreaterThan_TValue_Assertion GreaterThan(int expected, [.("expected")] string? expression = null) { } - public ._IsGreaterThanOrEqualTo_TValue_Assertion GreaterThanOrEqualTo(int expected, [.("expected")] string? expression = null) { } - public ._IsLessThan_TValue_Assertion LessThan(int expected, [.("expected")] string? expression = null) { } - public ._IsLessThanOrEqualTo_TValue_Assertion LessThanOrEqualTo(int expected, [.("expected")] string? expression = null) { } - public . NotEqualTo(int expected, [.("expected")] string? expression = null) { } - public ._IsGreaterThan_TValue_Assertion Positive() { } - public . Zero() { } - } - public class LengthWrapper : ., . - { - public LengthWrapper(. context) { } - public . EqualTo(int expectedLength, [.("expectedLength")] string? expression = null) { } - } -} -namespace .Core -{ - public class AndContinuation : . { } - public sealed class AssertionContext - { - public AssertionContext(. evaluation, .StringBuilder expressionBuilder) { } - public AssertionContext(TValue? value, .StringBuilder expressionBuilder) { } - public . Evaluation { get; } - public .StringBuilder ExpressionBuilder { get; } - [return: .(new string[] { - "Value", - "Exception"})] - public .<> GetAsync() { } - [return: .(new string[] { - "Start", - "End"})] - public <, > GetTiming() { } - public . Map(<., .> evaluationFactory) { } - public . Map(> asyncMapper) { } - public . Map( mapper) { } - public . MapException() - where TException : { } - } - public readonly struct AssertionResult - { - public ? Exception { get; } - public bool IsPassed { get; } - public string Message { get; } - public static . Passed { get; } - public static . FailIf(bool condition, string message) { } - public static . Failed(string message) { } - public static . Failed(string message, ? exception) { } - } - public readonly struct AssertionResult - { - public ? Exception { get; } - public bool IsPassed { get; } - public string Message { get; } - public T Value { get; } - public static . Passed(T value) { } - public static . op_Implicit(. result) { } - } - public abstract class Assertion : . - { - protected readonly . Context; - protected Assertion(. context) { } - public . And { get; } - protected .? InternalWrappedExecution { get; } - public . Or { get; } - protected void AppendExpression(string expression) { } - public virtual . AssertAsync() { } - public . Because(string message) { } - protected virtual .<.> CheckAsync(. metadata) { } - protected CreateException(. result) { } - public . GetAwaiter() { } - protected abstract string GetExpectation(); - protected void ThrowIfMixingCombiner() - where TCombinerToAvoid : . { } - } - public class AsyncEnumerableAndContinuation : . { } - public class AsyncEnumerableOrContinuation : . { } - public enum ChainType - { - None = 0, - And = 1, - Or = 2, - } - public class CollectionAndContinuation : . - where TCollection : . { } - public class CollectionOrContinuation : . - where TCollection : . { } - public class DictionaryAndContinuation : . - where TDictionary : . - where TKey : notnull { } - public class DictionaryOrContinuation : . - where TDictionary : . - where TKey : notnull { } - public sealed class EvaluationContext - { - public EvaluationContext(<.<>> evaluator) { } - public EvaluationContext(TValue? value) { } - [return: .(new string?[]?[] { - "Value", - "Exception"})] - public .<> GetAsync() { } - [return: .(new string[] { - "Start", - "End"})] - public <, > GetTiming() { } - public . Map(> asyncMapper) { } - public . Map( mapper) { } - public . MapException() - where TException : { } - [return: .(new string?[]?[] { - "Value", - "Exception"})] - public .<> ReevaluateAsync() { } - } - public readonly struct EvaluationMetadata - { - public EvaluationMetadata(TValue? value, ? exception, startTime, endTime) { } - public Duration { get; } - public EndTime { get; } - public ? Exception { get; } - public StartTime { get; } - public TValue Value { get; } - } - public interface IAssertion - { - . AssertAsync(); - } - public interface IAssertionSource { } - public interface IAssertionSourceFor - where TSelf : . - { - TSelf Create(TItem item, string label); - } - public interface IAssertionSource : . - { - . Context { get; } - . IsAssignableFrom(); - . IsAssignableTo(); - . IsNotAssignableFrom(); - . IsNotAssignableTo(); - . IsNotTypeOf(); - . IsTypeOf(); - } - public interface IDelegateAssertionSource : ., . { } - public interface IItemSatisfiesSource : ., . - { - TResult Satisfies( assertion, string? expression = null) - where TSource : .; - } - public class ListAndContinuation : . - where TList : . { } - public class ListOrContinuation : . - where TList : . { } - public class MutableDictionaryAndContinuation : . - where TDictionary : . - where TKey : notnull { } - public class MutableDictionaryOrContinuation : . - where TDictionary : . - where TKey : notnull { } - public class OrContinuation : . { } - public class ReadOnlyListAndContinuation : . - where TList : . - { - public ReadOnlyListAndContinuation(. context, . previousAssertion) { } - } - public class ReadOnlyListOrContinuation : . - where TList : . - { - public ReadOnlyListOrContinuation(. context, . previousAssertion) { } - } -} -namespace .Enums -{ - public enum CollectionOrdering - { - Any = 0, - Matching = 1, - } -} -namespace .Exceptions -{ - public class AssertionException : . - { - public AssertionException(string? message) { } - public AssertionException(string? message, innerException) { } - } - public class BaseAssertionException : - { - public BaseAssertionException() { } - public BaseAssertionException(string? message) { } - public BaseAssertionException(string? message, ? innerException) { } - } - public class MaybeCaughtException : - { - public MaybeCaughtException( exception) { } - } - public class MixedAndOrAssertionsException : . - { - public MixedAndOrAssertionsException() { } - } -} -namespace .Extensions -{ - public static class ArrayAssertionExtensions - { - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsEmpty_Assertion IsEmpty(this . source) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsNotEmpty_Assertion IsNotEmpty(this . source) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsNotSingleElement_Assertion IsNotSingleElement(this .<.> source) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsNotSingleElement_Assertion IsNotSingleElement(this . source) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsSingleElement_Assertion IsSingleElement(this .<.> source) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsSingleElement_Assertion IsSingleElement(this . source) { } - } - public static class AssemblyAssertionExtensions - { - public static . IsCollectible(this .<.Assembly> source) { } - public static . IsDynamic(this .<.Assembly> source) { } - public static . IsFullyTrusted(this .<.Assembly> source) { } - public static . IsNotCollectible(this .<.Assembly> source) { } - public static . IsNotDynamic(this .<.Assembly> source) { } - public static . IsNotFullyTrusted(this .<.Assembly> source) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsNotSigned_Assertion IsNotSigned(this . source) - where TActual : .Assembly { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsSigned_Assertion IsSigned(this . source) - where TActual : .Assembly { } - } - public class AssemblyIsCollectibleAssertion : .<.Assembly> - { - public AssemblyIsCollectibleAssertion(.<.Assembly> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Assembly> metadata) { } - protected override string GetExpectation() { } - } - public class AssemblyIsDynamicAssertion : .<.Assembly> - { - public AssemblyIsDynamicAssertion(.<.Assembly> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Assembly> metadata) { } - protected override string GetExpectation() { } - } - public class AssemblyIsFullyTrustedAssertion : .<.Assembly> - { - public AssemblyIsFullyTrustedAssertion(.<.Assembly> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Assembly> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Assembly_IsNotSigned_Assertion : .<.Assembly> - { - public Assembly_IsNotSigned_Assertion(.<.Assembly> context) { } - protected override .<.> CheckAsync(.<.Assembly> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Assembly_IsSigned_Assertion : .<.Assembly> - { - public Assembly_IsSigned_Assertion(.<.Assembly> context) { } - protected override .<.> CheckAsync(.<.Assembly> metadata) { } - protected override string GetExpectation() { } - } - public static class AssertionExtensions - { - public static . CompletesWithin(this . source, timeout, [.("timeout")] string? expression = null) { } - public static . CompletesWithin(this . source, timeout, [.("timeout")] string? expression = null) { } - public static .> Count(this .> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TCollection : .<.> { } - public static .> Count(this .> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TCollection : .<.> { } - public static .> Count(this .> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TCollection : .<.> { } - public static .> Count(this .> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TCollection : .<.> { } - public static .> Count(this .> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TCollection : .<.> { } - public static .> Count(this .> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TCollection : .<.> { } - public static .> Count(this .> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TCollection : .<.> { } - public static . Count(this . source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TCollection : . { } - public static .> Count(this .> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TCollection : .<.> - where TKey : notnull { } - public static .> Count(this .> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TCollection : .<.> - where TKey : notnull { } - public static .> Count(this .> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TCollection : .<.> - where TKey : notnull { } - public static . EqualTo(this . source, TValue? expected, [.("expected")] string? expression = null) { } - public static . Eventually(this . source, <., .> assertionBuilder, timeout, ? pollingInterval = default, .CancellationToken cancellationToken = default, [.("timeout")] string? timeoutExpression = null, [.("pollingInterval")] string? pollingIntervalExpression = null) { } - [("Use Length() instead, which provides all numeric assertion methods. Example: Asse" + - "(str).Length().IsGreaterThan(5)")] - public static ..LengthWrapper HasLength(this . source) { } - [("Use Length().IsEqualTo(expectedLength) instead.")] - public static . HasLength(this . source, int expectedLength, [.("expectedLength")] string? expression = null) { } - public static . HasMessage(this . source, string expectedMessage, [.("expectedMessage")] string? expression = null) - where TException : { } - public static . HasMessage(this . source, string expectedMessage, comparison, [.("expectedMessage")] string? expression = null) - where TException : { } - public static . HasMessageContaining(this . source, string expectedSubstring, [.("expectedSubstring")] string? expression = null) - where TException : { } - public static . HasMessageContaining(this . source, string expectedSubstring, comparison, [.("expectedSubstring")] string? expression = null) - where TException : { } - public static . HasMessageEqualTo(this . source, string expectedMessage) { } - public static . HasMessageEqualTo(this . source, string expectedMessage, comparison) { } - public static . HasMessageStartingWith(this . source, string expectedPrefix) { } - public static . HasMessageStartingWith(this . source, string expectedPrefix, comparison) { } - public static ._IsGreaterThan_TValue_Assertion<> IsAfter(this .<> source, expected, [.("expected")] string? expression = null) { } - public static ._IsGreaterThan_TValue_Assertion<> IsAfter(this .<> source, expected, [.("expected")] string? expression = null) { } - public static ._IsGreaterThan_TValue_Assertion<> IsAfter(this .<> source, expected, [.("expected")] string? expression = null) { } - public static ._IsGreaterThan_TValue_Assertion<> IsAfter(this .<> source, expected, [.("expected")] string? expression = null) { } - public static ._IsGreaterThanOrEqualTo_TValue_Assertion<> IsAfterOrEqualTo(this .<> source, expected, [.("expected")] string? expression = null) { } - public static ._IsGreaterThanOrEqualTo_TValue_Assertion<> IsAfterOrEqualTo(this .<> source, expected, [.("expected")] string? expression = null) { } - public static ._IsGreaterThanOrEqualTo_TValue_Assertion<> IsAfterOrEqualTo(this .<> source, expected, [.("expected")] string? expression = null) { } - public static ._IsGreaterThanOrEqualTo_TValue_Assertion<> IsAfterOrEqualTo(this .<> source, expected, [.("expected")] string? expression = null) { } - public static ._IsLessThan_TValue_Assertion<> IsBefore(this .<> source, expected, [.("expected")] string? expression = null) { } - public static ._IsLessThan_TValue_Assertion<> IsBefore(this .<> source, expected, [.("expected")] string? expression = null) { } - public static ._IsLessThan_TValue_Assertion<> IsBefore(this .<> source, expected, [.("expected")] string? expression = null) { } - public static ._IsLessThan_TValue_Assertion<> IsBefore(this .<> source, expected, [.("expected")] string? expression = null) { } - public static ._IsLessThanOrEqualTo_TValue_Assertion<> IsBeforeOrEqualTo(this .<> source, expected, [.("expected")] string? expression = null) { } - public static ._IsLessThanOrEqualTo_TValue_Assertion<> IsBeforeOrEqualTo(this .<> source, expected, [.("expected")] string? expression = null) { } - public static ._IsLessThanOrEqualTo_TValue_Assertion<> IsBeforeOrEqualTo(this .<> source, expected, [.("expected")] string? expression = null) { } - public static ._IsLessThanOrEqualTo_TValue_Assertion<> IsBeforeOrEqualTo(this .<> source, expected, [.("expected")] string? expression = null) { } - public static ..IsDefinedAssertion IsDefined(this . source) - where TEnum : struct, { } - [.("Uses reflection to compare members")] - public static . IsEquivalentTo(this . source, object? expected, [.("expected")] string? expression = null) { } - public static ._IsLessThan_TValue_Assertion IsNegative(this . source) - where TValue : { } - public static ._IsLessThan_TValue_Assertion IsNegative(this . source) - where TValue : struct, { } - public static ..IsNotDefinedAssertion IsNotDefined(this . source) - where TEnum : struct, { } - [.("Uses reflection to compare members")] - public static . IsNotEquivalentTo(this . source, object? expected, [.("expected")] string? expression = null) { } - public static . IsNotNull(this . source) - where TValue : class { } - public static . IsNotNull(this . source) - where TValue : struct { } - public static ..IsNotParsableIntoAssertion IsNotParsableInto<[.(..None | ..PublicMethods | ..Interfaces)] T>(this . source) { } - public static . IsOfType(this . source, expectedType, [.("expectedType")] string? expression = null) { } - public static ..IsParsableIntoAssertion IsParsableInto<[.(..None | ..PublicMethods | ..Interfaces)] T>(this . source) { } - public static ._IsGreaterThan_TValue_Assertion IsPositive(this . source) - where TValue : { } - public static ._IsGreaterThan_TValue_Assertion IsPositive(this . source) - where TValue : struct, { } - public static . Length(this . source) { } - public static . Length(this . source, <., .?> lengthAssertion, [.("lengthAssertion")] string? expression = null) { } - public static . Member(this . source, .<> memberSelector, <., .> assertions) { } - [.("Uses reflection for legacy compatibility. For AOT compatibility, use the Member overload with strongly-typed assertions.")] - public static . Member(this . source, .<> memberSelector, <., object> assertions) { } - public static . Member(this . source, .<>> memberSelector, <.<., TItem>, .<.>> assertions) { } - [.("Uses reflection for legacy compatibility. For AOT compatibility, use the Member overload with strongly-typed assertions.")] - public static . Member(this . source, .<>> memberSelector, <.<., TItem>, object> assertions) { } - public static . Member(this . source, .<>> memberSelector, <., .> assertions) { } - [.("Uses reflection for legacy compatibility. For AOT compatibility, use the Member overload with strongly-typed assertions.")] - public static . Member(this . source, .<>> memberSelector, <., object> assertions) { } - public static . Member(this . source, .<>> memberSelector, <., .> assertions) { } - [.("Uses reflection for legacy compatibility. For AOT compatibility, use the Member overload with strongly-typed assertions.")] - public static . Member(this . source, .<>> memberSelector, <., object> assertions) { } - public static . Member(this . source, .<> memberSelector, <., .> assertions) { } - [.("Uses reflection for legacy compatibility. For AOT compatibility, use the Member overload with strongly-typed assertions.")] - public static . Member(this . source, .<> memberSelector, <., object> assertions) { } - public static . Member(this . source, .<> memberSelector, <., .> assertions) { } - public static . Member(this . source, .<>> memberSelector, <.<., TItem>, .> assertions) { } - public static . Member(this . source, .<>> memberSelector, <.<., TKey, TValue>, .<.>> assertions) - where TKey : notnull { } - [.("Uses reflection for legacy compatibility. For AOT compatibility, use the Member overload with strongly-typed assertions.")] - public static . Member(this . source, .<>> memberSelector, <.<., TKey, TValue>, object> assertions) - where TKey : notnull { } - public static . Member(this . source, .<>> memberSelector, <., .> assertions) { } - public static . Member(this . source, .<>> memberSelector, <., .> assertions) { } - public static . Member(this . source, .<> memberSelector, <., .> assertions) { } - public static . Member(this . source, .<>> memberSelector, <.<., TKey, TValue>, .> assertions) - where TKey : notnull { } - public static . Satisfies(this . source, predicate, [.("predicate")] string? expression = null) { } - public static . Satisfies(this . source, selector, <., .?> assertions, [.("selector")] string? selectorExpression = null) { } - public static . SatisfiesAsync(this . source, > selector, <., .?> assertions, [.("selector")] string? selectorExpression = null) { } - public static . Throws(this . source) - where TException : { } - public static . Throws(this . source) - where TException : { } - public static . Throws(this . source) - where TException : { } - public static . ThrowsAsync(this . source) - where TException : { } - public static . ThrowsExactly(this . source) - where TException : { } - public static . ThrowsExactly(this . source) - where TException : { } - public static . ThrowsExactly(this . source) - where TException : { } - public static .<> ThrowsException(this . source) { } - public static . ThrowsException(this . source) - where TException : { } - public static . ThrowsNothing(this . source) { } - public static . WaitsFor(this . source, <., .> assertionBuilder, timeout, ? pollingInterval = default, .CancellationToken cancellationToken = default, [.("timeout")] string? timeoutExpression = null, [.("pollingInterval")] string? pollingIntervalExpression = null) { } - public static ..WhenParsedIntoAssertion WhenParsedInto<[.(..None | ..PublicMethods | ..Interfaces)] T>(this . source) { } - public static . WithInnerException(this . source) - where TException : - where TInnerException : { } - public static . WithInnerExceptions(this .<> source, <.<>, .<.<>>?> innerExceptionsAssertion, [.("innerExceptionsAssertion")] string? expression = null) { } - public static . WithInnerExceptions(this .<> source, <.<>, .<.<>>?> innerExceptionsAssertion, [.("innerExceptionsAssertion")] string? expression = null) { } - public static . WithMessage(this . source, string expectedMessage, [.("expectedMessage")] string? expression = null) - where TException : { } - public static . WithMessage(this . source, string expectedMessage, comparison, [.("expectedMessage")] string? expression = null) - where TException : { } - public static . WithMessageContaining(this . source, string expectedSubstring, [.("expectedSubstring")] string? expression = null) - where TException : { } - public static . WithMessageContaining(this . source, string expectedSubstring, comparison, [.("expectedSubstring")] string? expression = null) - where TException : { } - public static . WithMessageMatching(this . source, .StringMatcher matcher, [.("matcher")] string? expression = null) - where TException : { } - public static . WithMessageMatching(this . source, string pattern, [.("pattern")] string? expression = null) - where TException : { } - public static . WithMessageNotContaining(this . source, string notExpectedSubstring, [.("notExpectedSubstring")] string? expression = null) - where TException : { } - public static . WithMessageNotContaining(this . source, string notExpectedSubstring, comparison, [.("notExpectedSubstring")] string? expression = null) - where TException : { } - public static . WithParameterName(this . source, string expectedParameterName, [.("expectedParameterName")] string? expression = null) - where TException : { } - public static . WithStackTraceContaining(this . source, string expectedSubstring, [.("expectedSubstring")] string? expression = null) - where TException : { } - public static . WithStackTraceContaining(this . source, string expectedSubstring, comparison, [.("expectedSubstring")] string? expression = null) - where TException : { } - } - public static class BetweenAssertionExtensions - { - public static . IsBetween(this . source, TValue minimum, TValue maximum, [.("minimum")] string? minimumExpression = null, [.("maximum")] string? maximumExpression = null) - where TValue : { } - } - public static class BigIntegerAssertionExtensions - { - public static . IsEven(this .<.BigInteger> source) { } - public static . IsNotEven(this .<.BigInteger> source) { } - public static . IsNotOne(this .<.BigInteger> source) { } - public static . IsNotPowerOfTwo(this .<.BigInteger> source) { } - public static . IsNotZero(this .<.BigInteger> source) { } - public static . IsOne(this .<.BigInteger> source) { } - public static . IsPowerOfTwo(this .<.BigInteger> source) { } - public static . IsZero(this .<.BigInteger> source) { } - } - public class BigIntegerIsEvenAssertion : .<.BigInteger> - { - public BigIntegerIsEvenAssertion(.<.BigInteger> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.BigInteger> metadata) { } - protected override string GetExpectation() { } - } - public class BigIntegerIsOneAssertion : .<.BigInteger> - { - public BigIntegerIsOneAssertion(.<.BigInteger> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.BigInteger> metadata) { } - protected override string GetExpectation() { } - } - public class BigIntegerIsPowerOfTwoAssertion : .<.BigInteger> - { - public BigIntegerIsPowerOfTwoAssertion(.<.BigInteger> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.BigInteger> metadata) { } - protected override string GetExpectation() { } - } - public class BigIntegerIsZeroAssertion : .<.BigInteger> - { - public BigIntegerIsZeroAssertion(.<.BigInteger> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.BigInteger> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Bool_IsFalse_Assertion : . - { - public Bool_IsFalse_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class Bool_IsTrue_Assertion : . - { - public Bool_IsTrue_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class BooleanAssertionExtensions - { - public static ._IsFalse_Assertion IsFalse(this . source) { } - public static ._IsFalse_Assertion IsFalse(this . source) { } - public static ._IsTrue_Assertion IsTrue(this . source) { } - public static ._IsTrue_Assertion IsTrue(this . source) { } - } - public static class ByteAssertions - { - public static ._IsEven_Assertion IsEven(this . source) { } - public static ._IsNotZero_Assertion IsNotZero(this . source) { } - public static ._IsOdd_Assertion IsOdd(this . source) { } - public static ._IsZero_Assertion IsZero(this . source) { } - } - public sealed class Byte_IsEven_Assertion : . - { - public Byte_IsEven_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class Byte_IsNotZero_Assertion : . - { - public Byte_IsNotZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class Byte_IsOdd_Assertion : . - { - public Byte_IsOdd_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class Byte_IsZero_Assertion : . - { - public Byte_IsZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class CancellationTokenAssertionExtensions - { - public static . CanBeCanceled(this .<.CancellationToken> source) { } - public static . CannotBeCanceled(this .<.CancellationToken> source) { } - public static . IsCancellationRequested(this .<.CancellationToken> source) { } - public static ._IsNone_Assertion IsNone(this .<.CancellationToken> source) { } - public static . IsNotCancellationRequested(this .<.CancellationToken> source) { } - public static ._IsNotNone_Assertion IsNotNone(this .<.CancellationToken> source) { } - } - public class CancellationTokenCanBeCanceledAssertion : .<.CancellationToken> - { - public CancellationTokenCanBeCanceledAssertion(.<.CancellationToken> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.CancellationToken> metadata) { } - protected override string GetExpectation() { } - } - public class CancellationTokenIsCancellationRequestedAssertion : .<.CancellationToken> - { - public CancellationTokenIsCancellationRequestedAssertion(.<.CancellationToken> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.CancellationToken> metadata) { } - protected override string GetExpectation() { } - } - public sealed class CancellationToken_IsNone_Assertion : .<.CancellationToken> - { - public CancellationToken_IsNone_Assertion(.<.CancellationToken> context) { } - protected override .<.> CheckAsync(.<.CancellationToken> metadata) { } - protected override string GetExpectation() { } - } - public sealed class CancellationToken_IsNotNone_Assertion : .<.CancellationToken> - { - public CancellationToken_IsNotNone_Assertion(.<.CancellationToken> context) { } - protected override .<.> CheckAsync(.<.CancellationToken> metadata) { } - protected override string GetExpectation() { } - } - public static class CharAssertionExtensions - { - public static . IsControl(this . source) { } - public static . IsDigit(this . source) { } - public static . IsHighSurrogate(this . source) { } - public static . IsLetter(this . source) { } - public static . IsLetterOrDigit(this . source) { } - public static . IsLowSurrogate(this . source) { } - public static . IsLower(this . source) { } - public static . IsNotControl(this . source) { } - public static . IsNotDigit(this . source) { } - public static . IsNotHighSurrogate(this . source) { } - public static . IsNotLetter(this . source) { } - public static . IsNotLetterOrDigit(this . source) { } - public static . IsNotLowSurrogate(this . source) { } - public static . IsNotLower(this . source) { } - public static . IsNotNumber(this . source) { } - public static . IsNotPunctuation(this . source) { } - public static . IsNotSeparator(this . source) { } - public static . IsNotSurrogate(this . source) { } - public static . IsNotSymbol(this . source) { } - public static . IsNotUpper(this . source) { } - public static . IsNotWhiteSpace(this . source) { } - public static . IsNumber(this . source) { } - public static . IsPunctuation(this . source) { } - public static . IsSeparator(this . source) { } - public static . IsSurrogate(this . source) { } - public static . IsSymbol(this . source) { } - public static . IsUpper(this . source) { } - public static . IsWhiteSpace(this . source) { } - } - public class CharIsControlWithCharAssertion : . - { - public CharIsControlWithCharAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CharIsDigitWithCharAssertion : . - { - public CharIsDigitWithCharAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CharIsHighSurrogateWithCharAssertion : . - { - public CharIsHighSurrogateWithCharAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CharIsLetterOrDigitWithCharAssertion : . - { - public CharIsLetterOrDigitWithCharAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CharIsLetterWithCharAssertion : . - { - public CharIsLetterWithCharAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CharIsLowSurrogateWithCharAssertion : . - { - public CharIsLowSurrogateWithCharAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CharIsLowerWithCharAssertion : . - { - public CharIsLowerWithCharAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CharIsNumberWithCharAssertion : . - { - public CharIsNumberWithCharAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CharIsPunctuationWithCharAssertion : . - { - public CharIsPunctuationWithCharAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CharIsSeparatorWithCharAssertion : . - { - public CharIsSeparatorWithCharAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CharIsSurrogateWithCharAssertion : . - { - public CharIsSurrogateWithCharAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CharIsSymbolWithCharAssertion : . - { - public CharIsSymbolWithCharAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CharIsUpperWithCharAssertion : . - { - public CharIsUpperWithCharAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class CharIsWhiteSpaceWithCharAssertion : . - { - public CharIsWhiteSpaceWithCharAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class CollectionAllAssertionExtensions - { - public static . All(this . source, predicate, string predicateDescription, [.("predicate")] string? predicateExpression = null, [.("predicateDescription")] string? predicateDescriptionExpression = null) - where TCollection : . { } - } - public static class CollectionAnyAssertionExtensions - { - public static . Any(this . source, predicate, string predicateDescription, [.("predicate")] string? predicateExpression = null, [.("predicateDescription")] string? predicateDescriptionExpression = null) - where TCollection : . { } - } - public static class CollectionContainsAssertionExtensions - { - public static . Contains(this . source, TItem expected, .? comparer = null, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) - where TCollection : . { } - } - public static class CollectionContainsPredicateAssertionExtensions - { - public static . Contains(this . source, predicate, [.("predicate")] string? predicateExpression = null) - where TCollection : . { } - } - public static class CollectionDoesNotContainAssertionExtensions - { - public static . DoesNotContain(this . source, TItem expected, .? comparer = null, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) - where TCollection : . { } - } - public static class CollectionDoesNotContainPredicateAssertionExtensions - { - public static . DoesNotContain(this . source, predicate, string predicateDescription, [.("predicate")] string? predicateExpression = null, [.("predicateDescription")] string? predicateDescriptionExpression = null) - where TCollection : . { } - } - public static class CollectionIsInDescendingOrderAssertionExtensions - { - public static . IsInDescendingOrder(this . source) - where TCollection : . { } - } - public static class CollectionIsInOrderAssertionExtensions - { - public static . IsInOrder(this . source) - where TCollection : . { } - } - public static class CollectionItemSatisfiesExtensions - { - public static TResult Satisfies(this .<., TResult> source, <., .?> assertion, [.("assertion")] string? expression = null) { } - public static TResult Satisfies(this .<., TResult> source, <., .?> assertion, [.("assertion")] string? expression = null) { } - public static TResult Satisfies(this .<., TResult> source, <., .?> assertion, [.("assertion")] string? expression = null) { } - public static TResult Satisfies(this .<., TResult> source, <., .?> assertion, [.("assertion")] string? expression = null) { } - public static TResult Satisfies(this .<., TResult> source, <., .?> assertion, [.("assertion")] string? expression = null) { } - public static TResult Satisfies(this .<., TResult> source, <., .?> assertion, [.("assertion")] string? expression = null) { } - public static TResult Satisfies(this .<., TResult> source, <., .?> assertion, [.("assertion")] string? expression = null) { } - public static TResult Satisfies(this . source, <., .?> assertion, [.("assertion")] string? expression = null) { } - public static TResult Satisfies(this .<., TResult> source, <., .?> assertion, [.("assertion")] string? expression = null) - where TKey : notnull { } - public static TResult Satisfies(this .<., TResult> source, <., .?> assertion, [.("assertion")] string? expression = null) - where TKey : notnull { } - public static TResult Satisfies(this .<., TResult> source, <., .?> assertion, [.("assertion")] string? expression = null) - where TKey : notnull { } - } - public static class ComparisonAssertionExtensions - { - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsGreaterThan_TValue_Assertion IsGreaterThan(this . source, TValue minimum, [.("minimum")] string? minimumExpression = null) - where TValue : { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsGreaterThanOrEqualTo_TValue_Assertion IsGreaterThanOrEqualTo(this . source, TValue minimum, [.("minimum")] string? minimumExpression = null) - where TValue : { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsLessThan_TValue_Assertion IsLessThan(this . source, TValue maximum, [.("maximum")] string? maximumExpression = null) - where TValue : { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsLessThanOrEqualTo_TValue_Assertion IsLessThanOrEqualTo(this . source, TValue maximum, [.("maximum")] string? maximumExpression = null) - where TValue : { } - } - public static class CookieAssertionExtensions - { - public static . Expired(this .<.Cookie> source) { } - public static . HttpOnly(this .<.Cookie> source) { } - public static . IsNotExpired(this .<.Cookie> source) { } - public static . IsNotHttpOnly(this .<.Cookie> source) { } - public static . IsNotSecure(this .<.Cookie> source) { } - public static . Secure(this .<.Cookie> source) { } - } - public class CookieExpiredAssertion : .<.Cookie> - { - public CookieExpiredAssertion(.<.Cookie> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Cookie> metadata) { } - protected override string GetExpectation() { } - } - public class CookieHttpOnlyAssertion : .<.Cookie> - { - public CookieHttpOnlyAssertion(.<.Cookie> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Cookie> metadata) { } - protected override string GetExpectation() { } - } - public class CookieSecureAssertion : .<.Cookie> - { - public CookieSecureAssertion(.<.Cookie> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Cookie> metadata) { } - protected override string GetExpectation() { } - } - public sealed class CrossTypeOverloadMarker { } - public static class CultureInfoAssertionExtensions - { - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsEnglish_Assertion IsEnglish(this . source) - where TActual : .CultureInfo { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsInvariant_Assertion IsInvariant(this . source) - where TActual : .CultureInfo { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsLeftToRight_Assertion IsLeftToRight(this . source) - where TActual : .CultureInfo { } - public static . IsNeutralCulture(this .<.CultureInfo> source) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsNotEnglish_Assertion IsNotEnglish(this . source) - where TActual : .CultureInfo { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsNotInvariant_Assertion IsNotInvariant(this . source) - where TActual : .CultureInfo { } - public static . IsNotNeutralCulture(this .<.CultureInfo> source) { } - public static . IsReadOnly(this .<.CultureInfo> source) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsRightToLeft_Assertion IsRightToLeft(this . source) - where TActual : .CultureInfo { } - } - public class CultureInfoIsNeutralCultureAssertion : .<.CultureInfo> - { - public CultureInfoIsNeutralCultureAssertion(.<.CultureInfo> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.CultureInfo> metadata) { } - protected override string GetExpectation() { } - } - public class CultureInfoIsReadOnlyAssertion : .<.CultureInfo> - { - public CultureInfoIsReadOnlyAssertion(.<.CultureInfo> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.CultureInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class CultureInfo_IsEnglish_Assertion : .<.CultureInfo> - { - public CultureInfo_IsEnglish_Assertion(.<.CultureInfo> context) { } - protected override .<.> CheckAsync(.<.CultureInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class CultureInfo_IsInvariant_Assertion : .<.CultureInfo> - { - public CultureInfo_IsInvariant_Assertion(.<.CultureInfo> context) { } - protected override .<.> CheckAsync(.<.CultureInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class CultureInfo_IsLeftToRight_Assertion : .<.CultureInfo> - { - public CultureInfo_IsLeftToRight_Assertion(.<.CultureInfo> context) { } - protected override .<.> CheckAsync(.<.CultureInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class CultureInfo_IsNotEnglish_Assertion : .<.CultureInfo> - { - public CultureInfo_IsNotEnglish_Assertion(.<.CultureInfo> context) { } - protected override .<.> CheckAsync(.<.CultureInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class CultureInfo_IsNotInvariant_Assertion : .<.CultureInfo> - { - public CultureInfo_IsNotInvariant_Assertion(.<.CultureInfo> context) { } - protected override .<.> CheckAsync(.<.CultureInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class CultureInfo_IsRightToLeft_Assertion : .<.CultureInfo> - { - public CultureInfo_IsRightToLeft_Assertion(.<.CultureInfo> context) { } - protected override .<.> CheckAsync(.<.CultureInfo> metadata) { } - protected override string GetExpectation() { } - } - public static class DateOnlyAssertionExtensions - { - public static ._IsFirstDayOfMonth_Assertion IsFirstDayOfMonth(this .<> source) { } - public static ._IsInFuture_Assertion IsInFuture(this .<> source) { } - public static ._IsInPast_Assertion IsInPast(this .<> source) { } - public static ._IsLastDayOfMonth_Assertion IsLastDayOfMonth(this .<> source) { } - public static ._IsLeapYear_Assertion IsLeapYear(this .<> source) { } - public static ._IsNotLeapYear_Assertion IsNotLeapYear(this .<> source) { } - public static ._IsNotToday_Assertion IsNotToday(this .<> source) { } - public static ._IsOnWeekday_Assertion IsOnWeekday(this .<> source) { } - public static ._IsOnWeekend_Assertion IsOnWeekend(this .<> source) { } - public static ._IsToday_Assertion IsToday(this .<> source) { } - } - public static class DateOnlyEqualsAssertionExtensions - { - public static . IsEqualTo(this .<> source, expected, [.("expected")] string? expectedExpression = null) { } - } - public sealed class DateOnly_IsFirstDayOfMonth_Assertion : .<> - { - public DateOnly_IsFirstDayOfMonth_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateOnly_IsInFuture_Assertion : .<> - { - public DateOnly_IsInFuture_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateOnly_IsInPast_Assertion : .<> - { - public DateOnly_IsInPast_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateOnly_IsLastDayOfMonth_Assertion : .<> - { - public DateOnly_IsLastDayOfMonth_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateOnly_IsLeapYear_Assertion : .<> - { - public DateOnly_IsLeapYear_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateOnly_IsNotLeapYear_Assertion : .<> - { - public DateOnly_IsNotLeapYear_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateOnly_IsNotToday_Assertion : .<> - { - public DateOnly_IsNotToday_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateOnly_IsOnWeekday_Assertion : .<> - { - public DateOnly_IsOnWeekday_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateOnly_IsOnWeekend_Assertion : .<> - { - public DateOnly_IsOnWeekend_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateOnly_IsToday_Assertion : .<> - { - public DateOnly_IsToday_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public static class DateTimeAssertionExtensions - { - public static . IsDaylightSavingTime(this .<> source) { } - public static ._IsInFuture_Assertion IsInFuture(this .<> source) { } - public static ._IsInFutureUtc_Assertion IsInFutureUtc(this .<> source) { } - public static ._IsInPast_Assertion IsInPast(this .<> source) { } - public static ._IsInPastUtc_Assertion IsInPastUtc(this .<> source) { } - public static ._IsLeapYear_Assertion IsLeapYear(this .<> source) { } - public static . IsNotDaylightSavingTime(this .<> source) { } - public static ._IsNotLeapYear_Assertion IsNotLeapYear(this .<> source) { } - public static ._IsNotToday_Assertion IsNotToday(this .<> source) { } - public static ._IsNotUtc_Assertion IsNotUtc(this .<> source) { } - public static ._IsOnWeekday_Assertion IsOnWeekday(this .<> source) { } - public static ._IsOnWeekend_Assertion IsOnWeekend(this .<> source) { } - public static ._IsToday_Assertion IsToday(this .<> source) { } - public static ._IsUtc_Assertion IsUtc(this .<> source) { } - } - public static class DateTimeEqualsAssertionExtensions - { - public static . IsEqualTo(this .<> source, expected, [.("expected")] string? expectedExpression = null) { } - } - public static class DateTimeEqualsExactAssertionExtensions - { - public static . EqualsExact(this .<> source, expected, [.("expected")] string? expectedExpression = null) { } - } - public class DateTimeIsDaylightSavingTimeAssertion : .<> - { - public DateTimeIsDaylightSavingTimeAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public static class DateTimeOffsetAssertionExtensions - { - public static ._IsInFuture_Assertion IsInFuture(this .<> source) { } - public static ._IsInFutureUtc_Assertion IsInFutureUtc(this .<> source) { } - public static ._IsInPast_Assertion IsInPast(this .<> source) { } - public static ._IsInPastUtc_Assertion IsInPastUtc(this .<> source) { } - public static ._IsLeapYear_Assertion IsLeapYear(this .<> source) { } - public static ._IsNotLeapYear_Assertion IsNotLeapYear(this .<> source) { } - public static ._IsNotToday_Assertion IsNotToday(this .<> source) { } - public static ._IsNotUtc_Assertion IsNotUtc(this .<> source) { } - public static ._IsOnWeekday_Assertion IsOnWeekday(this .<> source) { } - public static ._IsOnWeekend_Assertion IsOnWeekend(this .<> source) { } - public static ._IsToday_Assertion IsToday(this .<> source) { } - public static ._IsUtc_Assertion IsUtc(this .<> source) { } - } - public static class DateTimeOffsetEqualsAssertionExtensions - { - public static . IsEqualTo(this .<> source, expected, [.("expected")] string? expectedExpression = null) { } - } - public sealed class DateTimeOffset_IsInFutureUtc_Assertion : .<> - { - public DateTimeOffset_IsInFutureUtc_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTimeOffset_IsInFuture_Assertion : .<> - { - public DateTimeOffset_IsInFuture_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTimeOffset_IsInPastUtc_Assertion : .<> - { - public DateTimeOffset_IsInPastUtc_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTimeOffset_IsInPast_Assertion : .<> - { - public DateTimeOffset_IsInPast_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTimeOffset_IsLeapYear_Assertion : .<> - { - public DateTimeOffset_IsLeapYear_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTimeOffset_IsNotLeapYear_Assertion : .<> - { - public DateTimeOffset_IsNotLeapYear_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTimeOffset_IsNotToday_Assertion : .<> - { - public DateTimeOffset_IsNotToday_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTimeOffset_IsNotUtc_Assertion : .<> - { - public DateTimeOffset_IsNotUtc_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTimeOffset_IsOnWeekday_Assertion : .<> - { - public DateTimeOffset_IsOnWeekday_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTimeOffset_IsOnWeekend_Assertion : .<> - { - public DateTimeOffset_IsOnWeekend_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTimeOffset_IsToday_Assertion : .<> - { - public DateTimeOffset_IsToday_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTimeOffset_IsUtc_Assertion : .<> - { - public DateTimeOffset_IsUtc_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTime_IsInFutureUtc_Assertion : .<> - { - public DateTime_IsInFutureUtc_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTime_IsInFuture_Assertion : .<> - { - public DateTime_IsInFuture_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTime_IsInPastUtc_Assertion : .<> - { - public DateTime_IsInPastUtc_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTime_IsInPast_Assertion : .<> - { - public DateTime_IsInPast_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTime_IsLeapYear_Assertion : .<> - { - public DateTime_IsLeapYear_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTime_IsNotLeapYear_Assertion : .<> - { - public DateTime_IsNotLeapYear_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTime_IsNotToday_Assertion : .<> - { - public DateTime_IsNotToday_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTime_IsNotUtc_Assertion : .<> - { - public DateTime_IsNotUtc_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTime_IsOnWeekday_Assertion : .<> - { - public DateTime_IsOnWeekday_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTime_IsOnWeekend_Assertion : .<> - { - public DateTime_IsOnWeekend_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTime_IsToday_Assertion : .<> - { - public DateTime_IsToday_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DateTime_IsUtc_Assertion : .<> - { - public DateTime_IsUtc_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public static class DayOfWeekAssertionExtensions - { - public static ._IsFriday_Assertion IsFriday(this .<> source) { } - public static ._IsMonday_Assertion IsMonday(this .<> source) { } - public static ._IsWeekday_Assertion IsWeekday(this .<> source) { } - public static ._IsWeekend_Assertion IsWeekend(this .<> source) { } - } - public sealed class DayOfWeek_IsFriday_Assertion : .<> - { - public DayOfWeek_IsFriday_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DayOfWeek_IsMonday_Assertion : .<> - { - public DayOfWeek_IsMonday_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DayOfWeek_IsWeekday_Assertion : .<> - { - public DayOfWeek_IsWeekday_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DayOfWeek_IsWeekend_Assertion : .<> - { - public DayOfWeek_IsWeekend_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public static class DecimalAssertions - { - public static ._IsNotZero_Assertion IsNotZero(this . source) { } - public static ._IsZero_Assertion IsZero(this . source) { } - } - public static class DecimalEqualsAssertionExtensions - { - public static . IsEqualTo(this . source, decimal expected, [.("expected")] string? expectedExpression = null) { } - } - public static class DecimalIsCloseToAssertionExtensions - { - public static . IsCloseTo(this . source, decimal expected, decimal tolerance, [.("expected")] string? expectedExpression = null, [.("tolerance")] string? toleranceExpression = null) { } - } - public static class DecimalIsWithinPercentOfAssertionExtensions - { - public static . IsWithinPercentOf(this . source, decimal expected, decimal percent, [.("expected")] string? expectedExpression = null, [.("percent")] string? percentExpression = null) { } - } - public sealed class Decimal_IsNotZero_Assertion : . - { - public Decimal_IsNotZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class Decimal_IsZero_Assertion : . - { - public Decimal_IsZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class DictionaryValueSourceCollectionShapeAssertions - { - public static .<., TItem> All(this .<.> source) { } - public static .<., TItem> All(this .<.> source) { } - public static .<., TItem> All(this .<.> source) { } - public static .<., TItem> All(this .<.> source) { } - public static .<., TItem> All(this .<.> source) { } - public static .<., TItem> All(this .<.> source) { } - public static .<., TItem> All(this .<.> source) { } - public static . All(this . source) { } - public static .<., TItem> All(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> All(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> All(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> All(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> All(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> All(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> All(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static . All(this . source, predicate, [.("predicate")] string? expression = null) { } - public static .<., .> All(this .<.> source) - where TKey : notnull { } - public static .<., .> All(this .<.> source) - where TKey : notnull { } - public static .<., .> All(this .<.> source) - where TKey : notnull { } - public static .<., .> All(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> All(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> All(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AllKeys(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AllKeys(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AllKeys(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AllValues(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AllValues(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AllValues(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TItem> Any(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Any(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Any(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Any(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Any(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Any(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Any(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static . Any(this . source, predicate, [.("predicate")] string? expression = null) { } - public static .<., .> Any(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> Any(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> Any(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AnyKey(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AnyKey(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AnyKey(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AnyValue(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AnyValue(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AnyValue(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TItem> Contains(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static . Contains(this . source, predicate, [.("predicate")] string? expression = null) { } - public static . Contains(this . source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static . Contains(this . source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., .> Contains(this .<.> source, . expected, [.("expected")] string? expression = null) - where TKey : notnull { } - public static .<., .> Contains(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> Contains(this .<.> source, . expected, [.("expected")] string? expression = null) - where TKey : notnull { } - public static .<., .> Contains(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> Contains(this .<.> source, . expected, [.("expected")] string? expression = null) - where TKey : notnull { } - public static .<., .> Contains(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> Contains(this .<.> source, . expected, .<.> comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., .> Contains(this .<.> source, . expected, .<.> comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., .> Contains(this .<.> source, . expected, .<.> comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKey(this .<.> source, TKey expectedKey, [.("expectedKey")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKey(this .<.> source, TKey expectedKey, [.("expectedKey")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKey(this .<.> source, TKey expectedKey, [.("expectedKey")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKey(this .<.> source, TKey expectedKey, .? comparer, [.("expectedKey")] string? keyExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKey(this .<.> source, TKey expectedKey, .? comparer, [.("expectedKey")] string? keyExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKey(this .<.> source, TKey expectedKey, .? comparer, [.("expectedKey")] string? keyExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKeyWithValue(this .<.> source, TKey expectedKey, TValue expectedValue, [.("expectedKey")] string? keyExpression = null, [.("expectedValue")] string? valueExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKeyWithValue(this .<.> source, TKey expectedKey, TValue expectedValue, [.("expectedKey")] string? keyExpression = null, [.("expectedValue")] string? valueExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKeyWithValue(this .<.> source, TKey expectedKey, TValue expectedValue, [.("expectedKey")] string? keyExpression = null, [.("expectedValue")] string? valueExpression = null) - where TKey : notnull { } - public static .<., TItem> ContainsOnly(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> ContainsOnly(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> ContainsOnly(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> ContainsOnly(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> ContainsOnly(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> ContainsOnly(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> ContainsOnly(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static . ContainsOnly(this . source, predicate, [.("predicate")] string? expression = null) { } - public static .<., .> ContainsOnly(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> ContainsOnly(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> ContainsOnly(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsValue(this .<.> source, TValue expectedValue, [.("expectedValue")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsValue(this .<.> source, TValue expectedValue, [.("expectedValue")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsValue(this .<.> source, TValue expectedValue, [.("expectedValue")] string? expression = null) - where TKey : notnull { } - public static .<., TItem> Count(this .<.> source) { } - public static .<., TItem> Count(this .<.> source) { } - public static .<., TItem> Count(this .<.> source) { } - public static .<., TItem> Count(this .<.> source) { } - public static .<., TItem> Count(this .<.> source) { } - public static .<., TItem> Count(this .<.> source) { } - public static .<., TItem> Count(this .<.> source) { } - public static . Count(this . source) { } - public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public static . Count(this . source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public static . Count(this . source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public static .<., TKey, TValue> Count(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> Count(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> Count(this .<.> source) - where TKey : notnull { } - public static .<., .> Count(this .<.> source, <.<.>, .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TKey : notnull { } - public static .<., .> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) - where TKey : notnull { } - public static .<., .> Count(this .<.> source, <.<.>, .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TKey : notnull { } - public static .<., .> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) - where TKey : notnull { } - public static .<., .> Count(this .<.> source, <.<.>, .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TKey : notnull { } - public static .<., .> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) - where TKey : notnull { } - public static .<., TItem> DoesNotContain(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static . DoesNotContain(this . source, predicate, [.("predicate")] string? expression = null) { } - public static . DoesNotContain(this . source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static . DoesNotContain(this . source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., .> DoesNotContain(this .<.> source, . expected, [.("expected")] string? expression = null) - where TKey : notnull { } - public static .<., .> DoesNotContain(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> DoesNotContain(this .<.> source, . expected, [.("expected")] string? expression = null) - where TKey : notnull { } - public static .<., .> DoesNotContain(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> DoesNotContain(this .<.> source, . expected, [.("expected")] string? expression = null) - where TKey : notnull { } - public static .<., .> DoesNotContain(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> DoesNotContain(this .<.> source, . expected, .<.> comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., .> DoesNotContain(this .<.> source, . expected, .<.> comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., .> DoesNotContain(this .<.> source, . expected, .<.> comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> DoesNotContainKey(this .<.> source, TKey expectedKey, [.("expectedKey")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> DoesNotContainKey(this .<.> source, TKey expectedKey, [.("expectedKey")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> DoesNotContainKey(this .<.> source, TKey expectedKey, [.("expectedKey")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> DoesNotContainValue(this .<.> source, TValue expectedValue, [.("expectedValue")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> DoesNotContainValue(this .<.> source, TValue expectedValue, [.("expectedValue")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> DoesNotContainValue(this .<.> source, TValue expectedValue, [.("expectedValue")] string? expression = null) - where TKey : notnull { } - public static .<., TItem> DoesNotOverlap(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> DoesNotOverlap(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> DoesNotOverlap(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> FirstItem(this .<.> source) { } - public static .<., TItem> FirstItem(this .<.> source) { } - public static .<., TItem> FirstItem(this .<.> source) { } - public static .<., TItem> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) { } - public static .<., TItem> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) { } - public static .<., TItem> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) { } - public static .<., TItem> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) { } - public static .<., TItem> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) { } - public static .<., TItem> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) { } - public static .<., TItem> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) { } - public static . HasAtLeast(this . source, int minCount, [.("minCount")] string? expression = null) { } - public static .<., TKey, TValue> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) - where TKey : notnull { } - public static .<., TItem> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) { } - public static .<., TItem> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) { } - public static .<., TItem> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) { } - public static .<., TItem> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) { } - public static .<., TItem> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) { } - public static .<., TItem> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) { } - public static .<., TItem> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) { } - public static . HasAtMost(this . source, int maxCount, [.("maxCount")] string? expression = null) { } - public static .<., TKey, TValue> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) - where TKey : notnull { } - public static .<., TItem> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public static .<., TItem> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public static .<., TItem> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public static .<., TItem> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public static .<., TItem> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public static .<., TItem> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public static .<., TItem> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public static . HasCountBetween(this . source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public static .<., TKey, TValue> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) - where TKey : notnull { } - public static .<., TItem> HasDistinctItems(this .<.> source) { } - public static .<., TItem> HasDistinctItems(this .<.> source) { } - public static .<., TItem> HasDistinctItems(this .<.> source) { } - public static .<., TItem> HasDistinctItems(this .<.> source) { } - public static .<., TItem> HasDistinctItems(this .<.> source) { } - public static .<., TItem> HasDistinctItems(this .<.> source) { } - public static .<., TItem> HasDistinctItems(this .<.> source) { } - public static . HasDistinctItems(this . source) { } - public static .<., TItem> HasDistinctItems(this .<.> source, . comparer, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> HasDistinctItems(this .<.> source, . comparer, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> HasDistinctItems(this .<.> source, . comparer, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> HasDistinctItems(this .<.> source, . comparer, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> HasDistinctItems(this .<.> source, . comparer, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> HasDistinctItems(this .<.> source, . comparer, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> HasDistinctItems(this .<.> source, . comparer, [.("comparer")] string? comparerExpression = null) { } - public static . HasDistinctItems(this . source, . comparer, [.("comparer")] string? comparerExpression = null) { } - public static .<., .> HasDistinctItems(this .<.> source) - where TKey : notnull { } - public static .<., .> HasDistinctItems(this .<.> source) - where TKey : notnull { } - public static .<., .> HasDistinctItems(this .<.> source) - where TKey : notnull { } - public static .<., .> HasDistinctItems(this .<.> source, .<.> comparer, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., .> HasDistinctItems(this .<.> source, .<.> comparer, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., .> HasDistinctItems(this .<.> source, .<.> comparer, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., TItem> HasItemAt(this .<.> source, int index, TItem expected, [.("index")] string? indexExpression = null, [.("expected")] string? expectedExpression = null) { } - public static .<., TItem> HasItemAt(this .<.> source, int index, TItem expected, [.("index")] string? indexExpression = null, [.("expected")] string? expectedExpression = null) { } - public static .<., TItem> HasItemAt(this .<.> source, int index, TItem expected, .? comparer = null, [.("index")] string? indexExpression = null, [.("expected")] string? expectedExpression = null) { } - public static .<., TItem> HasSingleItem(this .<.> source) { } - public static .<., TItem> HasSingleItem(this .<.> source) { } - public static .<., TItem> HasSingleItem(this .<.> source) { } - public static .<., TItem> HasSingleItem(this .<.> source) { } - public static .<., TItem> HasSingleItem(this .<.> source) { } - public static .<., TItem> HasSingleItem(this .<.> source) { } - public static .<., TItem> HasSingleItem(this .<.> source) { } - public static . HasSingleItem(this . source) { } - public static .<., TItem> HasSingleItem(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> HasSingleItem(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> HasSingleItem(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> HasSingleItem(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> HasSingleItem(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> HasSingleItem(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> HasSingleItem(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static . HasSingleItem(this . source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TKey, TValue> HasSingleItem(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> HasSingleItem(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> HasSingleItem(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> HasSingleItem(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> HasSingleItem(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> HasSingleItem(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TItem> IsEmpty(this .<.> source) { } - public static .<., TItem> IsEmpty(this .<.> source) { } - public static .<., TItem> IsEmpty(this .<.> source) { } - public static .<., TItem> IsEmpty(this .<.> source) { } - public static .<., TItem> IsEmpty(this .<.> source) { } - public static .<., TItem> IsEmpty(this .<.> source) { } - public static .<., TItem> IsEmpty(this .<.> source) { } - public static . IsEmpty(this . source) { } - public static .<., TKey, TValue> IsEmpty(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> IsEmpty(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> IsEmpty(this .<.> source) - where TKey : notnull { } - public static .<., TItem> IsInDescendingOrder(this .<.> source) { } - public static .<., TItem> IsInDescendingOrder(this .<.> source) { } - public static .<., TItem> IsInDescendingOrder(this .<.> source) { } - public static .<., TItem> IsInDescendingOrder(this .<.> source) { } - public static .<., TItem> IsInDescendingOrder(this .<.> source) { } - public static .<., TItem> IsInDescendingOrder(this .<.> source) { } - public static .<., TItem> IsInDescendingOrder(this .<.> source) { } - public static . IsInDescendingOrder(this . source) { } - public static .<., .> IsInDescendingOrder(this .<.> source) - where TKey : notnull { } - public static .<., .> IsInDescendingOrder(this .<.> source) - where TKey : notnull { } - public static .<., .> IsInDescendingOrder(this .<.> source) - where TKey : notnull { } - public static .<., TItem> IsInOrder(this .<.> source) { } - public static .<., TItem> IsInOrder(this .<.> source) { } - public static .<., TItem> IsInOrder(this .<.> source) { } - public static .<., TItem> IsInOrder(this .<.> source) { } - public static .<., TItem> IsInOrder(this .<.> source) { } - public static .<., TItem> IsInOrder(this .<.> source) { } - public static .<., TItem> IsInOrder(this .<.> source) { } - public static . IsInOrder(this . source) { } - public static .<., .> IsInOrder(this .<.> source) - where TKey : notnull { } - public static .<., .> IsInOrder(this .<.> source) - where TKey : notnull { } - public static .<., .> IsInOrder(this .<.> source) - where TKey : notnull { } - public static .<., TItem> IsNotEmpty(this .<.> source) { } - public static .<., TItem> IsNotEmpty(this .<.> source) { } - public static .<., TItem> IsNotEmpty(this .<.> source) { } - public static .<., TItem> IsNotEmpty(this .<.> source) { } - public static .<., TItem> IsNotEmpty(this .<.> source) { } - public static .<., TItem> IsNotEmpty(this .<.> source) { } - public static .<., TItem> IsNotEmpty(this .<.> source) { } - public static . IsNotEmpty(this . source) { } - public static .<., TKey, TValue> IsNotEmpty(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> IsNotEmpty(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> IsNotEmpty(this .<.> source) - where TKey : notnull { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static . IsOrderedBy(this . source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static . IsOrderedBy(this . source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static . IsOrderedByDescending(this . source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static . IsOrderedByDescending(this . source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> IsProperSubsetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsProperSubsetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsProperSubsetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsProperSupersetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsProperSupersetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsProperSupersetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsSubsetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsSubsetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsSubsetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsSupersetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsSupersetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsSupersetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> ItemAt(this .<.> source, int index, [.("index")] string? expression = null) { } - public static .<., TItem> ItemAt(this .<.> source, int index, [.("index")] string? indexExpression = null) { } - public static .<., TItem> ItemAt(this .<.> source, int index, [.("index")] string? expression = null) { } - public static .<., TItem> LastItem(this .<.> source) { } - public static .<., TItem> LastItem(this .<.> source) { } - public static .<., TItem> LastItem(this .<.> source) { } - public static .<., TItem> Overlaps(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> Overlaps(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> Overlaps(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> SetEquals(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> SetEquals(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> SetEquals(this .<.> source, . other, [.("other")] string? expression = null) { } - } - public static class DirectoryHasFilesAssertionExtensions - { - public static . HasFiles(this .<.DirectoryInfo> source) { } - } - public static class DirectoryHasNoSubdirectoriesAssertionExtensions - { - public static . HasNoSubdirectories(this .<.DirectoryInfo> source) { } - } - public static class DirectoryInfoAssertionExtensions - { - public static . DoesNotExist(this .<.DirectoryInfo> source) { } - public static . Exists(this .<.DirectoryInfo> source) { } - public static ._IsEmpty_Assertion IsEmpty(this .<.DirectoryInfo> source) { } - public static ._IsHidden_Assertion IsHidden(this .<.DirectoryInfo> source) { } - public static ._IsNotEmpty_Assertion IsNotEmpty(this .<.DirectoryInfo> source) { } - public static ._IsNotHidden_Assertion IsNotHidden(this .<.DirectoryInfo> source) { } - public static ._IsNotRoot_Assertion IsNotRoot(this .<.DirectoryInfo> source) { } - public static ._IsRoot_Assertion IsRoot(this .<.DirectoryInfo> source) { } - public static ._IsSystemDirectory_Assertion IsSystemDirectory(this .<.DirectoryInfo> source) { } - } - public class DirectoryInfoExistsAssertion : .<.DirectoryInfo> - { - public DirectoryInfoExistsAssertion(.<.DirectoryInfo> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.DirectoryInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DirectoryInfo_HasSameStructureAs_DirectoryInfo_Assertion : .<.DirectoryInfo> - { - public DirectoryInfo_HasSameStructureAs_DirectoryInfo_Assertion(.<.DirectoryInfo> context, .DirectoryInfo expected) { } - protected override .<.> CheckAsync(.<.DirectoryInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DirectoryInfo_IsEmpty_Assertion : .<.DirectoryInfo> - { - public DirectoryInfo_IsEmpty_Assertion(.<.DirectoryInfo> context) { } - protected override .<.> CheckAsync(.<.DirectoryInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DirectoryInfo_IsEquivalentTo_DirectoryInfo_Assertion : .<.DirectoryInfo> - { - public DirectoryInfo_IsEquivalentTo_DirectoryInfo_Assertion(.<.DirectoryInfo> context, .DirectoryInfo expected) { } - protected override .<.> CheckAsync(.<.DirectoryInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DirectoryInfo_IsHidden_Assertion : .<.DirectoryInfo> - { - public DirectoryInfo_IsHidden_Assertion(.<.DirectoryInfo> context) { } - protected override .<.> CheckAsync(.<.DirectoryInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DirectoryInfo_IsNotEmpty_Assertion : .<.DirectoryInfo> - { - public DirectoryInfo_IsNotEmpty_Assertion(.<.DirectoryInfo> context) { } - protected override .<.> CheckAsync(.<.DirectoryInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DirectoryInfo_IsNotEquivalentTo_DirectoryInfo_Assertion : .<.DirectoryInfo> - { - public DirectoryInfo_IsNotEquivalentTo_DirectoryInfo_Assertion(.<.DirectoryInfo> context, .DirectoryInfo expected) { } - protected override .<.> CheckAsync(.<.DirectoryInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DirectoryInfo_IsNotHidden_Assertion : .<.DirectoryInfo> - { - public DirectoryInfo_IsNotHidden_Assertion(.<.DirectoryInfo> context) { } - protected override .<.> CheckAsync(.<.DirectoryInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DirectoryInfo_IsNotRoot_Assertion : .<.DirectoryInfo> - { - public DirectoryInfo_IsNotRoot_Assertion(.<.DirectoryInfo> context) { } - protected override .<.> CheckAsync(.<.DirectoryInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DirectoryInfo_IsRoot_Assertion : .<.DirectoryInfo> - { - public DirectoryInfo_IsRoot_Assertion(.<.DirectoryInfo> context) { } - protected override .<.> CheckAsync(.<.DirectoryInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class DirectoryInfo_IsSystemDirectory_Assertion : .<.DirectoryInfo> - { - public DirectoryInfo_IsSystemDirectory_Assertion(.<.DirectoryInfo> context) { } - protected override .<.> CheckAsync(.<.DirectoryInfo> metadata) { } - protected override string GetExpectation() { } - } - public static class DoubleAssertionExtensions - { - public static . IsFinite(this . source) { } - public static . IsInfinity(this . source) { } - public static . IsNaN(this . source) { } - public static . IsNegativeInfinity(this . source) { } - public static . IsNormal(this . source) { } - public static . IsNotFinite(this . source) { } - public static . IsNotInfinity(this . source) { } - public static . IsNotNaN(this . source) { } - public static . IsNotNegativeInfinity(this . source) { } - public static . IsNotNormal(this . source) { } - public static . IsNotPositiveInfinity(this . source) { } - public static . IsNotSubnormal(this . source) { } - public static . IsPositiveInfinity(this . source) { } - public static . IsSubnormal(this . source) { } - } - public static class DoubleAssertions - { - public static ._IsNotZero_Assertion IsNotZero(this . source) { } - public static ._IsZero_Assertion IsZero(this . source) { } - } - public static class DoubleEqualsAssertionExtensions - { - public static . IsEqualTo(this . source, double expected, [.("expected")] string? expectedExpression = null) { } - } - public static class DoubleIsCloseToAssertionExtensions - { - public static . IsCloseTo(this . source, double expected, double tolerance, [.("expected")] string? expectedExpression = null, [.("tolerance")] string? toleranceExpression = null) { } - } - public class DoubleIsFiniteWithDoubleAssertion : . - { - public DoubleIsFiniteWithDoubleAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class DoubleIsInfinityWithDoubleAssertion : . - { - public DoubleIsInfinityWithDoubleAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class DoubleIsNaNWithDoubleAssertion : . - { - public DoubleIsNaNWithDoubleAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class DoubleIsNegativeInfinityWithDoubleAssertion : . - { - public DoubleIsNegativeInfinityWithDoubleAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class DoubleIsNormalWithDoubleAssertion : . - { - public DoubleIsNormalWithDoubleAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class DoubleIsPositiveInfinityWithDoubleAssertion : . - { - public DoubleIsPositiveInfinityWithDoubleAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class DoubleIsSubnormalWithDoubleAssertion : . - { - public DoubleIsSubnormalWithDoubleAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class DoubleIsWithinPercentOfAssertionExtensions - { - public static . IsWithinPercentOf(this . source, double expected, double percent, [.("expected")] string? expectedExpression = null, [.("percent")] string? percentExpression = null) { } - } - public sealed class Double_IsNotZero_Assertion : . - { - public Double_IsNotZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class Double_IsZero_Assertion : . - { - public Double_IsZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class EncodingAssertionExtensions - { - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsASCII_Assertion IsASCII(this . source) - where TActual : .Encoding { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsBigEndianUnicode_Assertion IsBigEndianUnicode(this . source) - where TActual : .Encoding { } - public static . IsNotSingleByte(this .<.Encoding> source) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsNotUTF8_Assertion IsNotUTF8(this . source) - where TActual : .Encoding { } - public static . IsSingleByte(this .<.Encoding> source) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsUTF32_Assertion IsUTF32(this . source) - where TActual : .Encoding { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsUTF8_Assertion IsUTF8(this . source) - where TActual : .Encoding { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsUnicode_Assertion IsUnicode(this . source) - where TActual : .Encoding { } - } - public class EncodingIsSingleByteAssertion : .<.Encoding> - { - public EncodingIsSingleByteAssertion(.<.Encoding> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Encoding> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Encoding_IsASCII_Assertion : .<.Encoding> - { - public Encoding_IsASCII_Assertion(.<.Encoding> context) { } - protected override .<.> CheckAsync(.<.Encoding> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Encoding_IsBigEndianUnicode_Assertion : .<.Encoding> - { - public Encoding_IsBigEndianUnicode_Assertion(.<.Encoding> context) { } - protected override .<.> CheckAsync(.<.Encoding> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Encoding_IsNotUTF8_Assertion : .<.Encoding> - { - public Encoding_IsNotUTF8_Assertion(.<.Encoding> context) { } - protected override .<.> CheckAsync(.<.Encoding> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Encoding_IsUTF32_Assertion : .<.Encoding> - { - public Encoding_IsUTF32_Assertion(.<.Encoding> context) { } - protected override .<.> CheckAsync(.<.Encoding> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Encoding_IsUTF8_Assertion : .<.Encoding> - { - public Encoding_IsUTF8_Assertion(.<.Encoding> context) { } - protected override .<.> CheckAsync(.<.Encoding> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Encoding_IsUnicode_Assertion : .<.Encoding> - { - public Encoding_IsUnicode_Assertion(.<.Encoding> context) { } - protected override .<.> CheckAsync(.<.Encoding> metadata) { } - protected override string GetExpectation() { } - } - public static class EnumAssertionExtensions - { - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._DoesNotHaveFlag_TEnum_Assertion DoesNotHaveFlag(this . source, TEnum unexpectedFlag, [.("unexpectedFlag")] string? unexpectedFlagExpression = null) - where TEnum : struct, { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._DoesNotHaveSameNameAs_Enum_Assertion DoesNotHaveSameNameAs(this . source, otherEnumValue, [.("otherEnumValue")] string? otherEnumValueExpression = null) - where TEnum : struct, { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._DoesNotHaveSameValueAs_Enum_Assertion DoesNotHaveSameValueAs(this . source, otherEnumValue, [.("otherEnumValue")] string? otherEnumValueExpression = null) - where TEnum : struct, { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasFlag_TEnum_Assertion HasFlag(this . source, TEnum expectedFlag, [.("expectedFlag")] string? expectedFlagExpression = null) - where TEnum : struct, { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasSameNameAs_Enum_Assertion HasSameNameAs(this . source, otherEnumValue, [.("otherEnumValue")] string? otherEnumValueExpression = null) - where TEnum : struct, { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasSameValueAs_Enum_Assertion HasSameValueAs(this . source, otherEnumValue, [.("otherEnumValue")] string? otherEnumValueExpression = null) - where TEnum : struct, { } - } - public static class EqualsAssertionExtensions - { - public static . IsEqualTo(this . source, TValue? expected, [.("expected")] string? expectedExpression = null) { } - public static . IsEqualTo(this . source, TValue? expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - [.("Looks up implicit conversion operators via reflection. Trimming may remove user-d" + - "efined operators.")] - public static . IsEqualTo(this . source, TOther? expected, [.("expected")] string? expectedExpression = null, params .[] _) { } - } - public static class EquatableAssertionExtensions - { - public static . IsEquatableTo(this . source, TExpected expected, [.("expected")] string? expectedExpression = null) - where TActual : { } - } - public static class ExceptionAssertionExtensions - { - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasHelpLink_Assertion HasHelpLink(this . source) - where TActual : { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasInnerException_Assertion HasInnerException(this . source) - where TActual : { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasNoData_Assertion HasNoData(this . source) - where TActual : { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasNoHelpLink_Assertion HasNoHelpLink(this . source) - where TActual : { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasNoInnerException_Assertion HasNoInnerException(this . source) - where TActual : { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasNoSource_Assertion HasNoSource(this . source) - where TActual : { } - [.(" uses reflection which may be trimmed in AOT scenarios")] - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasNoTargetSite_Assertion HasNoTargetSite(this . source) - where TActual : { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasSource_Assertion HasSource(this . source) - where TActual : { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasStackTrace_Assertion HasStackTrace(this . source) - where TActual : { } - [.(" uses reflection which may be trimmed in AOT scenarios")] - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasTargetSite_Assertion HasTargetSite(this . source) - where TActual : { } - } - public sealed class Exception_HasHelpLink_Assertion : .<> - { - public Exception_HasHelpLink_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Exception_HasInnerException_Assertion : .<> - { - public Exception_HasInnerException_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Exception_HasNoData_Assertion : .<> - { - public Exception_HasNoData_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Exception_HasNoHelpLink_Assertion : .<> - { - public Exception_HasNoHelpLink_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Exception_HasNoInnerException_Assertion : .<> - { - public Exception_HasNoInnerException_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Exception_HasNoSource_Assertion : .<> - { - public Exception_HasNoSource_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Exception_HasNoTargetSite_Assertion : .<> - { - public Exception_HasNoTargetSite_Assertion(.<> context) { } - [.("Trimming", "IL2026", Justification="Caller is already warned via RequiresUnreferencedCode on extension method")] - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Exception_HasSource_Assertion : .<> - { - public Exception_HasSource_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Exception_HasStackTrace_Assertion : .<> - { - public Exception_HasStackTrace_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Exception_HasTargetSite_Assertion : .<> - { - public Exception_HasTargetSite_Assertion(.<> context) { } - [.("Trimming", "IL2026", Justification="Caller is already warned via RequiresUnreferencedCode on extension method")] - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public static class FileInfoAssertionExtensions - { - public static . DoesNotExist(this .<.FileInfo> source) { } - public static . Exists(this .<.FileInfo> source) { } - public static ._HasExtension_Assertion HasExtension(this .<.FileInfo> source) { } - public static ._HasNoExtension_Assertion HasNoExtension(this .<.FileInfo> source) { } - public static ._IsArchived_Assertion IsArchived(this .<.FileInfo> source) { } - public static ._IsEmpty_Assertion IsEmpty(this .<.FileInfo> source) { } - public static ._IsHidden_Assertion IsHidden(this .<.FileInfo> source) { } - public static ._IsNotEmpty_Assertion IsNotEmpty(this .<.FileInfo> source) { } - public static ._IsNotHidden_Assertion IsNotHidden(this .<.FileInfo> source) { } - public static . IsNotReadOnly(this .<.FileInfo> source) { } - public static . IsReadOnly(this .<.FileInfo> source) { } - public static ._IsSystemFile_Assertion IsSystemFile(this .<.FileInfo> source) { } - } - public class FileInfoExistsAssertion : .<.FileInfo> - { - public FileInfoExistsAssertion(.<.FileInfo> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.FileInfo> metadata) { } - protected override string GetExpectation() { } - } - public class FileInfoIsReadOnlyAssertion : .<.FileInfo> - { - public FileInfoIsReadOnlyAssertion(.<.FileInfo> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.FileInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class FileInfo_DoesNotHaveSameContentAs_FileInfo_Assertion : .<.FileInfo> - { - public FileInfo_DoesNotHaveSameContentAs_FileInfo_Assertion(.<.FileInfo> context, .FileInfo expected) { } - protected override .<.> CheckAsync(.<.FileInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class FileInfo_HasExtension_Assertion : .<.FileInfo> - { - public FileInfo_HasExtension_Assertion(.<.FileInfo> context) { } - protected override .<.> CheckAsync(.<.FileInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class FileInfo_HasNoExtension_Assertion : .<.FileInfo> - { - public FileInfo_HasNoExtension_Assertion(.<.FileInfo> context) { } - protected override .<.> CheckAsync(.<.FileInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class FileInfo_HasSameContentAs_FileInfo_Assertion : .<.FileInfo> - { - public FileInfo_HasSameContentAs_FileInfo_Assertion(.<.FileInfo> context, .FileInfo expected) { } - protected override .<.> CheckAsync(.<.FileInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class FileInfo_IsArchived_Assertion : .<.FileInfo> - { - public FileInfo_IsArchived_Assertion(.<.FileInfo> context) { } - protected override .<.> CheckAsync(.<.FileInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class FileInfo_IsEmpty_Assertion : .<.FileInfo> - { - public FileInfo_IsEmpty_Assertion(.<.FileInfo> context) { } - protected override .<.> CheckAsync(.<.FileInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class FileInfo_IsHidden_Assertion : .<.FileInfo> - { - public FileInfo_IsHidden_Assertion(.<.FileInfo> context) { } - protected override .<.> CheckAsync(.<.FileInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class FileInfo_IsNotEmpty_Assertion : .<.FileInfo> - { - public FileInfo_IsNotEmpty_Assertion(.<.FileInfo> context) { } - protected override .<.> CheckAsync(.<.FileInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class FileInfo_IsNotHidden_Assertion : .<.FileInfo> - { - public FileInfo_IsNotHidden_Assertion(.<.FileInfo> context) { } - protected override .<.> CheckAsync(.<.FileInfo> metadata) { } - protected override string GetExpectation() { } - } - public sealed class FileInfo_IsSystemFile_Assertion : .<.FileInfo> - { - public FileInfo_IsSystemFile_Assertion(.<.FileInfo> context) { } - protected override .<.> CheckAsync(.<.FileInfo> metadata) { } - protected override string GetExpectation() { } - } - public static class FileIsNotExecutableAssertionExtensions - { - public static . IsNotExecutable(this .<.FileInfo> source) { } - } - public static class FileIsNotSystemAssertionExtensions - { - public static . IsNotSystem(this .<.FileInfo> source) { } - } - public static class FileSystemComparisonAssertions - { - public static ._DoesNotHaveSameContentAs_FileInfo_Assertion DoesNotHaveSameContentAs(this .<.FileInfo> source, .FileInfo expected, [.("expected")] string? expectedExpression = null) { } - public static ._HasSameContentAs_FileInfo_Assertion HasSameContentAs(this .<.FileInfo> source, .FileInfo expected, [.("expected")] string? expectedExpression = null) { } - public static ._HasSameStructureAs_DirectoryInfo_Assertion HasSameStructureAs(this .<.DirectoryInfo> source, .DirectoryInfo expected, [.("expected")] string? expectedExpression = null) { } - public static ._IsEquivalentTo_DirectoryInfo_Assertion IsEquivalentTo(this .<.DirectoryInfo> source, .DirectoryInfo expected, [.("expected")] string? expectedExpression = null) { } - public static ._IsNotEquivalentTo_DirectoryInfo_Assertion IsNotEquivalentTo(this .<.DirectoryInfo> source, .DirectoryInfo expected, [.("expected")] string? expectedExpression = null) { } - } - public static class FloatAssertions - { - public static ._IsNotZero_Assertion IsNotZero(this . source) { } - public static ._IsZero_Assertion IsZero(this . source) { } - } - public static class FloatEqualsAssertionExtensions - { - public static . IsEqualTo(this . source, float expected, [.("expected")] string? expectedExpression = null) { } - } - public static class FloatIsCloseToAssertionExtensions - { - public static . IsCloseTo(this . source, float expected, float tolerance, [.("expected")] string? expectedExpression = null, [.("tolerance")] string? toleranceExpression = null) { } - } - public class FloatIsFiniteWithFloatAssertion : . - { - public FloatIsFiniteWithFloatAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class FloatIsInfinityWithFloatAssertion : . - { - public FloatIsInfinityWithFloatAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class FloatIsNaNWithFloatAssertion : . - { - public FloatIsNaNWithFloatAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class FloatIsNegativeInfinityWithFloatAssertion : . - { - public FloatIsNegativeInfinityWithFloatAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class FloatIsNormalWithFloatAssertion : . - { - public FloatIsNormalWithFloatAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class FloatIsPositiveInfinityWithFloatAssertion : . - { - public FloatIsPositiveInfinityWithFloatAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class FloatIsSubnormalWithFloatAssertion : . - { - public FloatIsSubnormalWithFloatAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class FloatIsWithinPercentOfAssertionExtensions - { - public static . IsWithinPercentOf(this . source, float expected, float percent, [.("expected")] string? expectedExpression = null, [.("percent")] string? percentExpression = null) { } - } - public sealed class Float_IsNotZero_Assertion : . - { - public Float_IsNotZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class Float_IsZero_Assertion : . - { - public Float_IsZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class GenericAssertions - { - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static .Extensions.T_IsIn_TArray_Assertion IsIn(this . source, params T[] collection) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static .Extensions.T_IsIn_IEnumerableT_Assertion IsIn(this . source, . collection, [.("collection")] string? collectionExpression = null) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static .Extensions.T_IsNotIn_TArray_Assertion IsNotIn(this . source, params T[] collection) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static .Extensions.T_IsNotIn_IEnumerableT_Assertion IsNotIn(this . source, . collection, [.("collection")] string? collectionExpression = null) { } - } - public static class GuidAssertionExtensions - { - public static ._IsEmptyGuid_Assertion IsEmptyGuid(this .<> source) { } - public static ._IsNotEmptyGuid_Assertion IsNotEmptyGuid(this .<> source) { } - } - public sealed class Guid_IsEmptyGuid_Assertion : .<> - { - public Guid_IsEmptyGuid_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Guid_IsNotEmptyGuid_Assertion : .<> - { - public Guid_IsNotEmptyGuid_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public static class HasSingleItemAssertionExtensions - { - public static . HasSingleItem(this . source) - where TCollection : . { } - } - public static class HasSingleItemPredicateAssertionExtensions - { - public static . HasSingleItem(this . source, predicate, string predicateDescription, [.("predicate")] string? predicateExpression = null, [.("predicateDescription")] string? predicateDescriptionExpression = null) - where TCollection : . { } - } - public static class HttpResponseMessageAssertionExtensions - { - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasContentType_String_Assertion HasContentType(this . source, string contentType, [.("contentType")] string? contentTypeExpression = null) - where TActual : . { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasHeader_String_Assertion HasHeader(this . source, string headerName, [.("headerName")] string? headerNameExpression = null) - where TActual : . { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasJsonContent_Assertion HasJsonContent(this . source) - where TActual : . { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasStatusCode_HttpStatusCode_Assertion HasStatusCode(this . source, .HttpStatusCode statusCode, [.("statusCode")] string? statusCodeExpression = null) - where TActual : . { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsBadRequest_Assertion IsBadRequest(this . source) - where TActual : . { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsClientErrorStatusCode_Assertion IsClientErrorStatusCode(this . source) - where TActual : . { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsConflict_Assertion IsConflict(this . source) - where TActual : . { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsCreated_Assertion IsCreated(this . source) - where TActual : . { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsForbidden_Assertion IsForbidden(this . source) - where TActual : . { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsNoContent_Assertion IsNoContent(this . source) - where TActual : . { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsNotFound_Assertion IsNotFound(this . source) - where TActual : . { } - public static . IsNotSuccessStatusCode(this .<.> source) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsOk_Assertion IsOk(this . source) - where TActual : . { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsRedirectStatusCode_Assertion IsRedirectStatusCode(this . source) - where TActual : . { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsServerErrorStatusCode_Assertion IsServerErrorStatusCode(this . source) - where TActual : . { } - public static . IsSuccessStatusCode(this .<.> source) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsUnauthorized_Assertion IsUnauthorized(this . source) - where TActual : . { } - } - public class HttpResponseMessageIsSuccessStatusCodeAssertion : .<.> - { - public HttpResponseMessageIsSuccessStatusCodeAssertion(.<.> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpResponseMessage_HasContentType_String_Assertion : .<.> - { - public HttpResponseMessage_HasContentType_String_Assertion(.<.> context, string contentType) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpResponseMessage_HasHeader_String_Assertion : .<.> - { - public HttpResponseMessage_HasHeader_String_Assertion(.<.> context, string headerName) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpResponseMessage_HasJsonContent_Assertion : .<.> - { - public HttpResponseMessage_HasJsonContent_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpResponseMessage_HasStatusCode_HttpStatusCode_Assertion : .<.> - { - public HttpResponseMessage_HasStatusCode_HttpStatusCode_Assertion(.<.> context, .HttpStatusCode statusCode) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpResponseMessage_IsBadRequest_Assertion : .<.> - { - public HttpResponseMessage_IsBadRequest_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpResponseMessage_IsClientErrorStatusCode_Assertion : .<.> - { - public HttpResponseMessage_IsClientErrorStatusCode_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpResponseMessage_IsConflict_Assertion : .<.> - { - public HttpResponseMessage_IsConflict_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpResponseMessage_IsCreated_Assertion : .<.> - { - public HttpResponseMessage_IsCreated_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpResponseMessage_IsForbidden_Assertion : .<.> - { - public HttpResponseMessage_IsForbidden_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpResponseMessage_IsNoContent_Assertion : .<.> - { - public HttpResponseMessage_IsNoContent_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpResponseMessage_IsNotFound_Assertion : .<.> - { - public HttpResponseMessage_IsNotFound_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpResponseMessage_IsOk_Assertion : .<.> - { - public HttpResponseMessage_IsOk_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpResponseMessage_IsRedirectStatusCode_Assertion : .<.> - { - public HttpResponseMessage_IsRedirectStatusCode_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpResponseMessage_IsServerErrorStatusCode_Assertion : .<.> - { - public HttpResponseMessage_IsServerErrorStatusCode_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpResponseMessage_IsUnauthorized_Assertion : .<.> - { - public HttpResponseMessage_IsUnauthorized_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public static class HttpStatusCodeAssertionExtensions - { - public static ._IsClientError_Assertion IsClientError(this .<.HttpStatusCode> source) { } - public static ._IsError_Assertion IsError(this .<.HttpStatusCode> source) { } - public static ._IsInformational_Assertion IsInformational(this .<.HttpStatusCode> source) { } - public static ._IsNotSuccess_Assertion IsNotSuccess(this .<.HttpStatusCode> source) { } - public static ._IsRedirection_Assertion IsRedirection(this .<.HttpStatusCode> source) { } - public static ._IsServerError_Assertion IsServerError(this .<.HttpStatusCode> source) { } - public static ._IsSuccess_Assertion IsSuccess(this .<.HttpStatusCode> source) { } - } - public sealed class HttpStatusCode_IsClientError_Assertion : .<.HttpStatusCode> - { - public HttpStatusCode_IsClientError_Assertion(.<.HttpStatusCode> context) { } - protected override .<.> CheckAsync(.<.HttpStatusCode> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpStatusCode_IsError_Assertion : .<.HttpStatusCode> - { - public HttpStatusCode_IsError_Assertion(.<.HttpStatusCode> context) { } - protected override .<.> CheckAsync(.<.HttpStatusCode> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpStatusCode_IsInformational_Assertion : .<.HttpStatusCode> - { - public HttpStatusCode_IsInformational_Assertion(.<.HttpStatusCode> context) { } - protected override .<.> CheckAsync(.<.HttpStatusCode> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpStatusCode_IsNotSuccess_Assertion : .<.HttpStatusCode> - { - public HttpStatusCode_IsNotSuccess_Assertion(.<.HttpStatusCode> context) { } - protected override .<.> CheckAsync(.<.HttpStatusCode> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpStatusCode_IsRedirection_Assertion : .<.HttpStatusCode> - { - public HttpStatusCode_IsRedirection_Assertion(.<.HttpStatusCode> context) { } - protected override .<.> CheckAsync(.<.HttpStatusCode> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpStatusCode_IsServerError_Assertion : .<.HttpStatusCode> - { - public HttpStatusCode_IsServerError_Assertion(.<.HttpStatusCode> context) { } - protected override .<.> CheckAsync(.<.HttpStatusCode> metadata) { } - protected override string GetExpectation() { } - } - public sealed class HttpStatusCode_IsSuccess_Assertion : .<.HttpStatusCode> - { - public HttpStatusCode_IsSuccess_Assertion(.<.HttpStatusCode> context) { } - protected override .<.> CheckAsync(.<.HttpStatusCode> metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class IEnumerableT_IsNotSingleElement_Assertion : .<.> - { - public IEnumerableT_IsNotSingleElement_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class IEnumerableT_IsSingleElement_Assertion : .<.> - { - public IEnumerableT_IsSingleElement_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public static class IPAddressAssertionExtensions - { - public static .4MappedToIPv6Assertion IsIPv4MappedToIPv6(this .<.IPAddress> source) { } - public static .6LinkLocalAssertion IsIPv6LinkLocal(this .<.IPAddress> source) { } - public static .6MulticastAssertion IsIPv6Multicast(this .<.IPAddress> source) { } - public static .6SiteLocalAssertion IsIPv6SiteLocal(this .<.IPAddress> source) { } - public static .6TeredoAssertion IsIPv6Teredo(this .<.IPAddress> source) { } - public static .4MappedToIPv6Assertion IsNotIPv4MappedToIPv6(this .<.IPAddress> source) { } - public static .6LinkLocalAssertion IsNotIPv6LinkLocal(this .<.IPAddress> source) { } - public static .6MulticastAssertion IsNotIPv6Multicast(this .<.IPAddress> source) { } - public static .6SiteLocalAssertion IsNotIPv6SiteLocal(this .<.IPAddress> source) { } - public static .6TeredoAssertion IsNotIPv6Teredo(this .<.IPAddress> source) { } - } - public class IPAddressIsIPv4MappedToIPv6Assertion : .<.IPAddress> - { - public IPAddressIsIPv4MappedToIPv6Assertion(.<.IPAddress> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.IPAddress> metadata) { } - protected override string GetExpectation() { } - } - public class IPAddressIsIPv6LinkLocalAssertion : .<.IPAddress> - { - public IPAddressIsIPv6LinkLocalAssertion(.<.IPAddress> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.IPAddress> metadata) { } - protected override string GetExpectation() { } - } - public class IPAddressIsIPv6MulticastAssertion : .<.IPAddress> - { - public IPAddressIsIPv6MulticastAssertion(.<.IPAddress> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.IPAddress> metadata) { } - protected override string GetExpectation() { } - } - public class IPAddressIsIPv6SiteLocalAssertion : .<.IPAddress> - { - public IPAddressIsIPv6SiteLocalAssertion(.<.IPAddress> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.IPAddress> metadata) { } - protected override string GetExpectation() { } - } - public class IPAddressIsIPv6TeredoAssertion : .<.IPAddress> - { - public IPAddressIsIPv6TeredoAssertion(.<.IPAddress> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.IPAddress> metadata) { } - protected override string GetExpectation() { } - } - public static class IndexAssertionExtensions - { - public static . IsFromEnd(this .<> source) { } - public static . IsNotFromEnd(this .<> source) { } - } - public class IndexIsFromEndAssertion : .<> - { - public IndexIsFromEndAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Int16_IsEven_Assertion : . - { - public Int16_IsEven_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class Int16_IsNotZero_Assertion : . - { - public Int16_IsNotZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class Int16_IsOdd_Assertion : . - { - public Int16_IsOdd_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class Int16_IsZero_Assertion : . - { - public Int16_IsZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class IntAssertions - { - public static ._IsEven_Assertion IsEven(this . source) { } - public static ._IsNotZero_Assertion IsNotZero(this . source) { } - public static ._IsOdd_Assertion IsOdd(this . source) { } - public static ._IsZero_Assertion IsZero(this . source) { } - } - public static class IntEqualsAssertionExtensions - { - public static . IsEqualTo(this . source, int expected, [.("expected")] string? expectedExpression = null) { } - } - public static class IntIsCloseToAssertionExtensions - { - public static . IsCloseTo(this . source, int expected, int tolerance, [.("expected")] string? expectedExpression = null, [.("tolerance")] string? toleranceExpression = null) { } - } - public static class IntIsWithinPercentOfAssertionExtensions - { - public static . IsWithinPercentOf(this . source, int expected, double percent, [.("expected")] string? expectedExpression = null, [.("percent")] string? percentExpression = null) { } - } - public sealed class Int_IsEven_Assertion : . - { - public Int_IsEven_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class Int_IsNotZero_Assertion : . - { - public Int_IsNotZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class Int_IsOdd_Assertion : . - { - public Int_IsOdd_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class Int_IsZero_Assertion : . - { - public Int_IsZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class IsDefaultAssertionExtensions - { - public static . IsDefault(this . source) - where TValue : struct { } - } - public static class IsDefaultNullableAssertionExtensions - { - public static . IsDefault(this . source) - where TValue : struct { } - } - public static class IsDefaultReferenceAssertionExtensions - { - public static . IsDefault(this . source) - where TValue : class { } - } - public static class IsEquatableOrEqualToAssertionExtensions - { - public static . IsEquatableOrEqualTo(this . source, TValue expected, [.("expected")] string? expectedExpression = null) { } - } - public static class IsEquivalentToAssertionExtensions - { - [.("Collection equivalency uses structural comparison for complex objects, which requ" + - "ires reflection and is not compatible with AOT")] - public static . IsEquivalentTo(this . source, . expected, . ordering = 0, [.("expected")] string? expectedExpression = null, [.("ordering")] string? orderingExpression = null) - where TCollection : . { } - public static . IsEquivalentTo(this . source, . expected, . comparer, . ordering = 0, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null, [.("ordering")] string? orderingExpression = null) - where TCollection : . { } - } - public static class IsNotDefaultAssertionExtensions - { - public static . IsNotDefault(this . source) - where TValue : struct { } - } - public static class IsNotDefaultNullableAssertionExtensions - { - public static . IsNotDefault(this . source) - where TValue : struct { } - } - public static class IsNotDefaultReferenceAssertionExtensions - { - public static . IsNotDefault(this . source) - where TValue : class { } - } - public static class JsonElementAssertionExtensions - { - public static ._DoesNotHaveProperty_String_Assertion DoesNotHaveProperty(this .<.> source, string propertyName, [.("propertyName")] string? propertyNameExpression = null) { } - public static ._HasProperty_String_Assertion HasProperty(this .<.> source, string propertyName, [.("propertyName")] string? propertyNameExpression = null) { } - public static ._IsArray_Assertion IsArray(this .<.> source) { } - public static ._IsBoolean_Assertion IsBoolean(this .<.> source) { } - public static ._IsNotNull_Assertion IsNotNull(this .<.> source) { } - public static ._IsNull_Assertion IsNull(this .<.> source) { } - public static ._IsNumber_Assertion IsNumber(this .<.> source) { } - public static ._IsObject_Assertion IsObject(this .<.> source) { } - public static ._IsString_Assertion IsString(this .<.> source) { } - } - public sealed class JsonElement_DoesNotHaveProperty_String_Assertion : .<.> - { - public JsonElement_DoesNotHaveProperty_String_Assertion(.<.> context, string propertyName) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonElement_HasProperty_String_Assertion : .<.> - { - public JsonElement_HasProperty_String_Assertion(.<.> context, string propertyName) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonElement_IsArray_Assertion : .<.> - { - public JsonElement_IsArray_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonElement_IsBoolean_Assertion : .<.> - { - public JsonElement_IsBoolean_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonElement_IsNotNull_Assertion : .<.> - { - public JsonElement_IsNotNull_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonElement_IsNull_Assertion : .<.> - { - public JsonElement_IsNull_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonElement_IsNumber_Assertion : .<.> - { - public JsonElement_IsNumber_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonElement_IsObject_Assertion : .<.> - { - public JsonElement_IsObject_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonElement_IsString_Assertion : .<.> - { - public JsonElement_IsString_Assertion(.<.> context) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public static class JsonNodeAssertionExtensions - { - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._DoesNotHaveJsonProperty_String_Assertion DoesNotHaveJsonProperty(this . source, string propertyName, [.("propertyName")] string? propertyNameExpression = null) - where TActual : ..JsonNode { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasJsonArrayCount_Int_Assertion HasJsonArrayCount(this . source, int expected, [.("expected")] string? expectedExpression = null) - where TActual : ..JsonNode { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._HasJsonProperty_String_Assertion HasJsonProperty(this . source, string propertyName, [.("propertyName")] string? propertyNameExpression = null) - where TActual : ..JsonNode { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsDeepEqualTo_JsonNode_Assertion IsDeepEqualTo(this . source, ..JsonNode? expected, [.("expected")] string? expectedExpression = null) - where TActual : ..JsonNode { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsJsonArray_Assertion IsJsonArray(this . source) - where TActual : ..JsonNode { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsJsonArrayEmpty_Assertion IsJsonArrayEmpty(this . source) - where TActual : ..JsonNode { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsJsonArrayNotEmpty_Assertion IsJsonArrayNotEmpty(this . source) - where TActual : ..JsonNode { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsJsonObject_Assertion IsJsonObject(this . source) - where TActual : ..JsonNode { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsJsonValue_Assertion IsJsonValue(this . source) - where TActual : ..JsonNode { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsNotDeepEqualTo_JsonNode_Assertion IsNotDeepEqualTo(this . source, ..JsonNode? expected, [.("expected")] string? expectedExpression = null) - where TActual : ..JsonNode { } - } - public sealed class JsonNode_DoesNotHaveJsonProperty_String_Assertion : .<..JsonNode?> - { - public JsonNode_DoesNotHaveJsonProperty_String_Assertion(.<..JsonNode?> context, string propertyName) { } - protected override .<.> CheckAsync(.<..JsonNode?> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonNode_HasJsonArrayCount_Int_Assertion : .<..JsonNode?> - { - public JsonNode_HasJsonArrayCount_Int_Assertion(.<..JsonNode?> context, int expected) { } - protected override .<.> CheckAsync(.<..JsonNode?> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonNode_HasJsonProperty_String_Assertion : .<..JsonNode?> - { - public JsonNode_HasJsonProperty_String_Assertion(.<..JsonNode?> context, string propertyName) { } - protected override .<.> CheckAsync(.<..JsonNode?> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonNode_IsDeepEqualTo_JsonNode_Assertion : .<..JsonNode?> - { - public JsonNode_IsDeepEqualTo_JsonNode_Assertion(.<..JsonNode?> context, ..JsonNode? expected) { } - protected override .<.> CheckAsync(.<..JsonNode?> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonNode_IsJsonArrayEmpty_Assertion : .<..JsonNode?> - { - public JsonNode_IsJsonArrayEmpty_Assertion(.<..JsonNode?> context) { } - protected override .<.> CheckAsync(.<..JsonNode?> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonNode_IsJsonArrayNotEmpty_Assertion : .<..JsonNode?> - { - public JsonNode_IsJsonArrayNotEmpty_Assertion(.<..JsonNode?> context) { } - protected override .<.> CheckAsync(.<..JsonNode?> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonNode_IsJsonArray_Assertion : .<..JsonNode?> - { - public JsonNode_IsJsonArray_Assertion(.<..JsonNode?> context) { } - protected override .<.> CheckAsync(.<..JsonNode?> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonNode_IsJsonObject_Assertion : .<..JsonNode?> - { - public JsonNode_IsJsonObject_Assertion(.<..JsonNode?> context) { } - protected override .<.> CheckAsync(.<..JsonNode?> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonNode_IsJsonValue_Assertion : .<..JsonNode?> - { - public JsonNode_IsJsonValue_Assertion(.<..JsonNode?> context) { } - protected override .<.> CheckAsync(.<..JsonNode?> metadata) { } - protected override string GetExpectation() { } - } - public sealed class JsonNode_IsNotDeepEqualTo_JsonNode_Assertion : .<..JsonNode?> - { - public JsonNode_IsNotDeepEqualTo_JsonNode_Assertion(.<..JsonNode?> context, ..JsonNode? expected) { } - protected override .<.> CheckAsync(.<..JsonNode?> metadata) { } - protected override string GetExpectation() { } - } - public static class JsonStringAssertionExtensions - { - public static ._IsNotValidJson_Assertion IsNotValidJson(this . source) { } - public static ._IsValidJson_Assertion IsValidJson(this . source) { } - public static ._IsValidJsonArray_Assertion IsValidJsonArray(this . source) { } - public static ._IsValidJsonObject_Assertion IsValidJsonObject(this . source) { } - } - public static class LazyAssertionExtensions - { - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsValueCreated_Assertion IsValueCreated(this .<> source) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsValueNotCreated_Assertion IsValueNotCreated(this .<> source) { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class LazyT_IsValueCreated_Assertion : .<> - { - public LazyT_IsValueCreated_Assertion(.<> context) { } - [.("Trimming", "IL2091", Justification="Only checking IsValueCreated property, not creating instances")] - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class LazyT_IsValueNotCreated_Assertion : .<> - { - public LazyT_IsValueNotCreated_Assertion(.<> context) { } - [.("Trimming", "IL2091", Justification="Only checking IsValueCreated property, not creating instances")] - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public static class LongAssertions - { - public static ._IsEven_Assertion IsEven(this . source) { } - public static ._IsNotZero_Assertion IsNotZero(this . source) { } - public static ._IsOdd_Assertion IsOdd(this . source) { } - public static ._IsZero_Assertion IsZero(this . source) { } - } - public static class LongEqualsAssertionExtensions - { - public static . IsEqualTo(this . source, long expected, [.("expected")] string? expectedExpression = null) { } - } - public static class LongIsCloseToAssertionExtensions - { - public static . IsCloseTo(this . source, long expected, long tolerance, [.("expected")] string? expectedExpression = null, [.("tolerance")] string? toleranceExpression = null) { } - } - public static class LongIsWithinPercentOfAssertionExtensions - { - public static . IsWithinPercentOf(this . source, long expected, double percent, [.("expected")] string? expectedExpression = null, [.("percent")] string? percentExpression = null) { } - } - public sealed class Long_IsEven_Assertion : . - { - public Long_IsEven_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class Long_IsNotZero_Assertion : . - { - public Long_IsNotZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class Long_IsOdd_Assertion : . - { - public Long_IsOdd_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class Long_IsZero_Assertion : . - { - public Long_IsZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class NotEqualsAssertionExtensions - { - public static . IsNotEqualTo(this . source, TValue notExpected, .? comparer = null, [.("notExpected")] string? notExpectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - [.("Looks up implicit conversion operators via reflection. Trimming may remove user-d" + - "efined operators.")] - public static . IsNotEqualTo(this . source, TOther? notExpected, [.("notExpected")] string? notExpectedExpression = null, params .[] _) { } - } - public static class NotEquivalentToAssertionExtensions - { - [.("Collection equivalency uses structural comparison for complex objects, which requ" + - "ires reflection and is not compatible with AOT")] - public static . IsNotEquivalentTo(this . source, . notExpected, . ordering = 0, [.("notExpected")] string? notExpectedExpression = null, [.("ordering")] string? orderingExpression = null) - where TCollection : . { } - public static . IsNotEquivalentTo(this . source, . notExpected, . comparer, . ordering = 0, [.("notExpected")] string? notExpectedExpression = null, [.("comparer")] string? comparerExpression = null, [.("ordering")] string? orderingExpression = null) - where TCollection : . { } - } - public static class NullAssertionExtension - { - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsNull_Assertion IsNull(this . source) { } - } - public static class NullableAssertionExtensions - { - public static . DoesNotHaveValue(this . source) { } - public static . HasValue(this . source) { } - } - public sealed class NullableBool_IsFalse_Assertion : . - { - public NullableBool_IsFalse_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class NullableBool_IsTrue_Assertion : . - { - public NullableBool_IsTrue_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class NullableEquatableAssertionExtensions - { - public static . IsEquatableTo(this . source, TExpected expected, [.("expected")] string? expectedExpression = null) - where TActual : struct, { } - } - public class NullableHasValueAssertion : . - { - public NullableHasValueAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class ProcessAssertionExtensions - { - public static . DoesNotHaveEventRaisingEnabled(this .<.Process> source) { } - public static . EnableRaisingEvents(this .<.Process> source) { } - public static . HasExited(this .<.Process> source) { } - public static . HasNotExited(this .<.Process> source) { } - public static . IsNotResponding(this .<.Process> source) { } - public static . Responding(this .<.Process> source) { } - } - public class ProcessEnableRaisingEventsAssertion : .<.Process> - { - public ProcessEnableRaisingEventsAssertion(.<.Process> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Process> metadata) { } - protected override string GetExpectation() { } - } - public class ProcessHasExitedAssertion : .<.Process> - { - public ProcessHasExitedAssertion(.<.Process> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Process> metadata) { } - protected override string GetExpectation() { } - } - public class ProcessRespondingAssertion : .<.Process> - { - public ProcessRespondingAssertion(.<.Process> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Process> metadata) { } - protected override string GetExpectation() { } - } - public static class PropertyAssertionExtensions - { - public static . HasProperty(this . source, .<> propertySelector) { } - public static . HasProperty(this . source, .<> propertySelector, TProperty expectedValue, [.("expectedValue")] string? expression = null) { } - } - public static class RangeAssertionExtensions - { - public static ._HasBothIndicesFromEnd_Assertion HasBothIndicesFromEnd(this .<> source) { } - public static ._HasEndFromBeginning_Assertion HasEndFromBeginning(this .<> source) { } - public static ._HasStartFromBeginning_Assertion HasStartFromBeginning(this .<> source) { } - [("Use IsFullRange instead.")] - public static ._IsAll_Assertion IsAll(this .<> source) { } - public static ._IsFullRange_Assertion IsFullRange(this .<> source) { } - } - public sealed class Range_HasBothIndicesFromEnd_Assertion : .<> - { - public Range_HasBothIndicesFromEnd_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Range_HasEndFromBeginning_Assertion : .<> - { - public Range_HasEndFromBeginning_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Range_HasStartFromBeginning_Assertion : .<> - { - public Range_HasStartFromBeginning_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Range_IsAll_Assertion : .<> - { - public Range_IsAll_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Range_IsFullRange_Assertion : .<> - { - public Range_IsFullRange_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public static class ReferenceAssertionExtensions - { - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsNotSameReferenceAs_Object_Assertion IsNotSameReferenceAs(this . source, object? expected, [.("expected")] string? expectedExpression = null) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsSameReferenceAs_Object_Assertion IsSameReferenceAs(this . source, object? expected, [.("expected")] string? expectedExpression = null) { } - } - public static class RegexAssertionExtensions - { - public static ..MatchGroupAssertion Group(this .<..RegexMatch> continuation, int groupIndex, <., .?> assertion) { } - public static ..MatchGroupAssertion Group(this .<..RegexMatch> continuation, string groupName, <., .?> assertion) { } - public static ..GroupAssertion Group(this .<..RegexMatchCollection> continuation, int groupIndex, <., .?> assertion) { } - public static ..GroupAssertion Group(this .<..RegexMatchCollection> continuation, string groupName, <., .?> assertion) { } - public static ..MatchGroupAssertion Group(this .<..RegexMatch> source, int groupIndex, <., .?> assertion) { } - public static ..MatchGroupAssertion Group(this .<..RegexMatch> source, string groupName, <., .?> assertion) { } - public static ..MatchIndexAssertion Match(this .<..RegexMatchCollection> continuation, int index) { } - public static ..MatchAssertion Match(this .<..RegexMatchCollection> continuation, int index, <.<..RegexMatch>, .<..RegexMatch>?> assertion) { } - public static . Matches(this . source, . regex, [.("regex")] string? regexExpression = null) { } - public static . Matches(this . source, string pattern, [.("pattern")] string? patternExpression = null) { } - } - public static class RuneAssertionExtensions - { - public static . IsAscii(this .<.Rune> source) { } - public static . IsBmp(this .<.Rune> source) { } - public static . IsControl(this .<.Rune> source) { } - public static . IsDigit(this .<.Rune> source) { } - public static . IsLetter(this .<.Rune> source) { } - public static . IsLetterOrDigit(this .<.Rune> source) { } - public static . IsLower(this .<.Rune> source) { } - public static . IsNotAscii(this .<.Rune> source) { } - public static . IsNotBmp(this .<.Rune> source) { } - public static . IsNotControl(this .<.Rune> source) { } - public static . IsNotDigit(this .<.Rune> source) { } - public static . IsNotLetter(this .<.Rune> source) { } - public static . IsNotLetterOrDigit(this .<.Rune> source) { } - public static . IsNotLower(this .<.Rune> source) { } - public static . IsNotNumber(this .<.Rune> source) { } - public static . IsNotPunctuation(this .<.Rune> source) { } - public static . IsNotSeparator(this .<.Rune> source) { } - public static . IsNotSymbol(this .<.Rune> source) { } - public static . IsNotUpper(this .<.Rune> source) { } - public static . IsNotWhiteSpace(this .<.Rune> source) { } - public static . IsNumber(this .<.Rune> source) { } - public static . IsPunctuation(this .<.Rune> source) { } - public static . IsSeparator(this .<.Rune> source) { } - public static . IsSymbol(this .<.Rune> source) { } - public static . IsUpper(this .<.Rune> source) { } - public static . IsWhiteSpace(this .<.Rune> source) { } - } - public class RuneIsAsciiAssertion : .<.Rune> - { - public RuneIsAsciiAssertion(.<.Rune> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Rune> metadata) { } - protected override string GetExpectation() { } - } - public class RuneIsBmpAssertion : .<.Rune> - { - public RuneIsBmpAssertion(.<.Rune> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Rune> metadata) { } - protected override string GetExpectation() { } - } - public class RuneIsControlWithRuneAssertion : .<.Rune> - { - public RuneIsControlWithRuneAssertion(.<.Rune> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Rune> metadata) { } - protected override string GetExpectation() { } - } - public class RuneIsDigitWithRuneAssertion : .<.Rune> - { - public RuneIsDigitWithRuneAssertion(.<.Rune> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Rune> metadata) { } - protected override string GetExpectation() { } - } - public class RuneIsLetterOrDigitWithRuneAssertion : .<.Rune> - { - public RuneIsLetterOrDigitWithRuneAssertion(.<.Rune> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Rune> metadata) { } - protected override string GetExpectation() { } - } - public class RuneIsLetterWithRuneAssertion : .<.Rune> - { - public RuneIsLetterWithRuneAssertion(.<.Rune> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Rune> metadata) { } - protected override string GetExpectation() { } - } - public class RuneIsLowerWithRuneAssertion : .<.Rune> - { - public RuneIsLowerWithRuneAssertion(.<.Rune> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Rune> metadata) { } - protected override string GetExpectation() { } - } - public class RuneIsNumberWithRuneAssertion : .<.Rune> - { - public RuneIsNumberWithRuneAssertion(.<.Rune> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Rune> metadata) { } - protected override string GetExpectation() { } - } - public class RuneIsPunctuationWithRuneAssertion : .<.Rune> - { - public RuneIsPunctuationWithRuneAssertion(.<.Rune> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Rune> metadata) { } - protected override string GetExpectation() { } - } - public class RuneIsSeparatorWithRuneAssertion : .<.Rune> - { - public RuneIsSeparatorWithRuneAssertion(.<.Rune> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Rune> metadata) { } - protected override string GetExpectation() { } - } - public class RuneIsSymbolWithRuneAssertion : .<.Rune> - { - public RuneIsSymbolWithRuneAssertion(.<.Rune> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Rune> metadata) { } - protected override string GetExpectation() { } - } - public class RuneIsUpperWithRuneAssertion : .<.Rune> - { - public RuneIsUpperWithRuneAssertion(.<.Rune> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Rune> metadata) { } - protected override string GetExpectation() { } - } - public class RuneIsWhiteSpaceWithRuneAssertion : .<.Rune> - { - public RuneIsWhiteSpaceWithRuneAssertion(.<.Rune> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Rune> metadata) { } - protected override string GetExpectation() { } - } - public sealed class SByte_IsEven_Assertion : . - { - public SByte_IsEven_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class SByte_IsNotZero_Assertion : . - { - public SByte_IsNotZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class SByte_IsOdd_Assertion : . - { - public SByte_IsOdd_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class SByte_IsZero_Assertion : . - { - public SByte_IsZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class SbyteAssertions - { - public static ._IsEven_Assertion IsEven(this . source) { } - public static ._IsNotZero_Assertion IsNotZero(this . source) { } - public static ._IsOdd_Assertion IsOdd(this . source) { } - public static ._IsZero_Assertion IsZero(this . source) { } - } - public static class ShortAssertions - { - public static .16_IsEven_Assertion IsEven(this . source) { } - public static .16_IsNotZero_Assertion IsNotZero(this . source) { } - public static .16_IsOdd_Assertion IsOdd(this . source) { } - public static .16_IsZero_Assertion IsZero(this . source) { } - } - public static class SingleAssertionExtensions - { - public static . IsFinite(this . source) { } - public static . IsInfinity(this . source) { } - public static . IsNaN(this . source) { } - public static . IsNegativeInfinity(this . source) { } - public static . IsNormal(this . source) { } - public static . IsNotFinite(this . source) { } - public static . IsNotInfinity(this . source) { } - public static . IsNotNaN(this . source) { } - public static . IsNotNegativeInfinity(this . source) { } - public static . IsNotNormal(this . source) { } - public static . IsNotPositiveInfinity(this . source) { } - public static . IsNotSubnormal(this . source) { } - public static . IsPositiveInfinity(this . source) { } - public static . IsSubnormal(this . source) { } - } - public static class SingleItemSourceCollectionShapeAssertions - { - public static .<., TItem> All(this .<.> source) { } - public static .<., TItem> All(this .<.> source) { } - public static .<., TItem> All(this .<.> source) { } - public static .<., TItem> All(this .<.> source) { } - public static .<., TItem> All(this .<.> source) { } - public static .<., TItem> All(this .<.> source) { } - public static .<., TItem> All(this .<.> source) { } - public static . All(this . source) { } - public static .<., TItem> All(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> All(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> All(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> All(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> All(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> All(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> All(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static . All(this . source, predicate, [.("predicate")] string? expression = null) { } - public static .<., .> All(this .<.> source) - where TKey : notnull { } - public static .<., .> All(this .<.> source) - where TKey : notnull { } - public static .<., .> All(this .<.> source) - where TKey : notnull { } - public static .<., .> All(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> All(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> All(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AllKeys(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AllKeys(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AllKeys(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AllValues(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AllValues(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AllValues(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TItem> Any(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Any(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Any(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Any(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Any(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Any(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Any(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static . Any(this . source, predicate, [.("predicate")] string? expression = null) { } - public static .<., .> Any(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> Any(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> Any(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AnyKey(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AnyKey(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AnyKey(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AnyValue(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AnyValue(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> AnyValue(this .<.> source, predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TItem> Contains(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static . Contains(this . source, predicate, [.("predicate")] string? expression = null) { } - public static . Contains(this . source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> Contains(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static . Contains(this . source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., .> Contains(this .<.> source, . expected, [.("expected")] string? expression = null) - where TKey : notnull { } - public static .<., .> Contains(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> Contains(this .<.> source, . expected, [.("expected")] string? expression = null) - where TKey : notnull { } - public static .<., .> Contains(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> Contains(this .<.> source, . expected, [.("expected")] string? expression = null) - where TKey : notnull { } - public static .<., .> Contains(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> Contains(this .<.> source, . expected, .<.> comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., .> Contains(this .<.> source, . expected, .<.> comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., .> Contains(this .<.> source, . expected, .<.> comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKey(this .<.> source, TKey expectedKey, [.("expectedKey")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKey(this .<.> source, TKey expectedKey, [.("expectedKey")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKey(this .<.> source, TKey expectedKey, [.("expectedKey")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKey(this .<.> source, TKey expectedKey, .? comparer, [.("expectedKey")] string? keyExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKey(this .<.> source, TKey expectedKey, .? comparer, [.("expectedKey")] string? keyExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKey(this .<.> source, TKey expectedKey, .? comparer, [.("expectedKey")] string? keyExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKeyWithValue(this .<.> source, TKey expectedKey, TValue expectedValue, [.("expectedKey")] string? keyExpression = null, [.("expectedValue")] string? valueExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKeyWithValue(this .<.> source, TKey expectedKey, TValue expectedValue, [.("expectedKey")] string? keyExpression = null, [.("expectedValue")] string? valueExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsKeyWithValue(this .<.> source, TKey expectedKey, TValue expectedValue, [.("expectedKey")] string? keyExpression = null, [.("expectedValue")] string? valueExpression = null) - where TKey : notnull { } - public static .<., TItem> ContainsOnly(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> ContainsOnly(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> ContainsOnly(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> ContainsOnly(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> ContainsOnly(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> ContainsOnly(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> ContainsOnly(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static . ContainsOnly(this . source, predicate, [.("predicate")] string? expression = null) { } - public static .<., .> ContainsOnly(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> ContainsOnly(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> ContainsOnly(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsValue(this .<.> source, TValue expectedValue, [.("expectedValue")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsValue(this .<.> source, TValue expectedValue, [.("expectedValue")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> ContainsValue(this .<.> source, TValue expectedValue, [.("expectedValue")] string? expression = null) - where TKey : notnull { } - public static .<., TItem> Count(this .<.> source) { } - public static .<., TItem> Count(this .<.> source) { } - public static .<., TItem> Count(this .<.> source) { } - public static .<., TItem> Count(this .<.> source) { } - public static .<., TItem> Count(this .<.> source) { } - public static .<., TItem> Count(this .<.> source) { } - public static .<., TItem> Count(this .<.> source) { } - public static . Count(this . source) { } - public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public static . Count(this . source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public static . Count(this . source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public static .<., TKey, TValue> Count(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> Count(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> Count(this .<.> source) - where TKey : notnull { } - public static .<., .> Count(this .<.> source, <.<.>, .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TKey : notnull { } - public static .<., .> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) - where TKey : notnull { } - public static .<., .> Count(this .<.> source, <.<.>, .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TKey : notnull { } - public static .<., .> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) - where TKey : notnull { } - public static .<., .> Count(this .<.> source, <.<.>, .?> itemAssertion, [.("itemAssertion")] string? expression = null) - where TKey : notnull { } - public static .<., .> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) - where TKey : notnull { } - public static .<., TItem> DoesNotContain(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, [.("expected")] string? expression = null) { } - public static . DoesNotContain(this . source, predicate, [.("predicate")] string? expression = null) { } - public static . DoesNotContain(this . source, TItem expected, [.("expected")] string? expression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> DoesNotContain(this .<.> source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static . DoesNotContain(this . source, TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., .> DoesNotContain(this .<.> source, . expected, [.("expected")] string? expression = null) - where TKey : notnull { } - public static .<., .> DoesNotContain(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> DoesNotContain(this .<.> source, . expected, [.("expected")] string? expression = null) - where TKey : notnull { } - public static .<., .> DoesNotContain(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> DoesNotContain(this .<.> source, . expected, [.("expected")] string? expression = null) - where TKey : notnull { } - public static .<., .> DoesNotContain(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., .> DoesNotContain(this .<.> source, . expected, .<.> comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., .> DoesNotContain(this .<.> source, . expected, .<.> comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., .> DoesNotContain(this .<.> source, . expected, .<.> comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> DoesNotContainKey(this .<.> source, TKey expectedKey, [.("expectedKey")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> DoesNotContainKey(this .<.> source, TKey expectedKey, [.("expectedKey")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> DoesNotContainKey(this .<.> source, TKey expectedKey, [.("expectedKey")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> DoesNotContainValue(this .<.> source, TValue expectedValue, [.("expectedValue")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> DoesNotContainValue(this .<.> source, TValue expectedValue, [.("expectedValue")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> DoesNotContainValue(this .<.> source, TValue expectedValue, [.("expectedValue")] string? expression = null) - where TKey : notnull { } - public static .<., TItem> DoesNotOverlap(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> DoesNotOverlap(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> DoesNotOverlap(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> FirstItem(this .<.> source) { } - public static .<., TItem> FirstItem(this .<.> source) { } - public static .<., TItem> FirstItem(this .<.> source) { } - public static .<., TItem> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) { } - public static .<., TItem> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) { } - public static .<., TItem> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) { } - public static .<., TItem> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) { } - public static .<., TItem> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) { } - public static .<., TItem> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) { } - public static .<., TItem> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) { } - public static . HasAtLeast(this . source, int minCount, [.("minCount")] string? expression = null) { } - public static .<., TKey, TValue> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> HasAtLeast(this .<.> source, int minCount, [.("minCount")] string? expression = null) - where TKey : notnull { } - public static .<., TItem> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) { } - public static .<., TItem> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) { } - public static .<., TItem> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) { } - public static .<., TItem> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) { } - public static .<., TItem> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) { } - public static .<., TItem> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) { } - public static .<., TItem> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) { } - public static . HasAtMost(this . source, int maxCount, [.("maxCount")] string? expression = null) { } - public static .<., TKey, TValue> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> HasAtMost(this .<.> source, int maxCount, [.("maxCount")] string? expression = null) - where TKey : notnull { } - public static .<., TItem> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public static .<., TItem> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public static .<., TItem> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public static .<., TItem> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public static .<., TItem> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public static .<., TItem> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public static .<., TItem> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public static . HasCountBetween(this . source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public static .<., TKey, TValue> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) - where TKey : notnull { } - public static .<., TKey, TValue> HasCountBetween(this .<.> source, int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) - where TKey : notnull { } - public static .<., TItem> HasDistinctItems(this .<.> source) { } - public static .<., TItem> HasDistinctItems(this .<.> source) { } - public static .<., TItem> HasDistinctItems(this .<.> source) { } - public static .<., TItem> HasDistinctItems(this .<.> source) { } - public static .<., TItem> HasDistinctItems(this .<.> source) { } - public static .<., TItem> HasDistinctItems(this .<.> source) { } - public static .<., TItem> HasDistinctItems(this .<.> source) { } - public static . HasDistinctItems(this . source) { } - public static .<., TItem> HasDistinctItems(this .<.> source, . comparer, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> HasDistinctItems(this .<.> source, . comparer, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> HasDistinctItems(this .<.> source, . comparer, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> HasDistinctItems(this .<.> source, . comparer, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> HasDistinctItems(this .<.> source, . comparer, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> HasDistinctItems(this .<.> source, . comparer, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> HasDistinctItems(this .<.> source, . comparer, [.("comparer")] string? comparerExpression = null) { } - public static . HasDistinctItems(this . source, . comparer, [.("comparer")] string? comparerExpression = null) { } - public static .<., .> HasDistinctItems(this .<.> source) - where TKey : notnull { } - public static .<., .> HasDistinctItems(this .<.> source) - where TKey : notnull { } - public static .<., .> HasDistinctItems(this .<.> source) - where TKey : notnull { } - public static .<., .> HasDistinctItems(this .<.> source, .<.> comparer, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., .> HasDistinctItems(this .<.> source, .<.> comparer, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., .> HasDistinctItems(this .<.> source, .<.> comparer, [.("comparer")] string? comparerExpression = null) - where TKey : notnull { } - public static .<., TItem> HasItemAt(this .<.> source, int index, TItem expected, [.("index")] string? indexExpression = null, [.("expected")] string? expectedExpression = null) { } - public static .<., TItem> HasItemAt(this .<.> source, int index, TItem expected, [.("index")] string? indexExpression = null, [.("expected")] string? expectedExpression = null) { } - public static .<., TItem> HasItemAt(this .<.> source, int index, TItem expected, .? comparer = null, [.("index")] string? indexExpression = null, [.("expected")] string? expectedExpression = null) { } - public static .<., TItem> HasSingleItem(this .<.> source) { } - public static .<., TItem> HasSingleItem(this .<.> source) { } - public static .<., TItem> HasSingleItem(this .<.> source) { } - public static .<., TItem> HasSingleItem(this .<.> source) { } - public static .<., TItem> HasSingleItem(this .<.> source) { } - public static .<., TItem> HasSingleItem(this .<.> source) { } - public static .<., TItem> HasSingleItem(this .<.> source) { } - public static . HasSingleItem(this . source) { } - public static .<., TItem> HasSingleItem(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> HasSingleItem(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> HasSingleItem(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> HasSingleItem(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> HasSingleItem(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> HasSingleItem(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TItem> HasSingleItem(this .<.> source, predicate, [.("predicate")] string? expression = null) { } - public static . HasSingleItem(this . source, predicate, [.("predicate")] string? expression = null) { } - public static .<., TKey, TValue> HasSingleItem(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> HasSingleItem(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> HasSingleItem(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> HasSingleItem(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> HasSingleItem(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TKey, TValue> HasSingleItem(this .<.> source, <., bool> predicate, [.("predicate")] string? expression = null) - where TKey : notnull { } - public static .<., TItem> IsEmpty(this .<.> source) { } - public static .<., TItem> IsEmpty(this .<.> source) { } - public static .<., TItem> IsEmpty(this .<.> source) { } - public static .<., TItem> IsEmpty(this .<.> source) { } - public static .<., TItem> IsEmpty(this .<.> source) { } - public static .<., TItem> IsEmpty(this .<.> source) { } - public static .<., TItem> IsEmpty(this .<.> source) { } - public static . IsEmpty(this . source) { } - public static .<., TKey, TValue> IsEmpty(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> IsEmpty(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> IsEmpty(this .<.> source) - where TKey : notnull { } - public static .<., TItem> IsInDescendingOrder(this .<.> source) { } - public static .<., TItem> IsInDescendingOrder(this .<.> source) { } - public static .<., TItem> IsInDescendingOrder(this .<.> source) { } - public static .<., TItem> IsInDescendingOrder(this .<.> source) { } - public static .<., TItem> IsInDescendingOrder(this .<.> source) { } - public static .<., TItem> IsInDescendingOrder(this .<.> source) { } - public static .<., TItem> IsInDescendingOrder(this .<.> source) { } - public static . IsInDescendingOrder(this . source) { } - public static .<., .> IsInDescendingOrder(this .<.> source) - where TKey : notnull { } - public static .<., .> IsInDescendingOrder(this .<.> source) - where TKey : notnull { } - public static .<., .> IsInDescendingOrder(this .<.> source) - where TKey : notnull { } - public static .<., TItem> IsInOrder(this .<.> source) { } - public static .<., TItem> IsInOrder(this .<.> source) { } - public static .<., TItem> IsInOrder(this .<.> source) { } - public static .<., TItem> IsInOrder(this .<.> source) { } - public static .<., TItem> IsInOrder(this .<.> source) { } - public static .<., TItem> IsInOrder(this .<.> source) { } - public static .<., TItem> IsInOrder(this .<.> source) { } - public static . IsInOrder(this . source) { } - public static .<., .> IsInOrder(this .<.> source) - where TKey : notnull { } - public static .<., .> IsInOrder(this .<.> source) - where TKey : notnull { } - public static .<., .> IsInOrder(this .<.> source) - where TKey : notnull { } - public static .<., TItem> IsNotEmpty(this .<.> source) { } - public static .<., TItem> IsNotEmpty(this .<.> source) { } - public static .<., TItem> IsNotEmpty(this .<.> source) { } - public static .<., TItem> IsNotEmpty(this .<.> source) { } - public static .<., TItem> IsNotEmpty(this .<.> source) { } - public static .<., TItem> IsNotEmpty(this .<.> source) { } - public static .<., TItem> IsNotEmpty(this .<.> source) { } - public static . IsNotEmpty(this . source) { } - public static .<., TKey, TValue> IsNotEmpty(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> IsNotEmpty(this .<.> source) - where TKey : notnull { } - public static .<., TKey, TValue> IsNotEmpty(this .<.> source) - where TKey : notnull { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static . IsOrderedBy(this . source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedBy(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static . IsOrderedBy(this . source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, [.("keySelector")] string? expression = null) { } - public static . IsOrderedByDescending(this . source, keySelector, [.("keySelector")] string? expression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem, TKey> IsOrderedByDescending(this .<.> source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static . IsOrderedByDescending(this . source, keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static .<., TItem> IsProperSubsetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsProperSubsetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsProperSubsetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsProperSupersetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsProperSupersetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsProperSupersetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsSubsetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsSubsetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsSubsetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsSupersetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsSupersetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> IsSupersetOf(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> ItemAt(this .<.> source, int index, [.("index")] string? expression = null) { } - public static .<., TItem> ItemAt(this .<.> source, int index, [.("index")] string? indexExpression = null) { } - public static .<., TItem> ItemAt(this .<.> source, int index, [.("index")] string? expression = null) { } - public static .<., TItem> LastItem(this .<.> source) { } - public static .<., TItem> LastItem(this .<.> source) { } - public static .<., TItem> LastItem(this .<.> source) { } - public static .<., TItem> Overlaps(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> Overlaps(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> Overlaps(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> SetEquals(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> SetEquals(this .<.> source, . other, [.("other")] string? expression = null) { } - public static .<., TItem> SetEquals(this .<.> source, . other, [.("other")] string? expression = null) { } - } - public static class SpanAssertionExtensions { } - public static class StreamAssertionExtensions - { - public static . CanRead(this .<.Stream> source) { } - public static . CanSeek(this .<.Stream> source) { } - public static . CanTimeout(this .<.Stream> source) { } - public static . CanWrite(this .<.Stream> source) { } - public static . CannotRead(this .<.Stream> source) { } - public static . CannotSeek(this .<.Stream> source) { } - public static . CannotTimeout(this .<.Stream> source) { } - public static . CannotWrite(this .<.Stream> source) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsAtEnd_Assertion IsAtEnd(this . source) - where TActual : .Stream { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsAtStart_Assertion IsAtStart(this . source) - where TActual : .Stream { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsEmpty_Assertion IsEmpty(this . source) - where TActual : .Stream { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsNotEmpty_Assertion IsNotEmpty(this . source) - where TActual : .Stream { } - } - public class StreamCanReadAssertion : .<.Stream> - { - public StreamCanReadAssertion(.<.Stream> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Stream> metadata) { } - protected override string GetExpectation() { } - } - public class StreamCanSeekAssertion : .<.Stream> - { - public StreamCanSeekAssertion(.<.Stream> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Stream> metadata) { } - protected override string GetExpectation() { } - } - public class StreamCanTimeoutAssertion : .<.Stream> - { - public StreamCanTimeoutAssertion(.<.Stream> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Stream> metadata) { } - protected override string GetExpectation() { } - } - public class StreamCanWriteAssertion : .<.Stream> - { - public StreamCanWriteAssertion(.<.Stream> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Stream> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Stream_IsAtEnd_Assertion : .<.Stream> - { - public Stream_IsAtEnd_Assertion(.<.Stream> context) { } - protected override .<.> CheckAsync(.<.Stream> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Stream_IsAtStart_Assertion : .<.Stream> - { - public Stream_IsAtStart_Assertion(.<.Stream> context) { } - protected override .<.> CheckAsync(.<.Stream> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Stream_IsEmpty_Assertion : .<.Stream> - { - public Stream_IsEmpty_Assertion(.<.Stream> context) { } - protected override .<.> CheckAsync(.<.Stream> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Stream_IsNotEmpty_Assertion : .<.Stream> - { - public Stream_IsNotEmpty_Assertion(.<.Stream> context) { } - protected override .<.> CheckAsync(.<.Stream> metadata) { } - protected override string GetExpectation() { } - } - public static class StrictEqualityAssertions - { - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static .Extensions.T_IsNotStrictlyEqualTo_T_Assertion IsNotStrictlyEqualTo(this . source, T expected, [.("expected")] string? expectedExpression = null) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static .Extensions.T_IsStrictlyEqualTo_T_Assertion IsStrictlyEqualTo(this . source, T expected, [.("expected")] string? expectedExpression = null) { } - } - public static class StringBuilderAssertionExtensions - { - public static ._HasExcessCapacity_Assertion HasExcessCapacity(this .<.StringBuilder> source) { } - public static ._IsEmpty_Assertion IsEmpty(this .<.StringBuilder> source) { } - public static ._IsNotEmpty_Assertion IsNotEmpty(this .<.StringBuilder> source) { } - } - public sealed class StringBuilder_HasExcessCapacity_Assertion : .<.StringBuilder> - { - public StringBuilder_HasExcessCapacity_Assertion(.<.StringBuilder> context) { } - protected override .<.> CheckAsync(.<.StringBuilder> metadata) { } - protected override string GetExpectation() { } - } - public sealed class StringBuilder_IsEmpty_Assertion : .<.StringBuilder> - { - public StringBuilder_IsEmpty_Assertion(.<.StringBuilder> context) { } - protected override .<.> CheckAsync(.<.StringBuilder> metadata) { } - protected override string GetExpectation() { } - } - public sealed class StringBuilder_IsNotEmpty_Assertion : .<.StringBuilder> - { - public StringBuilder_IsNotEmpty_Assertion(.<.StringBuilder> context) { } - protected override .<.> CheckAsync(.<.StringBuilder> metadata) { } - protected override string GetExpectation() { } - } - public static class StringContainsAssertionExtensions - { - public static . Contains(this . source, string expected, [.("expected")] string? expectedExpression = null) { } - public static . Contains(this . source, string expected, comparison, [.("expected")] string? expectedExpression = null, [.("comparison")] string? comparisonExpression = null) { } - } - public static class StringDoesNotContainAssertionExtensions - { - public static . DoesNotContain(this . source, string expected, [.("expected")] string? expectedExpression = null) { } - public static . DoesNotContain(this . source, string expected, comparison, [.("expected")] string? expectedExpression = null, [.("comparison")] string? comparisonExpression = null) { } - } - public static class StringDoesNotEndWithAssertionExtensions - { - public static . DoesNotEndWith(this . source, string expected, [.("expected")] string? expectedExpression = null) { } - public static . DoesNotEndWith(this . source, string expected, comparison, [.("expected")] string? expectedExpression = null, [.("comparison")] string? comparisonExpression = null) { } - } - public static class StringDoesNotMatchAssertionExtensions - { - public static . DoesNotMatch(this . source, . regex, [.("regex")] string? regexExpression = null) { } - public static . DoesNotMatch(this . source, string pattern, [.("pattern")] string? patternExpression = null) { } - } - public static class StringDoesNotStartWithAssertionExtensions - { - public static . DoesNotStartWith(this . source, string expected, [.("expected")] string? expectedExpression = null) { } - public static . DoesNotStartWith(this . source, string expected, comparison, [.("expected")] string? expectedExpression = null, [.("comparison")] string? comparisonExpression = null) { } - } - public static class StringEmptyAssertionExtensions - { - public static ._IsEmpty_Assertion IsEmpty(this . source) { } - public static ._IsNotEmpty_Assertion IsNotEmpty(this . source) { } - } - public static class StringEndsWithAssertionExtensions - { - public static . EndsWith(this . source, string expected, [.("expected")] string? expectedExpression = null) { } - public static . EndsWith(this . source, string expected, comparison, [.("expected")] string? expectedExpression = null, [.("comparison")] string? comparisonExpression = null) { } - } - public static class StringEqualsAssertionExtensions - { - public static . IsEqualTo(this . source, string? expected, [.("expected")] string? expectedExpression = null) { } - public static . IsEqualTo(this . source, string? expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static . IsEqualTo(this . source, string? expected, comparison, [.("expected")] string? expectedExpression = null, [.("comparison")] string? comparisonExpression = null) { } - } - public class StringIsNullOrEmptyWithStringAssertion : . - { - public StringIsNullOrEmptyWithStringAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class StringIsNullOrWhiteSpaceWithStringAssertion : . - { - public StringIsNullOrWhiteSpaceWithStringAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class StringLengthRangeAssertionExtensions - { - public static ._HasLengthBetween_Int_Int_Assertion HasLengthBetween(this . source, int minLength, int maxLength, [.("minLength")] string? minLengthExpression = null, [.("maxLength")] string? maxLengthExpression = null) { } - public static ._HasMaxLength_Int_Assertion HasMaxLength(this . source, int maxLength, [.("maxLength")] string? maxLengthExpression = null) { } - public static ._HasMinLength_Int_Assertion HasMinLength(this . source, int minLength, [.("minLength")] string? minLengthExpression = null) { } - } - public static class StringStartsWithAssertionExtensions - { - public static . StartsWith(this . source, string expected, [.("expected")] string? expectedExpression = null) { } - public static . StartsWith(this . source, string expected, comparison, [.("expected")] string? expectedExpression = null, [.("comparison")] string? comparisonExpression = null) { } - } - public static class StringStaticMethodAssertions - { - public static . IsNotNullOrEmpty(this . source) { } - public static . IsNotNullOrWhiteSpace(this . source) { } - public static . IsNullOrEmpty(this . source) { } - public static . IsNullOrWhiteSpace(this . source) { } - } - public sealed class String_HasLengthBetween_Int_Int_Assertion : . - { - public String_HasLengthBetween_Int_Int_Assertion(. context, int minLength, int maxLength) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class String_HasMaxLength_Int_Assertion : . - { - public String_HasMaxLength_Int_Assertion(. context, int maxLength) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class String_HasMinLength_Int_Assertion : . - { - public String_HasMinLength_Int_Assertion(. context, int minLength) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class String_IsEmpty_Assertion : . - { - public String_IsEmpty_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class String_IsNotEmpty_Assertion : . - { - public String_IsNotEmpty_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class String_IsNotValidJson_Assertion : . - { - public String_IsNotValidJson_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class String_IsValidJsonArray_Assertion : . - { - public String_IsValidJsonArray_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class String_IsValidJsonObject_Assertion : . - { - public String_IsValidJsonObject_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class String_IsValidJson_Assertion : . - { - public String_IsValidJson_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TArray_IsEmpty_Assertion : . - { - public TArray_IsEmpty_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TArray_IsNotEmpty_Assertion : . - { - public TArray_IsNotEmpty_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TArray_IsNotSingleElement_Assertion : . - { - public TArray_IsNotSingleElement_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TArray_IsSingleElement_Assertion : . - { - public TArray_IsSingleElement_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TEnum_DoesNotHaveFlag_TEnum_Assertion : . - where TEnum : struct, - { - public TEnum_DoesNotHaveFlag_TEnum_Assertion(. context, TEnum unexpectedFlag) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TEnum_DoesNotHaveSameNameAs_Enum_Assertion : . - where TEnum : struct, - { - public TEnum_DoesNotHaveSameNameAs_Enum_Assertion(. context, otherEnumValue) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TEnum_DoesNotHaveSameValueAs_Enum_Assertion : . - where TEnum : struct, - { - public TEnum_DoesNotHaveSameValueAs_Enum_Assertion(. context, otherEnumValue) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TEnum_HasFlag_TEnum_Assertion : . - where TEnum : struct, - { - public TEnum_HasFlag_TEnum_Assertion(. context, TEnum expectedFlag) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TEnum_HasSameNameAs_Enum_Assertion : . - where TEnum : struct, - { - public TEnum_HasSameNameAs_Enum_Assertion(. context, otherEnumValue) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TEnum_HasSameValueAs_Enum_Assertion : . - where TEnum : struct, - { - public TEnum_HasSameValueAs_Enum_Assertion(. context, otherEnumValue) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TValue_IsGreaterThanOrEqualTo_TValue_Assertion : . - where TValue : - { - public TValue_IsGreaterThanOrEqualTo_TValue_Assertion(. context, TValue minimum) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TValue_IsGreaterThan_TValue_Assertion : . - where TValue : - { - public TValue_IsGreaterThan_TValue_Assertion(. context, TValue minimum) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TValue_IsLessThanOrEqualTo_TValue_Assertion : . - where TValue : - { - public TValue_IsLessThanOrEqualTo_TValue_Assertion(. context, TValue maximum) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TValue_IsLessThan_TValue_Assertion : . - where TValue : - { - public TValue_IsLessThan_TValue_Assertion(. context, TValue maximum) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TValue_IsNotSameReferenceAs_Object_Assertion : . - { - public TValue_IsNotSameReferenceAs_Object_Assertion(. context, object? expected) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TValue_IsNull_Assertion : . - { - public TValue_IsNull_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class TValue_IsSameReferenceAs_Object_Assertion : . - { - public TValue_IsSameReferenceAs_Object_Assertion(. context, object? expected) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class T_IsIn_IEnumerableT_Assertion : . - { - public T_IsIn_IEnumerableT_Assertion(. context, . collection) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class T_IsIn_TArray_Assertion : . - { - public T_IsIn_TArray_Assertion(. context, T[] collection) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class T_IsNotIn_IEnumerableT_Assertion : . - { - public T_IsNotIn_IEnumerableT_Assertion(. context, . collection) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class T_IsNotIn_TArray_Assertion : . - { - public T_IsNotIn_TArray_Assertion(. context, T[] collection) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class T_IsNotStrictlyEqualTo_T_Assertion : . - { - public T_IsNotStrictlyEqualTo_T_Assertion(. context, T expected) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public sealed class T_IsStrictlyEqualTo_T_Assertion : . - { - public T_IsStrictlyEqualTo_T_Assertion(. context, T expected) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class TaskAssertionExtensions - { - public static . IsCanceled(this . source) - where TTask : . { } - public static . IsCompleted(this . source) - where TTask : . { } - public static . IsCompletedSuccessfully(this . source) - where TTask : . { } - public static . IsFaulted(this . source) - where TTask : . { } - public static . IsNotCanceled(this . source) - where TTask : . { } - public static . IsNotCompleted(this . source) - where TTask : . { } - public static . IsNotCompletedSuccessfully(this . source) - where TTask : . { } - public static . IsNotFaulted(this . source) - where TTask : . { } - } - public class TaskIsCanceledAssertion : . - where TTask : . - { - public TaskIsCanceledAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class TaskIsCompletedAssertion : . - where TTask : . - { - public TaskIsCompletedAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class TaskIsCompletedSuccessfullyAssertion : . - where TTask : . - { - public TaskIsCompletedSuccessfullyAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public class TaskIsFaultedAssertion : . - where TTask : . - { - public TaskIsFaultedAssertion(. context, bool negated = false) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class ThreadAssertionExtensions - { - public static . IsAlive(this .<.Thread> source) { } - public static . IsBackground(this .<.Thread> source) { } - public static . IsNotAlive(this .<.Thread> source) { } - public static . IsNotBackground(this .<.Thread> source) { } - public static . IsNotThreadPoolThread(this .<.Thread> source) { } - public static . IsThreadPoolThread(this .<.Thread> source) { } - } - public class ThreadIsAliveAssertion : .<.Thread> - { - public ThreadIsAliveAssertion(.<.Thread> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Thread> metadata) { } - protected override string GetExpectation() { } - } - public class ThreadIsBackgroundAssertion : .<.Thread> - { - public ThreadIsBackgroundAssertion(.<.Thread> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Thread> metadata) { } - protected override string GetExpectation() { } - } - public class ThreadIsThreadPoolThreadAssertion : .<.Thread> - { - public ThreadIsThreadPoolThreadAssertion(.<.Thread> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.Thread> metadata) { } - protected override string GetExpectation() { } - } - public static class TimeOnlyAssertionExtensions - { - public static ._IsAM_Assertion IsAM(this .<> source) { } - public static ._IsEndOfHour_Assertion IsEndOfHour(this .<> source) { } - public static ._IsMidnight_Assertion IsMidnight(this .<> source) { } - public static ._IsNoon_Assertion IsNoon(this .<> source) { } - public static ._IsNotMidnight_Assertion IsNotMidnight(this .<> source) { } - public static ._IsPM_Assertion IsPM(this .<> source) { } - public static ._IsStartOfHour_Assertion IsStartOfHour(this .<> source) { } - } - public static class TimeOnlyEqualsAssertionExtensions - { - public static . IsEqualTo(this .<> source, expected, [.("expected")] string? expectedExpression = null) { } - } - public sealed class TimeOnly_IsAM_Assertion : .<> - { - public TimeOnly_IsAM_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class TimeOnly_IsEndOfHour_Assertion : .<> - { - public TimeOnly_IsEndOfHour_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class TimeOnly_IsMidnight_Assertion : .<> - { - public TimeOnly_IsMidnight_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class TimeOnly_IsNoon_Assertion : .<> - { - public TimeOnly_IsNoon_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class TimeOnly_IsNotMidnight_Assertion : .<> - { - public TimeOnly_IsNotMidnight_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class TimeOnly_IsPM_Assertion : .<> - { - public TimeOnly_IsPM_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class TimeOnly_IsStartOfHour_Assertion : .<> - { - public TimeOnly_IsStartOfHour_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public static class TimeSpanAssertionExtensions - { - public static ._IsNegative_Assertion IsNegative(this .<> source) { } - public static ._IsNonNegative_Assertion IsNonNegative(this .<> source) { } - public static ._IsNonPositive_Assertion IsNonPositive(this .<> source) { } - public static ._IsNotZero_Assertion IsNotZero(this .<> source) { } - public static ._IsPositive_Assertion IsPositive(this .<> source) { } - public static ._IsZero_Assertion IsZero(this .<> source) { } - } - public static class TimeSpanEqualsAssertionExtensions - { - public static . IsEqualTo(this .<> source, expected, [.("expected")] string? expectedExpression = null) { } - } - public sealed class TimeSpan_IsNegative_Assertion : .<> - { - public TimeSpan_IsNegative_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class TimeSpan_IsNonNegative_Assertion : .<> - { - public TimeSpan_IsNonNegative_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class TimeSpan_IsNonPositive_Assertion : .<> - { - public TimeSpan_IsNonPositive_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class TimeSpan_IsNotZero_Assertion : .<> - { - public TimeSpan_IsNotZero_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class TimeSpan_IsPositive_Assertion : .<> - { - public TimeSpan_IsPositive_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class TimeSpan_IsZero_Assertion : .<> - { - public TimeSpan_IsZero_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public static class TimeZoneInfoAssertionExtensions - { - public static . DoesNotHaveIanaId(this .<> source) { } - public static . DoesNotSupportDaylightSavingTime(this .<> source) { } - public static . HasIanaId(this .<> source) { } - public static . SupportsDaylightSavingTime(this .<> source) { } - } - public class TimeZoneInfoHasIanaIdAssertion : .<> - { - public TimeZoneInfoHasIanaIdAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TimeZoneInfoSupportsDaylightSavingTimeAssertion : .<> - { - public TimeZoneInfoSupportsDaylightSavingTimeAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public static class TypeAssertionExtensions - { - public static . ContainsGenericParameters(this .<> source) { } - public static . DoesNotContainGenericParameters(this .<> source) { } - public static . IsAbstract(this .<> source) { } - public static . IsArray(this .<> source) { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsAssignableFrom_Type_Assertion IsAssignableFrom(this . source, sourceType, [.("sourceType")] string? sourceTypeExpression = null) - where TActual : { } - [.("Trimming", "IL2091", Justification="Generic type parameter is only used for property access, not instantiation")] - public static ._IsAssignableTo_Type_Assertion IsAssignableTo(this . source, expectedType, [.("expectedType")] string? expectedTypeExpression = null) - where TActual : { } - public static . IsByRef(this .<> source) { } - public static . IsByRefLike(this .<> source) { } - public static . IsCOMObject(this .<> source) { } - public static . IsClass(this .<> source) { } - public static . IsConstructedGenericType(this .<> source) { } - public static . IsEnum(this .<> source) { } - public static . IsGenericType(this .<> source) { } - public static . IsGenericTypeDefinition(this .<> source) { } - public static . IsInterface(this .<> source) { } - public static . IsNested(this .<> source) { } - public static . IsNestedAssembly(this .<> source) { } - public static . IsNestedFamily(this .<> source) { } - public static . IsNestedPrivate(this .<> source) { } - public static . IsNestedPublic(this .<> source) { } - public static . IsNotAbstract(this .<> source) { } - public static . IsNotArray(this .<> source) { } - public static . IsNotByRef(this .<> source) { } - public static . IsNotByRefLike(this .<> source) { } - public static . IsNotCOMObject(this .<> source) { } - public static . IsNotClass(this .<> source) { } - public static . IsNotConstructedGenericType(this .<> source) { } - public static . IsNotEnum(this .<> source) { } - public static . IsNotGenericType(this .<> source) { } - public static . IsNotGenericTypeDefinition(this .<> source) { } - public static . IsNotInterface(this .<> source) { } - public static . IsNotNested(this .<> source) { } - public static . IsNotNestedAssembly(this .<> source) { } - public static . IsNotNestedFamily(this .<> source) { } - public static . IsNotNestedPrivate(this .<> source) { } - public static . IsNotNestedPublic(this .<> source) { } - public static . IsNotPointer(this .<> source) { } - public static . IsNotPrimitive(this .<> source) { } - public static . IsNotPublic(this .<> source) { } - public static . IsNotSealed(this .<> source) { } - public static . IsNotValueType(this .<> source) { } - public static . IsNotVisible(this .<> source) { } - public static . IsPointer(this .<> source) { } - public static . IsPrimitive(this .<> source) { } - public static . IsPublic(this .<> source) { } - public static . IsSealed(this .<> source) { } - public static . IsValueType(this .<> source) { } - public static . IsVisible(this .<> source) { } - } - public class TypeContainsGenericParametersAssertion : .<> - { - public TypeContainsGenericParametersAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsAbstractAssertion : .<> - { - public TypeIsAbstractAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsArrayAssertion : .<> - { - public TypeIsArrayAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsByRefAssertion : .<> - { - public TypeIsByRefAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsByRefLikeAssertion : .<> - { - public TypeIsByRefLikeAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsCOMObjectAssertion : .<> - { - public TypeIsCOMObjectAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsClassAssertion : .<> - { - public TypeIsClassAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsConstructedGenericTypeAssertion : .<> - { - public TypeIsConstructedGenericTypeAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsEnumAssertion : .<> - { - public TypeIsEnumAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsGenericTypeAssertion : .<> - { - public TypeIsGenericTypeAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsGenericTypeDefinitionAssertion : .<> - { - public TypeIsGenericTypeDefinitionAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsInterfaceAssertion : .<> - { - public TypeIsInterfaceAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsNestedAssemblyAssertion : .<> - { - public TypeIsNestedAssemblyAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsNestedAssertion : .<> - { - public TypeIsNestedAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsNestedFamilyAssertion : .<> - { - public TypeIsNestedFamilyAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsNestedPrivateAssertion : .<> - { - public TypeIsNestedPrivateAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsNestedPublicAssertion : .<> - { - public TypeIsNestedPublicAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsPointerAssertion : .<> - { - public TypeIsPointerAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsPrimitiveAssertion : .<> - { - public TypeIsPrimitiveAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsPublicAssertion : .<> - { - public TypeIsPublicAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsSealedAssertion : .<> - { - public TypeIsSealedAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsValueTypeAssertion : .<> - { - public TypeIsValueTypeAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class TypeIsVisibleAssertion : .<> - { - public TypeIsVisibleAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Type_IsAssignableFrom_Type_Assertion : .<> - { - public Type_IsAssignableFrom_Type_Assertion(.<> context, sourceType) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Type_IsAssignableTo_Type_Assertion : .<> - { - public Type_IsAssignableTo_Type_Assertion(.<> context, expectedType) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class UInt16_IsEven_Assertion : . - { - public UInt16_IsEven_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class UInt16_IsNotZero_Assertion : . - { - public UInt16_IsNotZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class UInt16_IsOdd_Assertion : . - { - public UInt16_IsOdd_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class UInt16_IsZero_Assertion : . - { - public UInt16_IsZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class UInt32_IsEven_Assertion : . - { - public UInt32_IsEven_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class UInt32_IsNotZero_Assertion : . - { - public UInt32_IsNotZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class UInt32_IsOdd_Assertion : . - { - public UInt32_IsOdd_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class UInt32_IsZero_Assertion : . - { - public UInt32_IsZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class UInt64_IsEven_Assertion : . - { - public UInt64_IsEven_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class UInt64_IsNotZero_Assertion : . - { - public UInt64_IsNotZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class UInt64_IsOdd_Assertion : . - { - public UInt64_IsOdd_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public sealed class UInt64_IsZero_Assertion : . - { - public UInt64_IsZero_Assertion(. context) { } - protected override .<.> CheckAsync(. metadata) { } - protected override string GetExpectation() { } - } - public static class UintAssertions - { - public static .32_IsEven_Assertion IsEven(this . source) { } - public static .32_IsNotZero_Assertion IsNotZero(this . source) { } - public static .32_IsOdd_Assertion IsOdd(this . source) { } - public static .32_IsZero_Assertion IsZero(this . source) { } - } - public static class UlongAssertions - { - public static .64_IsEven_Assertion IsEven(this . source) { } - public static .64_IsNotZero_Assertion IsNotZero(this . source) { } - public static .64_IsOdd_Assertion IsOdd(this . source) { } - public static .64_IsZero_Assertion IsZero(this . source) { } - } - public static class UriAssertionExtensions - { - public static . IsAbsoluteUri(this .<> source) { } - public static . IsDefaultPort(this .<> source) { } - public static . IsFile(this .<> source) { } - public static . IsLoopback(this .<> source) { } - public static . IsNotAbsoluteUri(this .<> source) { } - public static . IsNotDefaultPort(this .<> source) { } - public static . IsNotFile(this .<> source) { } - public static . IsNotLoopback(this .<> source) { } - public static . IsNotUnc(this .<> source) { } - public static . IsNotUserEscaped(this .<> source) { } - public static . IsUnc(this .<> source) { } - public static . UserEscaped(this .<> source) { } - } - public class UriIsAbsoluteUriAssertion : .<> - { - public UriIsAbsoluteUriAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class UriIsDefaultPortAssertion : .<> - { - public UriIsDefaultPortAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class UriIsFileAssertion : .<> - { - public UriIsFileAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class UriIsLoopbackAssertion : .<> - { - public UriIsLoopbackAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class UriIsUncAssertion : .<> - { - public UriIsUncAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class UriUserEscapedAssertion : .<> - { - public UriUserEscapedAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public static class UshortAssertions - { - public static .16_IsEven_Assertion IsEven(this . source) { } - public static .16_IsNotZero_Assertion IsNotZero(this . source) { } - public static .16_IsOdd_Assertion IsOdd(this . source) { } - public static .16_IsZero_Assertion IsZero(this . source) { } - } - public static class ValueTaskAssertionExtensions - { - public static . IsCanceled(this .<.> source) { } - public static . IsCompleted(this .<.> source) { } - public static . IsCompletedSuccessfully(this .<.> source) { } - public static . IsFaulted(this .<.> source) { } - public static . IsNotCanceled(this .<.> source) { } - public static . IsNotCompleted(this .<.> source) { } - public static . IsNotCompletedSuccessfully(this .<.> source) { } - public static . IsNotFaulted(this .<.> source) { } - } - public class ValueTaskIsCanceledAssertion : .<.> - { - public ValueTaskIsCanceledAssertion(.<.> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public class ValueTaskIsCompletedAssertion : .<.> - { - public ValueTaskIsCompletedAssertion(.<.> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public class ValueTaskIsCompletedSuccessfullyAssertion : .<.> - { - public ValueTaskIsCompletedSuccessfullyAssertion(.<.> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public class ValueTaskIsFaultedAssertion : .<.> - { - public ValueTaskIsFaultedAssertion(.<.> context, bool negated = false) { } - protected override .<.> CheckAsync(.<.> metadata) { } - protected override string GetExpectation() { } - } - public static class VersionAssertionExtensions - { - public static ._HasBuildNumber_Assertion HasBuildNumber(this .<> source) { } - public static ._HasNoBuildNumber_Assertion HasNoBuildNumber(this .<> source) { } - public static ._HasNoRevisionNumber_Assertion HasNoRevisionNumber(this .<> source) { } - public static ._HasRevisionNumber_Assertion HasRevisionNumber(this .<> source) { } - public static ._IsMajorVersion_Assertion IsMajorVersion(this .<> source) { } - public static ._IsNotMajorVersion_Assertion IsNotMajorVersion(this .<> source) { } - } - public sealed class Version_HasBuildNumber_Assertion : .<> - { - public Version_HasBuildNumber_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Version_HasNoBuildNumber_Assertion : .<> - { - public Version_HasNoBuildNumber_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Version_HasNoRevisionNumber_Assertion : .<> - { - public Version_HasNoRevisionNumber_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Version_HasRevisionNumber_Assertion : .<> - { - public Version_HasRevisionNumber_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Version_IsMajorVersion_Assertion : .<> - { - public Version_IsMajorVersion_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public sealed class Version_IsNotMajorVersion_Assertion : .<> - { - public Version_IsNotMajorVersion_Assertion(.<> context) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public static class WeakReferenceAssertionExtensions - { - public static . DoesNotTrackResurrection(this .<> source) { } - public static . IsAlive(this .<> source) { } - public static . IsNotAlive(this .<> source) { } - public static . TrackResurrection(this .<> source) { } - } - public class WeakReferenceIsAliveAssertion : .<> - { - public WeakReferenceIsAliveAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } - public class WeakReferenceTrackResurrectionAssertion : .<> - { - public WeakReferenceTrackResurrectionAssertion(.<> context, bool negated = false) { } - protected override .<.> CheckAsync(.<> metadata) { } - protected override string GetExpectation() { } - } -} -namespace .Sources -{ - public class ArrayAssertion : ., .> - { - public ArrayAssertion(TItem[]? value, string? expression) { } - public static . Create(TItem[] item, string label) { } - } - public class AsyncDelegateAssertion : ., ., .<.>, . - { - public AsyncDelegateAssertion(<.> action, string? expression) { } - public . Context { get; } - public . IsAssignableFrom() { } - public . IsAssignableTo() { } - public .<.> IsCanceled() { } - public .<.> IsCompleted() { } - public .<.> IsCompletedSuccessfully() { } - public .<.> IsFaulted() { } - public . IsNotAssignableFrom() { } - public . IsNotAssignableTo() { } - public .<.> IsNotCanceled() { } - public .<.> IsNotCompleted() { } - public .<.> IsNotCompletedSuccessfully() { } - public .<.> IsNotFaulted() { } - public .<.> IsNotNull() { } - public ._IsNotSameReferenceAs_Object_Assertion<.> IsNotSameReferenceAs(object? expected, [.("expected")] string? expectedExpression = null) { } - public . IsNotTypeOf() { } - public ._IsNull_Assertion<.> IsNull() { } - public ._IsSameReferenceAs_Object_Assertion<.> IsSameReferenceAs(object? expected, [.("expected")] string? expectedExpression = null) { } - public . IsTypeOf() { } - public . Throws( exceptionType) { } - public . Throws() - where TException : { } - public . ThrowsExactly() - where TException : { } - public . ThrowsExactly(string parameterName) - where TException : { } - } - public abstract class AsyncEnumerableAssertionBase : .<.>, ., .<.> - { - protected AsyncEnumerableAssertionBase(.<.> context) { } - public new . And { get; } - public .<.> Context { get; } - public new . Or { get; } - public . All( predicate, [.("predicate")] string? expression = null) { } - public . Any( predicate, [.("predicate")] string? expression = null) { } - public . Contains(TItem expected, .? comparer = null, [.("expected")] string? expression = null) { } - public . DoesNotContain(TItem expected, .? comparer = null, [.("expected")] string? expression = null) { } - protected override string GetExpectation() { } - public . HasAtLeast(int minCount, [.("minCount")] string? expression = null) { } - public . HasAtMost(int maxCount, [.("maxCount")] string? expression = null) { } - public . HasCount(int expected, [.("expected")] string? expression = null) { } - public . HasCountBetween(int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public .> IsAssignableFrom() { } - public .> IsAssignableTo() { } - public . IsEmpty() { } - public .> IsNotAssignableFrom() { } - public .> IsNotAssignableTo() { } - public . IsNotEmpty() { } - public . IsNotNull() { } - public .<., TExpected> IsNotTypeOf() { } - public . IsNull() { } - public .<., TExpected> IsTypeOf() { } - } - public class AsyncEnumerableAssertion : . - { - public AsyncEnumerableAssertion(. value, string? expression) { } - } - public class AsyncFuncAssertion : ., ., . - { - public AsyncFuncAssertion(<.> func, string? expression) { } - public . Context { get; } - public . IsAssignableFrom() { } - public . IsAssignableTo() { } - public . IsNotAssignableFrom() { } - public . IsNotAssignableTo() { } - public . IsNotTypeOf() { } - public . IsTypeOf() { } - public . Throws() - where TException : { } - public . ThrowsExactly() - where TException : { } - } - public class AsyncFuncCollectionAssertion : .<., TItem>, ., .<.>, .<.> - { - public AsyncFuncCollectionAssertion(<.<.?>> func, string? expression) { } - public . Throws() - where TException : { } - public . ThrowsExactly() - where TException : { } - } - public abstract class CollectionAssertionBase : ., ., . - where TCollection : . - { - protected CollectionAssertionBase(. context) { } - public new . And { get; } - public new . Or { get; } - public . All() { } - public . All( predicate, [.("predicate")] string? expression = null) { } - public . Any( predicate, [.("predicate")] string? expression = null) { } - public . Contains( predicate, [.("predicate")] string? expression = null) { } - public . Contains(TItem expected, [.("expected")] string? expression = null) { } - public . Contains(TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public . ContainsOnly( predicate, [.("predicate")] string? expression = null) { } - public . Count() { } - public . Count(<., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } - public . Count(<., .?> countAssertion, [.("countAssertion")] string? expression = null) { } - public . DoesNotContain( predicate, [.("predicate")] string? expression = null) { } - public . DoesNotContain(TItem expected, [.("expected")] string? expression = null) { } - public . DoesNotContain(TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - protected override string GetExpectation() { } - public . HasAtLeast(int minCount, [.("minCount")] string? expression = null) { } - public . HasAtMost(int maxCount, [.("maxCount")] string? expression = null) { } - [("Use Count() instead, which provides all numeric assertion methods. Example: Asser" + - "(list).Count().IsGreaterThan(5)")] - public ..CountWrapper HasCount() { } - [("Use Count().IsEqualTo(expectedCount) instead.")] - public . HasCount(int expectedCount, [.("expectedCount")] string? expression = null) { } - public . HasCountBetween(int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public . HasDistinctItems() { } - public . HasDistinctItems(. comparer, [.("comparer")] string? comparerExpression = null) { } - public . HasSingleItem() { } - public . HasSingleItem( predicate, [.("predicate")] string? expression = null) { } - public . IsAssignableFrom() { } - public . IsAssignableTo() { } - public . IsEmpty() { } - public . IsInDescendingOrder() { } - public . IsInOrder() { } - public . IsNotAssignableFrom() { } - public . IsNotAssignableTo() { } - public . IsNotEmpty() { } - public . IsNotNull() { } - public . IsNotTypeOf() { } - public . IsNull() { } - public . IsOrderedBy( keySelector, [.("keySelector")] string? expression = null) { } - public . IsOrderedBy( keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public . IsOrderedByDescending( keySelector, [.("keySelector")] string? expression = null) { } - public . IsOrderedByDescending( keySelector, .? comparer, [.("keySelector")] string? selectorExpression = null, [.("comparer")] string? comparerExpression = null) { } - public . IsTypeOf() { } - } - public class CollectionAssertion : .<., TItem>, .<., .> - { - public CollectionAssertion(. value, string? expression) { } - public static . Create(. item, string label) { } - } - public class DelegateAssertion : ., ., . - { - public DelegateAssertion( action, string? expression) { } - public . Context { get; } - public . IsAssignableFrom() { } - public . IsAssignableTo() { } - public . IsNotAssignableFrom() { } - public . IsNotAssignableTo() { } - public . IsNotTypeOf() { } - public . IsTypeOf() { } - public . Throws() - where TException : { } - public . ThrowsExactly() - where TException : { } - } - public abstract class DictionaryAssertionBase : .> - where TDictionary : . - where TKey : notnull - { - protected DictionaryAssertionBase(. context) { } - public new . And { get; } - public new . Or { get; } - public . AllKeys( predicate, [.("predicate")] string? expression = null) { } - public . AllValues( predicate, [.("predicate")] string? expression = null) { } - public . AnyKey( predicate, [.("predicate")] string? expression = null) { } - public . AnyValue( predicate, [.("predicate")] string? expression = null) { } - public . ContainsKey(TKey expectedKey, [.("expectedKey")] string? expression = null) { } - public . ContainsKey(TKey expectedKey, .? comparer, [.("expectedKey")] string? keyExpression = null, [.("comparer")] string? comparerExpression = null) { } - public . ContainsKeyWithValue(TKey expectedKey, TValue expectedValue, [.("expectedKey")] string? keyExpression = null, [.("expectedValue")] string? valueExpression = null) { } - public . ContainsValue(TValue expectedValue, [.("expectedValue")] string? expression = null) { } - public new . Count() { } - public . DoesNotContainKey(TKey expectedKey, [.("expectedKey")] string? expression = null) { } - public . DoesNotContainValue(TValue expectedValue, [.("expectedValue")] string? expression = null) { } - protected override string GetExpectation() { } - public new . HasAtLeast(int minCount, [.("minCount")] string? expression = null) { } - public new . HasAtMost(int maxCount, [.("maxCount")] string? expression = null) { } - public new . HasCountBetween(int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public new . HasSingleItem() { } - public . HasSingleItem(<., bool> predicate, [.("predicate")] string? expression = null) { } - public new . IsEmpty() { } - public new . IsNotEmpty() { } - public new . IsNotNull() { } - public new . IsNull() { } - } - public class DictionaryAssertion : .<., TKey, TValue>, .<., .> - where TKey : notnull - { - public DictionaryAssertion(.? value, string? expression) { } - public static . Create(. item, string label) { } - } - public class FuncAssertion : ., ., . - { - public FuncAssertion( func, string? expression) { } - public . Context { get; } - public . IsAssignableFrom() { } - public . IsAssignableTo() { } - public . IsNotAssignableFrom() { } - public . IsNotAssignableTo() { } - public . IsNotTypeOf() { } - public . IsTypeOf() { } - public . Throws() - where TException : { } - public . ThrowsExactly() - where TException : { } - } - public class FuncCollectionAssertion : .<., TItem>, ., .<.>, .<.> - { - public FuncCollectionAssertion(<.?> func, string? expression) { } - public . Throws() - where TException : { } - public . ThrowsExactly() - where TException : { } - } - public class HashSetAssertion : .<., TItem>, ., .<., .>, .<.> - { - public HashSetAssertion(.? value, string expression) { } - protected override . CreateSetAdapter(. value) { } - public static . Create(. item, string label) { } - } - public abstract class ListAssertionBase : . - where TList : . - { - protected ListAssertionBase(. context) { } - public new . And { get; } - public new . Or { get; } - public . FirstItem() { } - public . HasItemAt(int index, TItem expected, [.("index")] string? indexExpression = null, [.("expected")] string? expectedExpression = null) { } - public new . IsNotNull() { } - public new . IsNull() { } - public . ItemAt(int index, [.("index")] string? expression = null) { } - public . LastItem() { } - } - public class ListAssertion : .<., TItem>, .<., .>, .<., .> - { - public ListAssertion(.? value, string? expression) { } - public static . Create(. item, string label) { } - public static . Create(. item, string label) { } - } - public class MemoryAndContinuation : . - { - protected override . CreateAdapter(TMemory value) { } - } - public abstract class MemoryAssertionBase : ., ., . - { - protected MemoryAssertionBase(. context) { } - public new . And { get; } - public new . Or { get; } - public . All( predicate, [.("predicate")] string? expression = null) { } - public . Any( predicate, [.("predicate")] string? expression = null) { } - public . Contains(TItem expected, [.("expected")] string? expression = null) { } - public . Contains(TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public . Count() { } - protected abstract . CreateAdapter(TMemory value); - public . DoesNotContain(TItem expected, [.("expected")] string? expression = null) { } - public . DoesNotContain(TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - protected override string GetExpectation() { } - public . HasDistinctItems() { } - public . HasSingleItem() { } - public . IsAssignableFrom() { } - public . IsAssignableTo() { } - public . IsEmpty() { } - [.("Collection equivalency uses structural comparison for complex objects, which requ" + - "ires reflection and is not compatible with AOT")] - public . IsEquivalentTo(. expected, . ordering = 0, [.("expected")] string? expectedExpression = null, [.("ordering")] string? orderingExpression = null) { } - public . IsEquivalentTo(. expected, . comparer, . ordering = 0, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null, [.("ordering")] string? orderingExpression = null) { } - public . IsInDescendingOrder() { } - public . IsInOrder() { } - public . IsNotAssignableFrom() { } - public . IsNotAssignableTo() { } - public . IsNotEmpty() { } - public . IsNotTypeOf() { } - public . IsTypeOf() { } - } - public class MemoryAssertion : .<, TItem>, ., .<> - { - public MemoryAssertion( value, string expression) { } - protected override . CreateAdapter( value) { } - } - public class MemoryOrContinuation : . - { - protected override . CreateAdapter(TMemory value) { } - } - public abstract class MutableDictionaryAssertionBase : .> - where TDictionary : . - where TKey : notnull - { - protected MutableDictionaryAssertionBase(. context) { } - public new . And { get; } - public new . Or { get; } - public . AllKeys( predicate, [.("predicate")] string? expression = null) { } - public . AllValues( predicate, [.("predicate")] string? expression = null) { } - public . AnyKey( predicate, [.("predicate")] string? expression = null) { } - public . AnyValue( predicate, [.("predicate")] string? expression = null) { } - public . ContainsKey(TKey expectedKey, [.("expectedKey")] string? expression = null) { } - public . ContainsKey(TKey expectedKey, .? comparer, [.("expectedKey")] string? keyExpression = null, [.("comparer")] string? comparerExpression = null) { } - public . ContainsKeyWithValue(TKey expectedKey, TValue expectedValue, [.("expectedKey")] string? keyExpression = null, [.("expectedValue")] string? valueExpression = null) { } - public . ContainsValue(TValue expectedValue, [.("expectedValue")] string? expression = null) { } - public new . Count() { } - public . DoesNotContainKey(TKey expectedKey, [.("expectedKey")] string? expression = null) { } - public . DoesNotContainValue(TValue expectedValue, [.("expectedValue")] string? expression = null) { } - protected override string GetExpectation() { } - public new . HasAtLeast(int minCount, [.("minCount")] string? expression = null) { } - public new . HasAtMost(int maxCount, [.("maxCount")] string? expression = null) { } - public new . HasCountBetween(int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public new . HasSingleItem() { } - public . HasSingleItem(<., bool> predicate, [.("predicate")] string? expression = null) { } - public new . IsEmpty() { } - public new . IsNotEmpty() { } - public new . IsNotNull() { } - public new . IsNull() { } - } - public class MutableDictionaryAssertion : .<., TKey, TValue>, .<., .>, .<., .> - where TKey : notnull - { - public MutableDictionaryAssertion(.? value, string? expression) { } - public static . Create(. item, string label) { } - public static . Create(. item, string label) { } - } - public abstract class ReadOnlyListAssertionBase : . - where TList : . - { - protected ReadOnlyListAssertionBase(. context) { } - public new . And { get; } - public new . Or { get; } - public . FirstItem() { } - public . HasItemAt(int index, TItem expected, .? comparer = null, [.("index")] string? indexExpression = null, [.("expected")] string? expectedExpression = null) { } - public new . IsNotNull() { } - public new . IsNull() { } - public . ItemAt(int index, [.("index")] string? indexExpression = null) { } - public . LastItem() { } - } - public class ReadOnlyListAssertion : .<., TItem>, .<., .> - { - public ReadOnlyListAssertion(.? value, string? expression) { } - public static . Create(. item, string label) { } - } - public class ReadOnlyMemoryAssertion : .<, TItem>, ., .<> - { - public ReadOnlyMemoryAssertion( value, string expression) { } - protected override . CreateAdapter( value) { } - } - public class ReadOnlySetAssertion : .<., TItem>, ., .<., .>, .<.> - { - public ReadOnlySetAssertion(.? value, string expression) { } - protected override . CreateSetAdapter(. value) { } - public static . Create(. item, string label) { } - } - public class SetAndContinuation : . - where TSet : . - { - protected override . CreateSetAdapter(TSet value) { } - } - public abstract class SetAssertionBase : . - where TSet : . - { - protected SetAssertionBase(. context) { } - public new . And { get; } - public new . Or { get; } - protected abstract . CreateSetAdapter(TSet value); - public . DoesNotOverlap(. other, [.("other")] string? expression = null) { } - protected override string GetExpectation() { } - public new . IsNotNull() { } - public new . IsNull() { } - public . IsProperSubsetOf(. other, [.("other")] string? expression = null) { } - public . IsProperSupersetOf(. other, [.("other")] string? expression = null) { } - public . IsSubsetOf(. other, [.("other")] string? expression = null) { } - public . IsSupersetOf(. other, [.("other")] string? expression = null) { } - public . Overlaps(. other, [.("other")] string? expression = null) { } - public . SetEquals(. other, [.("other")] string? expression = null) { } - } - public class SetAssertion : .<., TItem>, ., .<., .>, .<.> - { - public SetAssertion(.? value, string expression) { } - protected override . CreateSetAdapter(. value) { } - public static . Create(. item, string label) { } - } - public class SetOrContinuation : . - where TSet : . - { - protected override . CreateSetAdapter(TSet value) { } - } - public class TaskAssertion : ., .<.>, ., . - { - public TaskAssertion(. task, string? expression) { } - public . Context { get; } - public . IsAssignableFrom() { } - public . IsAssignableTo() { } - public .<.> IsCanceled() { } - public .<.> IsCompleted() { } - public .<.> IsCompletedSuccessfully() { } - public .<.> IsFaulted() { } - public . IsNotAssignableFrom() { } - public . IsNotAssignableTo() { } - public .<.> IsNotCanceled() { } - public .<.> IsNotCompleted() { } - public .<.> IsNotCompletedSuccessfully() { } - public .<.> IsNotFaulted() { } - public . IsNotTypeOf() { } - public . IsTypeOf() { } - public . Throws() - where TException : { } - public . ThrowsExactly() - where TException : { } - } - public sealed class TypeValueAssertion : .<> - { - public TypeValueAssertion(? value, string? expression) { } - public new . IsAssignableFrom() { } - public new . IsAssignableTo() { } - public new . IsNotAssignableFrom() { } - public new . IsNotAssignableTo() { } - } - public class ValueAssertion : ., . - { - protected ValueAssertion(. context) { } - public ValueAssertion(TValue? value, string? expression) { } - public . Context { get; } - public . IsAssignableFrom() { } - public . IsAssignableTo() { } - public . IsNotAssignableFrom() { } - public . IsNotAssignableTo() { } - public . IsNotTypeOf() { } - public . IsTypeOf() { } - } -} \ No newline at end of file diff --git a/tests/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet8_0.verified.txt b/tests/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet11_0.verified.txt similarity index 99% rename from tests/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet8_0.verified.txt rename to tests/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet11_0.verified.txt index e31e996ecdb..3b8391c833c 100644 --- a/tests/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet8_0.verified.txt +++ b/tests/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet11_0.verified.txt @@ -8,7 +8,7 @@ [assembly: .(@".Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] [assembly: .(@", PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] [assembly: .(@", PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")] +[assembly: .(".NETCoreApp,Version=v11.0", FrameworkDisplayName=".NET 11.0")] namespace { public abstract class AbstractDynamicTest diff --git a/tests/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet9_0.verified.txt b/tests/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet9_0.verified.txt deleted file mode 100644 index 94a52c83b3f..00000000000 --- a/tests/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet9_0.verified.txt +++ /dev/null @@ -1,3183 +0,0 @@ -[assembly: .(@".Core, PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(@", PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(@".Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(@", PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(@".Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(@".Microsoft, PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(@", PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(@".Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(@", PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(@", PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(".NETCoreApp,Version=v9.0", FrameworkDisplayName=".NET 9.0")] -namespace -{ - public abstract class AbstractDynamicTest - { - protected AbstractDynamicTest() { } - public int DynamicTestIndex { get; set; } - public abstract .<.DiscoveryResult> GetTests(); - } - public abstract class AbstractDynamicTest<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicMethods | ..NonPublicMethods | ..PublicFields | ..NonPublicFields | ..PublicProperties)] T> : .AbstractDynamicTest - where T : class - { - protected AbstractDynamicTest() { } - } - [.DebuggerDisplay("{.Name}.{}")] - public abstract class AbstractExecutableTest - { - protected AbstractExecutableTest() { } - public required object?[] Arguments { get; init; } - public object?[] ClassArguments { get; init; } - public . CompletionTask { get; } - public required .TestContext Context { get; init; } - public .ResolvedDependency[] Dependencies { get; set; } - public ? Duration { get; } - public ? EndTime { get; set; } - public .? ExecutionContext { get; set; } - public .? ExecutionTask { get; } - public .TestMetadata Metadata { get; init; } - public .TestResult? Result { get; set; } - public ? StartTime { get; set; } - public .TestState State { get; set; } - public required string TestId { get; init; } - public abstract . CreateInstanceAsync(); - public abstract . InvokeTestAsync(object instance, .CancellationToken cancellationToken); - public void SetResult(.TestState state, ? exception = null) { } - } - [(.Method)] - public sealed class AfterAttribute : .HookAttribute - { - public AfterAttribute(.HookType hookType, [.] string file = "", [.] int line = 0) { } - } - [(.Method)] - public sealed class AfterEveryAttribute : .HookAttribute - { - public AfterEveryAttribute(.HookType hookType, [.] string file = "", [.] int line = 0) { } - } - public abstract class ArgumentDisplayFormatter - { - protected ArgumentDisplayFormatter() { } - public abstract bool CanHandle(object? value); - public abstract string FormatValue(object? value); - } - public abstract class ArgumentDisplayFormatterAttribute : .TUnitAttribute, ., . - { - protected ArgumentDisplayFormatterAttribute() { } - public abstract .ArgumentDisplayFormatter Formatter { get; } - public virtual int Order { get; } - public . OnTestDiscovered(.DiscoveredTestContext context) { } - } - [(.Assembly | .Class | .Method, AllowMultiple=true)] - public class ArgumentDisplayFormatterAttribute : .ArgumentDisplayFormatterAttribute - where T : .ArgumentDisplayFormatter, new () - { - public ArgumentDisplayFormatterAttribute() { } - public override .ArgumentDisplayFormatter Formatter { get; } - } - [(.Class | .Method | .Property | .Parameter, AllowMultiple=true)] - public sealed class ArgumentsAttribute : , .IDataSourceAttribute, ., . - { - public ArgumentsAttribute(params object?[]? values) { } - public string[]? Categories { get; set; } - public bool DeferEnumeration { get; set; } - public string? DisplayName { get; set; } - public int Order { get; } - public string? Skip { get; set; } - public bool SkipIfEmpty { get; set; } - public object?[] Values { get; } - [.(typeof(.ArgumentsAttribute.d__26))] - public .<<.>> GetDataRowsAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - public . OnTestRegistered(.TestRegisteredContext context) { } - } - [(.Class | .Method | .Property | .Parameter, AllowMultiple=true)] - public sealed class ArgumentsAttribute : .TypedDataSourceAttribute, ., . - { - public ArgumentsAttribute(T value) { } - public string[]? Categories { get; set; } - public override bool DeferEnumeration { get; set; } - public string? DisplayName { get; set; } - public int Order { get; } - public string? Skip { get; set; } - public override bool SkipIfEmpty { get; set; } - [.(typeof(.ArgumentsAttribute.d__21))] - public override .<<.>> GetTypedDataRowsAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - public . OnTestRegistered(.TestRegisteredContext context) { } - } - public sealed class ArrayType : .TypeInfo, <.ArrayType> - { - public ArrayType(.TypeInfo ElementType, int Rank = 1) { } - public .TypeInfo ElementType { get; init; } - public int Rank { get; init; } - } - public class Artifact - { - public Artifact() { } - public string? Description { get; init; } - public required string DisplayName { get; init; } - public required .FileInfo File { get; init; } - } - [.DebuggerDisplay("{().Name}")] - public class AssemblyHookContext : .Context - { - public .<.TestContext> AllTests { get; } - public required .Assembly Assembly { get; init; } - public .<.ClassHookContext> TestClasses { get; } - public int TestCount { get; } - public .TestSessionContext TestSessionContext { get; } - public new static .AssemblyHookContext? Current { get; } - public void AddClass(.ClassHookContext classHookContext) { } - } - [.DebuggerDisplay("{Name})")] - public class AssemblyMetadata : <.AssemblyMetadata> - { - public AssemblyMetadata() { } - public required string Name { get; init; } - public virtual bool Equals(.AssemblyMetadata? other) { } - public override int GetHashCode() { } - public static .AssemblyMetadata GetOrAdd(string key, string name) { } - public static .AssemblyMetadata GetOrAdd(string name, <.AssemblyMetadata> factory) { } - } - public static class AsyncConvert - { - public static . Convert( action) { } - public static . Convert(<.> action) { } - public static . Convert(<.> action) { } - public static . ConvertObject(object? invoke) { } - [.("Trimming", "IL2075:\'this\' argument does not satisfy \'DynamicallyAccessedMembersAttribute\' in " + - "call to target method. The return value of the source method does not have match" + - "ing annotations.")] - public static bool TryGetAwaitableTask(object awaitable, [.(true)] out .? task) { } - } - [(.Class | .Method | .Property, AllowMultiple=true)] - public abstract class AsyncDataSourceGeneratorAttribute<[.(..PublicConstructors)] T> : .TypedDataSourceAttribute - { - protected AsyncDataSourceGeneratorAttribute() { } - protected abstract .<<.>> GenerateDataSourcesAsync(.DataGeneratorMetadata dataGeneratorMetadata); - public override sealed .<<.>> GetTypedDataRowsAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - [(.Class | .Method, AllowMultiple=true)] - public abstract class AsyncDataSourceGeneratorAttribute<[.(..PublicConstructors)] T1, [.(..PublicConstructors)] T2> : .TypedDataSourceAttribute<> - { - protected AsyncDataSourceGeneratorAttribute() { } - protected abstract .<<.<>>> GenerateDataSourcesAsync(.DataGeneratorMetadata dataGeneratorMetadata); - public override sealed .<<.<>>> GetTypedDataRowsAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - [(.Class | .Method, AllowMultiple=true)] - public abstract class AsyncDataSourceGeneratorAttribute<[.(..PublicConstructors)] T1, [.(..PublicConstructors)] T2, [.(..PublicConstructors)] T3> : .TypedDataSourceAttribute<> - { - protected AsyncDataSourceGeneratorAttribute() { } - protected abstract .<<.<>>> GenerateDataSourcesAsync(.DataGeneratorMetadata dataGeneratorMetadata); - public override sealed .<<.<>>> GetTypedDataRowsAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - [(.Class | .Method, AllowMultiple=true)] - public abstract class AsyncDataSourceGeneratorAttribute<[.(..PublicConstructors)] T1, [.(..PublicConstructors)] T2, [.(..PublicConstructors)] T3, [.(..PublicConstructors)] T4> : .TypedDataSourceAttribute<> - { - protected AsyncDataSourceGeneratorAttribute() { } - protected abstract .<<.<>>> GenerateDataSourcesAsync(.DataGeneratorMetadata dataGeneratorMetadata); - public override .<<.<>>> GetTypedDataRowsAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - [(.Class | .Method, AllowMultiple=true)] - public abstract class AsyncDataSourceGeneratorAttribute<[.(..PublicConstructors)] T1, [.(..PublicConstructors)] T2, [.(..PublicConstructors)] T3, [.(..PublicConstructors)] T4, [.(..PublicConstructors)] T5> : .TypedDataSourceAttribute<> - { - protected AsyncDataSourceGeneratorAttribute() { } - protected abstract .<<.<>>> GenerateDataSourcesAsync(.DataGeneratorMetadata dataGeneratorMetadata); - public override .<<.<>>> GetTypedDataRowsAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - public class AsyncEvent - { - public AsyncEvent() { } - public .<.AsyncEvent.Invocation> InvocationList { get; } - public void Add( callback, int order = 1073741823) { } - public void AddAt( callback, int index, int order = 1073741823) { } - public .AsyncEvent InsertAtFront( callback) { } - public static .AsyncEvent operator +(.AsyncEvent? e, callback) { } - public class Invocation : . - { - public Invocation( factory, int order) { } - public int Order { get; } - public . InvokeAsync(object sender, TEventArgs eventArgs) { } - } - } - [(.Class | .Method | .Property, AllowMultiple=true)] - public abstract class AsyncUntypedDataSourceGeneratorAttribute : , .IDataSourceAttribute - { - protected AsyncUntypedDataSourceGeneratorAttribute() { } - public virtual bool DeferEnumeration { get; set; } - public virtual bool SkipIfEmpty { get; set; } - public .<<.>> GenerateAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - protected abstract .<<.>> GenerateDataSourcesAsync(.DataGeneratorMetadata dataGeneratorMetadata); - public .<<.>> GetDataRowsAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - [(.Method)] - public abstract class BaseTestAttribute : .TUnitAttribute - { - public readonly string File; - public readonly int Line; - } - [(.Method)] - public sealed class BeforeAttribute : .HookAttribute - { - public BeforeAttribute(.HookType hookType, [.] string file = "", [.] int line = 0) { } - } - [(.Method)] - public sealed class BeforeEveryAttribute : .HookAttribute - { - public BeforeEveryAttribute(.HookType hookType, [.] string file = "", [.] int line = 0) { } - } - public class BeforeTestDiscoveryContext : .Context - { - public .GlobalContext GlobalContext { get; } - public . Settings { get; } - public required string? TestFilter { get; init; } - public new static .BeforeTestDiscoveryContext? Current { get; } - } - [(.Assembly | .Class | .Method, AllowMultiple=true)] - public class CategoryAttribute : .TUnitAttribute, ., . - { - public CategoryAttribute(string category) { } - public string Category { get; } - public int Order { get; } - public . OnTestDiscovered(.DiscoveredTestContext context) { } - } - [(.Assembly | .Class)] - public class ClassConstructorAttribute : .TUnitAttribute - { - public ClassConstructorAttribute([.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..PublicProperties)] classConstructorType) { } - [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..PublicProperties)] - public ClassConstructorType { get; init; } - } - [(.Assembly | .Class)] - public sealed class ClassConstructorAttribute<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..PublicProperties)] T> : .ClassConstructorAttribute - where T : ., new () - { - public ClassConstructorAttribute() { } - } - public class ClassConstructorMetadata : <.ClassConstructorMetadata> - { - public ClassConstructorMetadata() { } - public required .TestBuilderContext TestBuilderContext { get; init; } - public required string TestSessionId { get; init; } - } - [(.Class | .Method | .Property | .Parameter, AllowMultiple=true)] - public sealed class ClassDataSourceAttribute : .UntypedDataSourceGeneratorAttribute - { - public ClassDataSourceAttribute() { } - [.("Trimming", "IL2026:Members annotated with \'RequiresUnreferencedCodeAttribute\' require dynamic" + - " access otherwise can break functionality when trimming application code", Justification="Non-params constructor calls params one with proper annotations.")] - public ClassDataSourceAttribute([.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] type) { } - [.("Uses dynamically accessed types.")] - public ClassDataSourceAttribute(params [] types) { } - [.("Trimming", "IL2026:Members annotated with \'RequiresUnreferencedCodeAttribute\' require dynamic" + - " access otherwise can break functionality when trimming application code", Justification="Non-params constructor calls params one with proper annotations.")] - public ClassDataSourceAttribute([.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] type, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] type2) { } - [.("Trimming", "IL2026:Members annotated with \'RequiresUnreferencedCodeAttribute\' require dynamic" + - " access otherwise can break functionality when trimming application code", Justification="Non-params constructor calls params one with proper annotations.")] - public ClassDataSourceAttribute([.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] type, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] type2, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] type3) { } - [.("Trimming", "IL2026:Members annotated with \'RequiresUnreferencedCodeAttribute\' require dynamic" + - " access otherwise can break functionality when trimming application code", Justification="Non-params constructor calls params one with proper annotations.")] - public ClassDataSourceAttribute([.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] type, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] type2, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] type3, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] type4) { } - [.("Trimming", "IL2026:Members annotated with \'RequiresUnreferencedCodeAttribute\' require dynamic" + - " access otherwise can break functionality when trimming application code", Justification="Non-params constructor calls params one with proper annotations.")] - public ClassDataSourceAttribute([.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] type, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] type2, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] type3, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] type4, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] type5) { } - public string[] Keys { get; set; } - public .SharedType[] Shared { get; set; } - [.("Trimming", "IL2062:The parameter of method has a DynamicallyAccessedMembersAttribute, but the" + - " value passed to it can not be statically analyzed.", Justification="Constructor parameter is annotated with DynamicallyAccessedMembers, so _types ele" + - "ments have the required annotations.")] - protected override .<> GenerateDataSources(.DataGeneratorMetadata dataGeneratorMetadata) { } - public . GetKeys() { } - public .<.SharedType> GetSharedTypes() { } - } - [(.Class | .Method | .Property | .Parameter, AllowMultiple=true)] - public sealed class ClassDataSourceAttribute<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] T> : .DataSourceGeneratorAttribute - { - public ClassDataSourceAttribute() { } - public ClassType { get; } - public string Key { get; set; } - public .SharedType Shared { get; set; } - protected override .<> GenerateDataSources(.DataGeneratorMetadata dataGeneratorMetadata) { } - public . GetKeys() { } - public .<.SharedType> GetSharedTypes() { } - } - [(.Class | .Method, AllowMultiple=true)] - public sealed class ClassDataSourceAttribute<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] T1, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] T2> : .DataSourceGeneratorAttribute - where T1 : new() - where T2 : new() - { - public ClassDataSourceAttribute() { } - public string[] Keys { get; set; } - public .SharedType[] Shared { get; set; } - protected override .<<>> GenerateDataSources(.DataGeneratorMetadata dataGeneratorMetadata) { } - public . GetKeys() { } - public .<.SharedType> GetSharedTypes() { } - } - [(.Class | .Method, AllowMultiple=true)] - public sealed class ClassDataSourceAttribute<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] T1, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] T2, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] T3> : .DataSourceGeneratorAttribute - where T1 : new() - where T2 : new() - where T3 : new() - { - public ClassDataSourceAttribute() { } - public string[] Keys { get; set; } - public .SharedType[] Shared { get; set; } - protected override .<<>> GenerateDataSources(.DataGeneratorMetadata dataGeneratorMetadata) { } - public . GetKeys() { } - public .<.SharedType> GetSharedTypes() { } - } - [(.Class | .Method, AllowMultiple=true)] - public sealed class ClassDataSourceAttribute<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] T1, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] T2, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] T3, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] T4> : .DataSourceGeneratorAttribute - where T1 : new() - where T2 : new() - where T3 : new() - where T4 : new() - { - public ClassDataSourceAttribute() { } - public string[] Keys { get; set; } - public .SharedType[] Shared { get; set; } - protected override .<<>> GenerateDataSources(.DataGeneratorMetadata dataGeneratorMetadata) { } - public . GetKeys() { } - public .<.SharedType> GetSharedTypes() { } - } - [(.Class | .Method, AllowMultiple=true)] - public sealed class ClassDataSourceAttribute<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] T1, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] T2, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] T3, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] T4, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties | ..NonPublicProperties)] T5> : .DataSourceGeneratorAttribute - where T1 : new() - where T2 : new() - where T3 : new() - where T4 : new() - where T5 : new() - { - public ClassDataSourceAttribute() { } - public string[] Keys { get; set; } - public .SharedType[] Shared { get; set; } - protected override .<<>> GenerateDataSources(.DataGeneratorMetadata dataGeneratorMetadata) { } - public . GetKeys() { } - public .<.SharedType> GetSharedTypes() { } - } - [.DebuggerDisplay("{}")] - public class ClassHookContext : .Context - { - public .AssemblyHookContext AssemblyContext { get; } - [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..PublicProperties)] - public required ClassType { get; init; } - public int TestCount { get; } - public .<.TestContext> Tests { get; } - public new static .ClassHookContext? Current { get; } - public void AddTest(.TestContext testContext) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - } - [.DebuggerDisplay("{Type}")] - public class ClassMetadata : <.ClassMetadata>, .IMemberMetadata - { - public ClassMetadata() { } - public required .AssemblyMetadata Assembly { get; init; } - public ? ConstructorFactory { get; init; } - public bool HasRequiredProperties { get; init; } - public []? ImplementedInterfaces { get; init; } - public ? InitializeRequiredProperties { get; init; } - public required string Name { get; init; } - public required string? Namespace { get; init; } - public ? ParameterlessFactory { get; init; } - public required .ParameterMetadata[] Parameters { get; init; } - public required .ClassMetadata? Parent { get; init; } - public required .PropertyMetadata[] Properties { get; init; } - public int TestConstructorIndex { get; init; } - [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicMethods | ..PublicProperties)] - public required Type { get; init; } - public required .TypeInfo TypeInfo { get; init; } - public virtual bool Equals(.ClassMetadata? other) { } - public override int GetHashCode() { } - public static .ClassMetadata GetOrAdd(string name, <.ClassMetadata> factory) { } - public static .ClassMetadata GetOrAdd(string name, .ClassMetadata value) { } - } - [(.Assembly | .Class)] - public sealed class ClassTimelineAttribute : .TUnitAttribute, .IScopedAttribute, ., . - { - public ClassTimelineAttribute(. mode) { } - public . Mode { get; } - public int Order { get; } - public ScopeType { get; } - public . OnTestDiscovered(.DiscoveredTestContext context) { } - } - [(.Class | .Method)] - public sealed class CombinedDataSourcesAttribute : .AsyncUntypedDataSourceGeneratorAttribute - { - public CombinedDataSourcesAttribute() { } - [.(typeof(.CombinedDataSourcesAttribute.d__0))] - protected override .<<.>> GenerateDataSourcesAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - public sealed class ConcreteType : .TypeInfo, <.ConcreteType> - { - public ConcreteType( Type) { } - public Type { get; init; } - public override string ToString() { } - } - public sealed class ConstructedGeneric : .TypeInfo, <.ConstructedGeneric> - { - public ConstructedGeneric( GenericDefinition, .TypeInfo[] TypeArguments) { } - public GenericDefinition { get; init; } - public .TypeInfo[] TypeArguments { get; init; } - public override string ToString() { } - } - public abstract class Context : , . - { - public .TextWriter ErrorOutputWriter { get; } - public .TextWriter OutputWriter { get; } - protected .Context? Parent { get; } - public static .Context Current { get; } - public void AddAsyncLocalValues() { } - public void Dispose() { } - public . GetDefaultLogger() { } - public virtual string GetErrorOutput() { } - public virtual string GetStandardOutput() { } - public void RestoreExecutionContext() { } - } - public class CultureExecutor : .DedicatedThreadExecutor - { - public CultureExecutor(.CultureInfo cultureInfo) { } - protected override void ConfigureThread(.Thread thread) { } - } - public class DataGenerationException : - { - public DataGenerationException(string message) { } - public DataGenerationException(string message, innerException) { } - public DataGenerationException(string message, object? dataSource) { } - public DataGenerationException(string message, object? dataSource, innerException) { } - public object? DataSource { get; } - public string? DataSourceTypeName { get; } - public string? TestClassName { get; } - public string? TestMethodName { get; } - public override string ToString() { } - public .DataGenerationException WithTestContext(string? className, string? methodName) { } - } - public class DataGeneratorMetadata : <.DataGeneratorMetadata> - { - public DataGeneratorMetadata() { } - public required object?[]? ClassInstanceArguments { get; init; } - public <, .>? InstanceFactory { get; init; } - public required .IMemberMetadata[] MembersToGenerate { get; init; } - public required .TestBuilderContextAccessor TestBuilderContext { get; init; } - public required object? TestClassInstance { get; init; } - public required .MethodMetadata? TestInformation { get; init; } - public required string TestSessionId { get; init; } - public required . Type { get; init; } - } - public sealed class DataSourceContext - { - public DataSourceContext( testClassType, .DataSourceLevel level, .MemberInfo? targetMember = null, .ParameterInfo? targetParameter = null, .<>? attributes = null, ? serviceProvider = null) { } - public .<> Attributes { get; } - public .DataSourceLevel Level { get; } - public ? ServiceProvider { get; } - public .MemberInfo? TargetMember { get; } - public .ParameterInfo? TargetParameter { get; } - public TestClassType { get; } - } - public class DataSourceException : .TestBuilderException - { - public DataSourceException(string dataSourceName, innerException) { } - public DataSourceException(string dataSourceName, string message) { } - public string DataSourceName { get; } - public static .DataSourceException FromNestedFailure(string message, innerException) { } - } - [(.Class | .Method | .Property | .Parameter, AllowMultiple=true)] - public abstract class DataSourceGeneratorAttribute<[.(..PublicConstructors)] T> : .AsyncDataSourceGeneratorAttribute - { - protected DataSourceGeneratorAttribute() { } - protected abstract .<> GenerateDataSources(.DataGeneratorMetadata dataGeneratorMetadata); - [.(typeof(.DataSourceGeneratorAttribute.d__1))] - protected override .<<.>> GenerateDataSourcesAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - [(.Class | .Method | .Parameter, AllowMultiple=true)] - public abstract class DataSourceGeneratorAttribute<[.(..PublicConstructors)] T1, [.(..PublicConstructors)] T2> : .AsyncDataSourceGeneratorAttribute - { - protected DataSourceGeneratorAttribute() { } - protected abstract .<<>> GenerateDataSources(.DataGeneratorMetadata dataGeneratorMetadata); - [.(typeof(.DataSourceGeneratorAttribute.d__1))] - protected override .<<.<>>> GenerateDataSourcesAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - [(.Class | .Method | .Parameter, AllowMultiple=true)] - public abstract class DataSourceGeneratorAttribute<[.(..PublicConstructors)] T1, [.(..PublicConstructors)] T2, [.(..PublicConstructors)] T3> : .AsyncDataSourceGeneratorAttribute - { - protected DataSourceGeneratorAttribute() { } - protected abstract .<<>> GenerateDataSources(.DataGeneratorMetadata dataGeneratorMetadata); - [.(typeof(.DataSourceGeneratorAttribute.d__1))] - protected override sealed .<<.<>>> GenerateDataSourcesAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - [(.Class | .Method | .Parameter, AllowMultiple=true)] - public abstract class DataSourceGeneratorAttribute<[.(..PublicConstructors)] T1, [.(..PublicConstructors)] T2, [.(..PublicConstructors)] T3, [.(..PublicConstructors)] T4> : .AsyncDataSourceGeneratorAttribute - { - protected DataSourceGeneratorAttribute() { } - protected abstract .<<>> GenerateDataSources(.DataGeneratorMetadata dataGeneratorMetadata); - [.(typeof(.DataSourceGeneratorAttribute.d__1))] - protected override .<<.<>>> GenerateDataSourcesAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - [(.Class | .Method | .Parameter, AllowMultiple=true)] - public abstract class DataSourceGeneratorAttribute<[.(..PublicConstructors)] T1, [.(..PublicConstructors)] T2, [.(..PublicConstructors)] T3, [.(..PublicConstructors)] T4, [.(..PublicConstructors)] T5> : .AsyncDataSourceGeneratorAttribute - { - protected DataSourceGeneratorAttribute() { } - protected abstract .<<>> GenerateDataSources(.DataGeneratorMetadata dataGeneratorMetadata); - [.(typeof(.DataSourceGeneratorAttribute.d__1))] - protected override .<<.<>>> GenerateDataSourcesAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - public enum DataSourceLevel - { - Class = 0, - Method = 1, - Property = 2, - Parameter = 3, - } - public class DedicatedThreadExecutor : .GenericAbstractExecutor, ., . - { - public DedicatedThreadExecutor() { } - protected virtual void CleanUp() { } - protected virtual void ConfigureThread(.Thread thread) { } - protected override sealed . ExecuteAsync(<.> action) { } - protected virtual void Initialize() { } - public . OnTestRegistered(.TestRegisteredContext context) { } - } - public class DefaultExecutor : .GenericAbstractExecutor - { - public static readonly .DefaultExecutor Instance; - protected override . ExecuteAsync(<.> action) { } - } - [("Use instead.")] - public static class Defaults - { - [("Use .ForcefulExitTimeout instead.")] - public static ForcefulExitTimeout { get; } - [("Use .DefaultHookTimeout instead.")] - public static HookTimeout { get; } - [("Use .ProcessExitHookDelay instead.")] - public static ProcessExitHookDelay { get; } - [("Use .DefaultTestTimeout instead.")] - public static TestTimeout { get; } - } - public abstract class DependencyInjectionDataSourceAttribute : .UntypedDataSourceGeneratorAttribute - { - protected DependencyInjectionDataSourceAttribute() { } - public abstract object? Create(TScope scope, type); - public abstract TScope CreateScope(.DataGeneratorMetadata dataGeneratorMetadata); - protected override .<> GenerateDataSources(.DataGeneratorMetadata dataGeneratorMetadata) { } - protected virtual bool ScopeOwnsCreatedObjects(TScope scope) { } - } - [(.Class | .Method, AllowMultiple=true)] - public class DependsOnAttribute : .TUnitAttribute - { - public DependsOnAttribute( testClass) { } - public DependsOnAttribute(string testName) { } - public DependsOnAttribute( testClass, string testName) { } - public DependsOnAttribute(string testName, [] parameterTypes) { } - public DependsOnAttribute( testClass, string testName, [] parameterTypes) { } - public ? ClassMetadata { get; } - public []? ParameterTypes { get; } - public bool ProceedOnFailure { get; set; } - public string? TestName { get; } - public override string ToString() { } - public .TestDependency ToTestDependency() { } - } - [(.Class | .Method, AllowMultiple=true)] - public class DependsOnAttribute : .DependsOnAttribute - { - public DependsOnAttribute() { } - public DependsOnAttribute(string testName) { } - public DependsOnAttribute(string testName, [] parameterTypes) { } - } - public abstract class DiscoveredTest - { - protected DiscoveredTest() { } - public required .TestContext TestContext { get; init; } - public .TestDetails TestDetails { get; } - public .? TestExecutor { get; set; } - } - public class DiscoveredTestContext - { - public DiscoveredTestContext(string testName, .TestContext testContext) { } - public .<> ArgumentDisplayFormatters { get; } - public .TestContext TestContext { get; } - public .TestDetails TestDetails { get; } - public string TestName { get; } - public void AddArgumentDisplayFormatter(.ArgumentDisplayFormatter formatter) { } - public void AddCategory(string category) { } - public void AddParallelConstraint(. constraint) { } - public void AddProperty(string key, string value) { } - public string GetDisplayName() { } - public void SetDisplayName(string displayName) { } - public void SetDisplayNameFormatter( formatterType) { } - public void SetPriority(. priority) { } - public void SetRetryBackoff(int backoffMs, double backoffMultiplier) { } - public void SetRetryLimit(int retryLimit) { } - public void SetRetryLimit(int retryCount, <.TestContext, , int, .> shouldRetry) { } - } - public class DiscoveredTest : .DiscoveredTest - where T : class - { - public DiscoveredTest() { } - } - public sealed class DiscoveryFailure : <.DiscoveryFailure> - { - public DiscoveryFailure() { } - public required Exception { get; init; } - public string Reason { get; } - public string? TestClassName { get; init; } - public required string TestFilePath { get; init; } - public required string TestId { get; init; } - public required int TestLineNumber { get; init; } - public required string TestMethodName { get; init; } - } - public class DiscoveryResult - { - public DiscoveryResult() { } - public static .DiscoveryResult Empty { get; } - } - [(.Class | .Method, Inherited=false)] - public sealed class DisplayNameAttribute : .DisplayNameFormatterAttribute, .IScopedAttribute - { - public DisplayNameAttribute(string displayName) { } - public ScopeType { get; } - protected override string FormatDisplayName(.DiscoveredTestContext context) { } - } - [(.Assembly | .Class | .Method, Inherited=false)] - public abstract class DisplayNameFormatterAttribute : .TUnitAttribute, ., . - { - protected DisplayNameFormatterAttribute() { } - public int Order { get; } - protected abstract string FormatDisplayName(.DiscoveredTestContext context); - public . OnTestDiscovered(.DiscoveredTestContext context) { } - } - public class DynamicDiscoveryResult : .DiscoveryResult - { - public DynamicDiscoveryResult() { } - public .<> Attributes { get; set; } - public string? CreatorFilePath { get; set; } - public int? CreatorLineNumber { get; set; } - public string? DisplayName { get; set; } - public int DynamicTestIndex { get; set; } - public string? ParentTestId { get; set; } - public .? Properties { get; set; } - public .? Relationship { get; set; } - public object?[]? TestClassArguments { get; set; } - [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicMethods | ..NonPublicMethods | ..PublicFields | ..NonPublicFields | ..PublicProperties)] - public ? TestClassType { get; set; } - public .? TestMethod { get; set; } - public object?[]? TestMethodArguments { get; set; } - } - public class DynamicTestBuilderAttribute : .BaseTestAttribute - { - public DynamicTestBuilderAttribute([.] string file = "", [.] int line = 0) { } - } - public class DynamicTestBuilderContext - { - public DynamicTestBuilderContext(string filePath, int lineNumber) { } - public string FilePath { get; } - public int LineNumber { get; } - public .<.AbstractDynamicTest> Tests { get; } - [.("Adding dynamic tests requires reflection which is not supported in native AOT sce" + - "narios.")] - public void AddTest(.AbstractDynamicTest test) { } - } - public static class DynamicTestHelper - { - public static T Argument() { } - } - public sealed class DynamicTestMetadata : .TestMetadata, .IDynamicTestMetadata - { - public DynamicTestMetadata(.DynamicDiscoveryResult dynamicResult) { } - public override <.ExecutableTestCreationContext, .TestMetadata, .AbstractExecutableTest> CreateExecutableTestFactory { get; } - public string? DisplayName { get; } - public int DynamicTestIndex { get; } - public string? ParentTestId { get; } - public .? Properties { get; } - public .? Relationship { get; } - } - public class DynamicTest<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicMethods | ..NonPublicMethods | ..PublicFields | ..NonPublicFields | ..PublicProperties)] T> : .AbstractDynamicTest, .IDynamicTestCreatorLocation - where T : class - { - public DynamicTest() { } - public .<> Attributes { get; set; } - public string? CreatorFilePath { get; set; } - public int? CreatorLineNumber { get; set; } - public string? DisplayName { get; set; } - public object?[]? TestClassArguments { get; set; } - public .<>? TestMethod { get; set; } - public object?[]? TestMethodArguments { get; set; } - public override .<.DiscoveryResult> GetTests() { } - } - public class EngineCancellationToken : - { - public EngineCancellationToken() { } - public .CancellationToken Token { get; } - public void Dispose() { } - } - public sealed class ExcludeOnAttribute : .SkipAttribute - { - public ExcludeOnAttribute(. OperatingSystem) { } - public override . ShouldSkip(.TestRegisteredContext context) { } - } - public sealed class ExecutableTest : .AbstractExecutableTest - { - public ExecutableTest(<.TestContext, .> createInstance, invokeTest) { } - public override . CreateInstanceAsync() { } - public override . InvokeTestAsync(object instance, .CancellationToken cancellationToken) { } - } - public sealed class ExecutableTestCreationContext - { - public ExecutableTestCreationContext() { } - public required object?[] Arguments { get; init; } - public required object?[] ClassArguments { get; init; } - public required .TestContext Context { get; init; } - public required string DisplayName { get; init; } - public [] ResolvedClassGenericArguments { get; init; } - public [] ResolvedMethodGenericArguments { get; init; } - public <.>? TestClassInstanceFactory { get; init; } - public required string TestId { get; init; } - } - [(.Assembly | .Class | .Method)] - public class ExecutionPriorityAttribute : .SingleTUnitAttribute, .IScopedAttribute, ., . - { - public ExecutionPriorityAttribute(. priority = 2) { } - public int Order { get; } - public . Priority { get; } - public ScopeType { get; } - public . OnTestDiscovered(.DiscoveredTestContext context) { } - } - public class ExpandedTest - { - public ExpandedTest() { } - public object?[]? ClassArguments { get; init; } - public bool IsSkipped { get; init; } - public object?[]? MethodArguments { get; init; } - public required .MethodMetadata MethodMetadata { get; init; } - public .? PropertyValues { get; init; } - public string? SkipReason { get; init; } - public required string TestFilePath { get; init; } - public required string TestId { get; init; } - public required object TestInstance { get; init; } - public required int TestLineNumber { get; init; } - public required .MethodInfo TestMethod { get; init; } - public required string TestName { get; init; } - public ? Timeout { get; init; } - } - [(.Class | .Method)] - public sealed class ExplicitAttribute : .TUnitAttribute - { - public ExplicitAttribute([.] string callerFile = "", [.] string callerMemberName = "") { } - public string For { get; } - } - public class FailedDynamicTest<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicMethods | ..NonPublicMethods | ..PublicProperties)] T> : .AbstractDynamicTest - where T : class - { - public FailedDynamicTest() { } - public Exception { get; set; } - public string MethodName { get; set; } - public string TestFilePath { get; set; } - public string TestId { get; set; } - public int TestLineNumber { get; set; } - public override .<.DiscoveryResult> GetTests() { } - } - [(.Class | .Method, AllowMultiple=true)] - public sealed class GenerateGenericTestAttribute : - { - public GenerateGenericTestAttribute(params [] typeArguments) { } - public [] TypeArguments { get; } - } - public abstract class GenericAbstractExecutor : ., . - { - protected GenericAbstractExecutor() { } - public int Order { get; } - public . ExecuteAfterAssemblyHook(.MethodMetadata hookMethodInfo, .AssemblyHookContext context, <.> action) { } - public . ExecuteAfterClassHook(.MethodMetadata hookMethodInfo, .ClassHookContext context, <.> action) { } - public . ExecuteAfterTestDiscoveryHook(.MethodMetadata hookMethodInfo, .TestDiscoveryContext context, <.> action) { } - public . ExecuteAfterTestHook(.MethodMetadata hookMethodInfo, .TestContext context, <.> action) { } - public . ExecuteAfterTestSessionHook(.MethodMetadata hookMethodInfo, .TestSessionContext context, <.> action) { } - protected abstract . ExecuteAsync(<.> action); - public . ExecuteBeforeAssemblyHook(.MethodMetadata hookMethodInfo, .AssemblyHookContext context, <.> action) { } - public . ExecuteBeforeClassHook(.MethodMetadata hookMethodInfo, .ClassHookContext context, <.> action) { } - public . ExecuteBeforeTestDiscoveryHook(.MethodMetadata hookMethodInfo, .BeforeTestDiscoveryContext context, <.> action) { } - public . ExecuteBeforeTestHook(.MethodMetadata hookMethodInfo, .TestContext context, <.> action) { } - public . ExecuteBeforeTestSessionHook(.MethodMetadata hookMethodInfo, .TestSessionContext context, <.> action) { } - public . ExecuteTest(.TestContext context, <.> action) { } - } - public enum GenericClassRowFallback - { - None = 0, - AllRows = 1, - NoClassRow = 2, - } - public static class GenericClassRowPartition - { - public static .IDataSourceAttribute ConfigureInferredSource(.IDataSourceAttribute source, bool filterRows, params [] classTypeArguments) { } - public static .IDataSourceAttribute[] Create([] classTypeArguments, .GenericClassRowFallback fallback, .IDataSourceAttribute[] dataSources, params int[] partitionedIndices) { } - } - public class GenericConstraintViolationDataSource : , .IDataSourceAttribute - { - public bool DeferEnumeration { get; set; } - public .IDataSourceAttribute? InnerDataSource { get; } - public string Message { get; } - public bool SkipIfEmpty { get; set; } - [.(typeof(.GenericConstraintViolationDataSource.d__15))] - public .<<.>> GetDataRowsAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - public static .GenericConstraintViolationDataSource Create(string message) { } - public static .GenericConstraintViolationDataSource Create(string message, .IDataSourceAttribute innerDataSource) { } - } - public sealed class GenericConstraintViolationEntry - { - public GenericConstraintViolationEntry() { } - public <[]>? AttributeFactory { get; init; } - public .IDataSourceAttribute[]? DataSources { get; init; } - public required string FilePath { get; init; } - public required int LineNumber { get; init; } - public required string[] Messages { get; init; } - public required .MethodMetadata MethodMetadata { get; init; } - public required string MethodName { get; init; } - } - public sealed class GenericMethodInfo - { - public GenericMethodInfo() { } - public .GenericParameterConstraints[] Constraints { get; init; } - public string[] ParameterNames { get; init; } - public int[] ParameterPositions { get; init; } - } - public sealed class GenericParameter : .TypeInfo, <.GenericParameter> - { - public GenericParameter(int Position, bool IsMethodParameter, string? Name = null) { } - public bool IsMethodParameter { get; init; } - public string? Name { get; init; } - public int Position { get; init; } - public override string ToString() { } - } - public sealed class GenericParameterConstraints - { - public GenericParameterConstraints() { } - public ? BaseTypeConstraint { get; init; } - public bool HasDefaultConstructorConstraint { get; init; } - public bool HasNotNullConstraint { get; init; } - public bool HasReferenceTypeConstraint { get; init; } - public bool HasValueTypeConstraint { get; init; } - public [] InterfaceConstraints { get; init; } - public required string ParameterName { get; init; } - } - public sealed class GenericTestMetadata : .TestMetadata - { - public GenericTestMetadata() { } - public .? ConcreteInstantiations { get; init; } - public override <.ExecutableTestCreationContext, .TestMetadata, .AbstractExecutableTest> CreateExecutableTestFactory { get; } - } - public sealed class GenericTypeInfo - { - public GenericTypeInfo() { } - public .GenericParameterConstraints[] Constraints { get; init; } - public string[] ParameterNames { get; init; } - } - public class GlobalContext : .Context - { - public . GlobalLogger { get; } - public .TextWriter OriginalConsoleError { get; set; } - public .TextWriter OriginalConsoleOut { get; set; } - public string? TestFilter { get; } - public new static .GlobalContext Current { get; } - } - public class GlobalSharedDataKey : .SharedDataKey, <.GlobalSharedDataKey> - { - public static readonly RandomKey; - public GlobalSharedDataKey( Type) { } - } - public class HookAttribute : .TUnitAttribute - { - public string File { get; } - public .HookType HookType { get; } - public int Line { get; } - public int Order { get; init; } - } - public class HookRegisteredContext - { - public HookRegisteredContext(. hookMethod) { } - public .? HookExecutor { get; set; } - public . HookMethod { get; } - public string HookName { get; } - public ? Timeout { get; set; } - } - public static class HookRegistrationIndices - { - public static int GetNextAfterAssemblyHookIndex() { } - public static int GetNextAfterClassHookIndex() { } - public static int GetNextAfterEveryAssemblyHookIndex() { } - public static int GetNextAfterEveryClassHookIndex() { } - public static int GetNextAfterEveryTestHookIndex() { } - public static int GetNextAfterTestDiscoveryHookIndex() { } - public static int GetNextAfterTestHookIndex() { } - public static int GetNextAfterTestSessionHookIndex() { } - public static int GetNextBeforeAssemblyHookIndex() { } - public static int GetNextBeforeClassHookIndex() { } - public static int GetNextBeforeEveryAssemblyHookIndex() { } - public static int GetNextBeforeEveryClassHookIndex() { } - public static int GetNextBeforeEveryTestHookIndex() { } - public static int GetNextBeforeTestDiscoveryHookIndex() { } - public static int GetNextBeforeTestHookIndex() { } - public static int GetNextBeforeTestSessionHookIndex() { } - } - public enum HookType - { - Test = 0, - Class = 1, - Assembly = 2, - TestSession = 3, - TestDiscovery = 4, - } - public interface IAccessesInstanceData { } - public interface IDataSourceAttribute - { - bool DeferEnumeration { get; set; } - bool SkipIfEmpty { get; set; } - .<<.>> GetDataRowsAsync(.DataGeneratorMetadata dataGeneratorMetadata); - } - public interface IDataSourceMemberAttribute { } - public interface IDynamicTestCreatorLocation - { - string? CreatorFilePath { get; set; } - int? CreatorLineNumber { get; set; } - } - public interface IDynamicTestMetadata - { - string? DisplayName { get; } - int DynamicTestIndex { get; } - } - public interface IDynamicTestSource - { - .<.AbstractDynamicTest> CollectDynamicTests(string sessionId); - } - public interface IMemberMetadata - { - string Name { get; } - } - public interface IRequiresImmediateInitialization { } - public interface IScopedAttribute - { - ScopeType { get; } - } - public interface ITestDefinition { } - public interface ITestEntrySource - { - string ClassName { get; } - ClassType { get; } - int Count { get; } - .TestEntryFilterData GetFilterData(int index); - .<.TestMetadata> Materialize(int index, string testSessionId); - } - public interface ITypedDataSourceAttribute : .IDataSourceAttribute - { - .<<.>> GetTypedDataRowsAsync(.DataGeneratorMetadata dataGeneratorMetadata); - } - [(.Class)] - public sealed class InheritsTestsAttribute : .TUnitAttribute - { - public InheritsTestsAttribute() { } - } - public sealed class InjectableProperty - { - public InjectableProperty() { } - public required .IDataSourceAttribute DataSource { get; init; } - public required string Name { get; init; } - public required SetValue { get; init; } - public required Type { get; init; } - } - [(.Method | .Property, AllowMultiple=true)] - public class InstanceMethodDataSourceAttribute : .MethodDataSourceAttribute, .IAccessesInstanceData - { - public InstanceMethodDataSourceAttribute(string methodNameProvidingDataSource) { } - public InstanceMethodDataSourceAttribute([.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..NonPublicMethods | ..PublicProperties)] classProvidingDataSource, string methodNameProvidingDataSource) { } - } - public class InvalidTestMetadataException : .TestBuilderException - { - public InvalidTestMetadataException(string message, .TestMetadata metadata) { } - public InvalidTestMetadataException(string message, .TestMetadata metadata, innerException) { } - } - [(.Parameter)] - public class MatrixAttribute : .TUnitAttribute, .IDataSourceMemberAttribute - { - protected MatrixAttribute() { } - public MatrixAttribute(params object?[]? objects) { } - public object?[]? Excluding { get; init; } - public virtual object?[] GetObjects(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - [(.Parameter)] - public class MatrixAttribute : .MatrixAttribute, . - { - public MatrixAttribute(params T?[]? objects) { } - } - [(.Class | .Method)] - public sealed class MatrixDataSourceAttribute : .UntypedDataSourceGeneratorAttribute, .IAccessesInstanceData - { - public MatrixDataSourceAttribute() { } - protected override .<> GenerateDataSources(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - [(.Class | .Method, AllowMultiple=true)] - public class MatrixExclusionAttribute : .TUnitAttribute - { - public MatrixExclusionAttribute(params object?[]? objects) { } - public object?[] Objects { get; } - } - [(.Parameter)] - public class MatrixInstanceMethodAttribute<[.(..None | ..PublicMethods | ..NonPublicMethods | ..PublicProperties)] TClass> : .MatrixMethodAttribute, .IAccessesInstanceData - where TClass : class - { - public MatrixInstanceMethodAttribute(string methodName) { } - } - [(.Parameter)] - public class MatrixMethodAttribute<[.(..None | ..PublicMethods | ..NonPublicMethods)] TClass> : .MatrixAttribute - where TClass : class - { - public MatrixMethodAttribute(string methodName) { } - public override object?[] GetObjects(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - [(.Parameter)] - public class MatrixRangeAttribute : .MatrixAttribute - where T : .INumber - { - public MatrixRangeAttribute(T min, T max) { } - public MatrixRangeAttribute(T min, T max, T step) { } - } - public abstract class MemberMetadata : <.MemberMetadata> - { - protected MemberMetadata() { } - public required string Name { get; init; } - [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicMethods | ..PublicProperties)] - public abstract Type { get; init; } - public virtual bool Equals(.MemberMetadata? other) { } - public override int GetHashCode() { } - protected virtual bool PrintMembers(.StringBuilder stringBuilder) { } - } - [(.Class | .Method | .Property | .Parameter, AllowMultiple=true)] - public class MethodDataSourceAttribute : , .IDataSourceAttribute - { - public MethodDataSourceAttribute(string methodNameProvidingDataSource) { } - public MethodDataSourceAttribute([.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..NonPublicMethods | ..PublicProperties)] classProvidingDataSource, string methodNameProvidingDataSource) { } - public object?[] Arguments { get; set; } - [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..NonPublicMethods | ..PublicProperties)] - public ? ClassProvidingDataSource { get; } - public bool DeferEnumeration { get; set; } - public <.DataGeneratorMetadata, .<<.>>>? Factory { get; set; } - public string MethodNameProvidingDataSource { get; } - public bool SkipIfEmpty { get; set; } - [.("Trimming", "IL2072", Justification="Method data sources require runtime discovery. AOT users should use Factory prope" + - "rty.")] - [.("Trimming", "IL2075", Justification="Method data sources require runtime discovery. AOT users should use Factory prope" + - "rty.")] - [.(typeof(.MethodDataSourceAttribute.d__34))] - public .<<.>> GetDataRowsAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - [(.Class | .Method | .Property | .Parameter, AllowMultiple=true)] - public class MethodDataSourceAttribute<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..NonPublicMethods | ..PublicProperties)] T> : .MethodDataSourceAttribute - { - public MethodDataSourceAttribute(string methodNameProvidingDataSource) { } - } - [.DebuggerDisplay("{Type}.{Name}")] - public class MethodMetadata : <.MethodMetadata>, .IMemberMetadata - { - public MethodMetadata() { } - public required .ClassMetadata Class { get; init; } - public required int GenericTypeCount { get; init; } - public required string Name { get; init; } - public required .ParameterMetadata[] Parameters { get; init; } - public ? ReturnType { get; init; } - public required .TypeInfo ReturnTypeInfo { get; init; } - [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicMethods | ..NonPublicMethods | ..PublicProperties)] - public required Type { get; init; } - public required .TypeInfo TypeInfo { get; init; } - public virtual bool Equals(.MethodMetadata? other) { } - public override int GetHashCode() { } - protected virtual bool PrintMembers(.StringBuilder stringBuilder) { } - } - public static class MethodMetadataFactory - { - [.("ReflectionAnalysis", "IL2067", Justification="Factory is only called from generated code that always passes concrete types")] - public static .MethodMetadata Create(string name, type, returnType, .ClassMetadata classMetadata, int genericTypeCount = 0, .ParameterMetadata[]? parameters = null) { } - } - public sealed class NoDataSource : .IDataSourceAttribute - { - public static readonly .NoDataSource Instance; - public bool DeferEnumeration { get; set; } - public bool SkipIfEmpty { get; set; } - [.(typeof(.NoDataSource.d__9))] - public .<<.>> GetDataRowsAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - [(.Assembly | .Class | .Method, AllowMultiple=false, Inherited=true)] - public class NotDiscoverableAttribute : .TUnitAttribute, ., . - { - public NotDiscoverableAttribute() { } - public NotDiscoverableAttribute(string reason) { } - public int Order { get; } - public string? Reason { get; } - public . OnTestRegistered(.TestRegisteredContext context) { } - public virtual . ShouldHide(.TestRegisteredContext context) { } - } - [(.Assembly | .Class | .Method)] - public class NotInParallelAttribute : .SingleTUnitAttribute, .IScopedAttribute, ., . - { - public NotInParallelAttribute() { } - public NotInParallelAttribute(string constraintKey) { } - public NotInParallelAttribute(string[] constraintKeys) { } - public string[] ConstraintKeys { get; } - public int Order { get; init; } - public ScopeType { get; } - public . OnTestDiscovered(.DiscoveredTestContext context) { } - } - public class NotInParallelConstraint : <.NotInParallelConstraint>, . - { - public NotInParallelConstraint(. NotInParallelConstraintKeys) { } - public . NotInParallelConstraintKeys { get; init; } - public int Order { get; set; } - } - [(.Class | .Method)] - public sealed class PairwiseDataSourceAttribute : .UntypedDataSourceGeneratorAttribute, .IAccessesInstanceData - { - public const int DefaultSeed = 15485863; - public PairwiseDataSourceAttribute() { } - public int Seed { get; set; } - protected override .<> GenerateDataSources(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - public class ParallelGroupAttribute : .TUnitAttribute, ., . - { - public ParallelGroupAttribute(string group) { } - public string Group { get; } - public int Order { get; set; } - public . OnTestDiscovered(.DiscoveredTestContext context) { } - } - public class ParallelGroupConstraint : , <.ParallelGroupConstraint>, <.ParallelGroupConstraint>, . - { - public ParallelGroupConstraint(string Group, int Order) { } - public string Group { get; init; } - public int Order { get; init; } - public int CompareTo(.ParallelGroupConstraint? other) { } - public int CompareTo(object? obj) { } - public virtual bool Equals(.ParallelGroupConstraint? other) { } - public override int GetHashCode() { } - } - public class ParallelLimitLockProvider - { - public ParallelLimitLockProvider() { } - } - [(.Assembly | .Class | .Method)] - public sealed class ParallelLimiterAttribute : .TUnitAttribute, ., . - where TParallelLimit : ., new () - { - public ParallelLimiterAttribute() { } - public int Order { get; } - public . OnTestRegistered(.TestRegisteredContext context) { } - } - [.DebuggerDisplay("{Type} {Name}")] - public class ParameterMetadata : <.ParameterMetadata>, .IMemberMetadata - { - public ParameterMetadata([.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties)] Type) { } - public []? CachedDataSourceAttributes { get; } - public object? CachedDefaultValue { get; } - public bool? CachedIsOptional { get; } - public bool? CachedIsParams { get; } - public object? DefaultValue { get; } - public bool IsNullable { get; init; } - public bool IsOptional { get; } - public bool IsParams { get; } - public required string Name { get; init; } - public int Position { get; init; } - public .ParameterInfo ReflectionInfo { get; set; } - public <.ParameterInfo>? ReflectionInfoFactory { get; init; } - [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties)] - public Type { get; init; } - public required .TypeInfo TypeInfo { get; init; } - } - public static class ParameterMetadataFactory - { - [.("ReflectionAnalysis", "IL2067", Justification="Factory is only called from generated code that always passes concrete types")] - public static .ParameterMetadata Create([.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties)] type, string name, .TypeInfo typeInfo, bool isNullable, <.ParameterInfo>? reflectionInfoFactory = null) { } - public static .ParameterMetadata[] ForConstructor([.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods)] declaringType, bool matchByParameterCount, params .ParameterMetadata[] parameters) { } - public static .ParameterMetadata[] ForGenericMethod([.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods)] declaringType, string methodName, params .ParameterMetadata[] parameters) { } - public static .ParameterMetadata[] ForGenericMethod([.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods)] declaringType, string methodName, bool isStatic, int genericParameterCount, params .ParameterMetadata[] parameters) { } - public static .ParameterMetadata[] ForMethod([.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods)] declaringType, string methodName, bool isStatic, params .ParameterMetadata[] parameters) { } - public static .ParameterMetadata[] ForNonPublicMethod( declaringType, string methodName, bool isStatic, int genericParameterCount, rootMethod, params .ParameterMetadata[] parameters) { } - } - [.DebuggerDisplay("{Type} {Name}")] - public class ParameterMetadata<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties)] T> : .ParameterMetadata, <.ParameterMetadata> - { - public ParameterMetadata() { } - } - [(.Assembly | .Class | .Method, AllowMultiple=true)] - public class PropertyAttribute : .TUnitAttribute, ., . - { - public PropertyAttribute(string name, string value) { } - public string Name { get; } - public int Order { get; } - public string Value { get; } - public . OnTestDiscovered(.DiscoveredTestContext context) { } - } - public sealed class PropertyDataSource - { - public PropertyDataSource() { } - public required .IDataSourceAttribute DataSource { get; init; } - public required string PropertyName { get; init; } - public required PropertyType { get; init; } - } - public sealed class PropertyInjectionData - { - public PropertyInjectionData() { } - public .PropertyInjectionData[] NestedPropertyInjections { get; init; } - public >? NestedPropertyValueFactory { get; init; } - public required string PropertyName { get; init; } - public required PropertyType { get; init; } - public required Setter { get; init; } - public required ValueFactory { get; init; } - } - public class PropertyInjectionException : .TestBuilderException - { - public PropertyInjectionException(string propertyName, propertyType, innerException) { } - public string PropertyName { get; } - public PropertyType { get; } - } - [.DebuggerDisplay("{Type} {Name})")] - public class PropertyMetadata : <.PropertyMetadata>, .IMemberMetadata - { - public PropertyMetadata() { } - public required .ClassMetadata ClassMetadata { get; set; } - public required .ClassMetadata ContainingTypeMetadata { get; set; } - public <.IDataSourceAttribute>? CreateDataSource { get; init; } - public required Getter { get; init; } - public bool IsInitOnly { get; init; } - public bool IsNullable { get; init; } - public bool IsRequired { get; init; } - public required bool IsStatic { get; init; } - public required string Name { get; init; } - public required .PropertyInfo ReflectionInfo { get; init; } - public ? Setter { get; init; } - [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties)] - public required Type { get; init; } - } - public static class PropertyMetadataFactory - { - public static CreateGenericGetter([.(..PublicProperties)] declaringType, string propertyName) { } - } - public static class PropertySourceRegistry - { - [.("Reflection discovery is used when source-generated metadata is not available")] - public static .PropertyInjectionData[] DiscoverInjectableProperties([.(..None | ..PublicFields | ..NonPublicFields | ..PublicProperties)] type) { } - [return: .(new string[] { - "Type", - "Source"})] - public static .<<, ..IPropertySource>> GetAllSources() { } - public static .PropertyDataSource[]? GetPropertyDataSources( type) { } - public static .PropertyInjectionData[]? GetPropertyInjectionData( type) { } - public static ..IPropertySource? GetSource( type) { } - public static int Register( type, ..IPropertySource source) { } - } - [(.Assembly, AllowMultiple=false, Inherited=false)] - public sealed class ReflectionModeAttribute : - { - public ReflectionModeAttribute() { } - } - [(.Assembly | .Class | .Method)] - public sealed class RepeatAttribute : .TUnitAttribute, .IScopedAttribute - { - public RepeatAttribute(int times) { } - public ScopeType { get; } - public int Times { get; } - } - public sealed class ResolvedDependency - { - public ResolvedDependency() { } - public required .TestDependency Metadata { get; init; } - public bool ProceedOnFailure { get; } - public required .AbstractExecutableTest Test { get; init; } - } - [(.Assembly | .Class | .Method)] - public class RetryAttribute : .TUnitAttribute, .IScopedAttribute, ., . - { - public RetryAttribute(int times) { } - public int BackoffMs { get; set; } - public double BackoffMultiplier { get; set; } - public int Order { get; } - public []? RetryOnExceptionTypes { get; set; } - public ScopeType { get; } - public int Times { get; } - public . OnTestDiscovered(.DiscoveredTestContext context) { } - public virtual . ShouldRetry(.TestContext context, exception, int currentRetryCount) { } - } - public sealed class RunOnAttribute : .SkipAttribute - { - public RunOnAttribute(. OperatingSystem) { } - public override . ShouldSkip(.TestRegisteredContext context) { } - } - [.("windows")] - public class STAThreadExecutor : .DedicatedThreadExecutor - { - public STAThreadExecutor() { } - protected override void ConfigureThread(.Thread thread) { } - } - public class SharedDataKey : <.SharedDataKey> - { - public SharedDataKey(string Key, Type) { } - public string Key { get; init; } - public Type { get; init; } - } - public static class SharedDataSources - { - public static object? GetOrCreate(.SharedType sharedType, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors)] type, ? testClassType, string? key, factory) { } - public static object? GetOrCreate(.SharedType sharedType, [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors)] type, .DataGeneratorMetadata dataGeneratorMetadata, string? key, factory) { } - public static T GetOrCreate(.SharedType sharedType, ? testClassType = null, string? key = null) - where T : new() { } - public static T GetOrCreate(.SharedType sharedType, .DataGeneratorMetadata dataGeneratorMetadata, string? key = null) - where T : new() { } - public static T GetOrCreate(.SharedType sharedType, ? testClassType, string? key, factory) { } - public static T GetOrCreate(.SharedType sharedType, .DataGeneratorMetadata dataGeneratorMetadata, string? key, factory) { } - } - public enum SharedType - { - None = 0, - PerClass = 1, - PerAssembly = 2, - PerTestSession = 3, - Keyed = 4, - } - public class SingleTUnitAttribute : .TUnitAttribute { } - public static class Skip - { - [.] - public static void Test(string reason) { } - public static void Unless([.(false)] bool condition, string reason) { } - public static void When([.(true)] bool condition, string reason) { } - } - [(.Assembly | .Class | .Method, AllowMultiple=true)] - public class SkipAttribute : , ., . - { - public SkipAttribute(string reason) { } - public int Order { get; } - public string Reason { get; } - protected virtual string GetSkipReason(.TestRegisteredContext context) { } - public . OnTestRegistered(.TestRegisteredContext context) { } - public virtual . ShouldSkip(.TestRegisteredContext context) { } - } - [.StackTraceHidden] - public class SourceRegistrar - { - public SourceRegistrar() { } - public static bool IsEnabled { get; set; } - public static void RegisterAssembly(<.Assembly> assemblyLoader) { } - public static int RegisterDynamic(.IDynamicTestSource testSource) { } - public static int RegisterEntries<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..PublicProperties)] T>(<.TestEntry[]> factory) - where T : class { } - public static int RegisterGenericConstraintViolations([.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..PublicProperties)] genericTypeDefinition, <.GenericConstraintViolationEntry[]> factory) { } - public static void RegisterGlobalInitializer(<.> initializer) { } - public static int RegisterHook(.<.> bag, int registrationIndex, factory) - where T : . { } - public static int RegisterHook(.<.Assembly, .<.>> dictionary, .Assembly key, int registrationIndex, factory) - where T : . { } - public static int RegisterHook(.<, .<.>> dictionary, key, int registrationIndex, factory) - where T : . { } - public static void RegisterProperty(..IPropertySource propertySource) { } - } - public static class Sources - { - public static readonly .<.Assembly, .<.<.>>> AfterAssemblyHooks; - public static readonly .<, .<.<.>>> AfterClassHooks; - public static readonly .<.<.>> AfterEveryAssemblyHooks; - public static readonly .<.<.>> AfterEveryClassHooks; - public static readonly .<.<.>> AfterEveryTestHooks; - public static readonly .<.<.>> AfterTestDiscoveryHooks; - public static readonly .<, .<.<.>>> AfterTestHooks; - public static readonly .<.<.>> AfterTestSessionHooks; - public static readonly .<<.Assembly>> AssemblyLoaders; - public static readonly .<.Assembly, .<.<.>>> BeforeAssemblyHooks; - public static readonly .<, .<.<.>>> BeforeClassHooks; - public static readonly .<.<.>> BeforeEveryAssemblyHooks; - public static readonly .<.<.>> BeforeEveryClassHooks; - public static readonly .<.<.>> BeforeEveryTestHooks; - public static readonly .<.<.>> BeforeTestDiscoveryHooks; - public static readonly .<, .<.<.>>> BeforeTestHooks; - public static readonly .<.<.>> BeforeTestSessionHooks; - public static readonly .<.IDynamicTestSource> DynamicTestSources; - public static readonly .<<.>> GlobalInitializers; - public static readonly .<..IPropertySource> PropertySources; - public static readonly .<, .ITestEntrySource> TestEntries; - } - [.("Reflection mode requires dynamic access for static property initialization")] - public static class StaticPropertyReflectionInitializer - { - [.("Data source initialization may require dynamic code generation")] - public static . InitializeAllStaticPropertiesAsync() { } - [.("Data source initialization may require dynamic code generation")] - public static . InitializeStaticPropertiesForType( type) { } - } - public static class TUnitActivitySource - { - [("TUnit no longer emits spans under this source name. See the property remarks for " + - "the current trace topology. This constant is kept for binary compatibility and w" + - "ill be removed in a future major release.")] - public const string AspNetCoreHttpSourceName = ".Http"; - public const string TagTestId = ".id"; - } - public class TUnitAttribute : { } - [(.Method)] - public sealed class TestAttribute : .BaseTestAttribute - { - public TestAttribute([.] string file = "", [.] int line = 0) { } - } - public sealed class TestBuildContext : .Context, - { - public TestBuildContext() { } - public new static .TestBuildContext? Current { get; } - public new void Dispose() { } - public string GetCapturedErrorOutput() { } - public string GetCapturedOutput() { } - } - public class TestBuilderContext : <.TestBuilderContext> - { - public TestBuilderContext() { } - public .IDataSourceAttribute? ClassDataSourceAttribute { get; set; } - public .IDataSourceAttribute? DataSourceAttribute { get; set; } - public string DefinitionId { get; } - public .TestContextEvents Events { get; set; } - [("Use StateBag property instead.")] - public . ObjectBag { get; } - public . StateBag { get; set; } - public required .MethodMetadata TestMetadata { get; init; } - public static .TestBuilderContext? Current { get; } - public void RegisterForInitialization(object? obj) { } - } - public class TestBuilderContextAccessor - { - public TestBuilderContextAccessor(.TestBuilderContext context) { } - public .TestBuilderContext Current { get; set; } - } - public class TestBuilderException : - { - public TestBuilderException() { } - public TestBuilderException(string message) { } - public TestBuilderException(string message, innerException) { } - public . Context { get; set; } - public .TestMetadata? TestMetadata { get; set; } - } - [(.Constructor)] - public sealed class TestConstructorAttribute : .TUnitAttribute - { - public TestConstructorAttribute() { } - } - [.DebuggerDisplay("{.Name}.{GetDisplayName(),nq}")] - public class TestContext : .Context, ., ., ., ., ., ., ., . - { - public TestContext(string testName, serviceProvider, .ClassHookContext classContext, .TestBuilderContext testBuilderContext, .CancellationToken cancellationToken) { } - public new .Activity? Activity { get; } - public .ClassHookContext ClassContext { get; } - public . Dependencies { get; } - public . Events { get; } - public . Execution { get; } - public string Id { get; } - public . Isolation { get; } - public object Lock { get; } - public . Metadata { get; } - public . Output { get; } - public . Parallelism { get; } - public . StateBag { get; } - public static . Configuration { get; } - public new static .TestContext? Current { get; } - public static string? OutputDirectory { get; } - public static .> Parameters { get; } - public static string ResultsDirectory { get; } - public static string? TestDirectory { get; } - public static string WorkingDirectory { get; set; } - public override string GetErrorOutput() { } - public override string GetStandardOutput() { } - public . MakeCurrent() { } - public void RegisterTrace(.ActivityTraceId traceId) { } - public static .TestContext? GetById(string id) { } - public readonly struct ContextScope : - { - public void Dispose() { } - } - } - public class TestContextEvents : . - { - public TestContextEvents() { } - public .AsyncEvent<.TestContext>? OnDispose { get; set; } - public .AsyncEvent<.TestContext>? OnInitialize { get; set; } - public .AsyncEvent<.TestContext>? OnTestEnd { get; set; } - public .AsyncEvent<.TestContext>? OnTestRegistered { get; set; } - [.(new string?[]?[] { - "TestContext", - "RetryAttempt"})] - public .AsyncEvent<<.TestContext, int>>? OnTestRetry { get; set; } - public .AsyncEvent<.TestContext>? OnTestSkipped { get; set; } - public .AsyncEvent<.TestContext>? OnTestStart { get; set; } - } - public class TestDataCombination - { - public TestDataCombination() { } - public string[]? Categories { get; init; } - public <.>[] ClassDataFactories { get; init; } - public int ClassDataSourceIndex { get; init; } - public int ClassLoopIndex { get; init; } - public ? DataGenerationException { get; init; } - public string? DisplayName { get; init; } - public <.>[] MethodDataFactories { get; init; } - public int MethodDataSourceIndex { get; init; } - public int MethodLoopIndex { get; init; } - public int RepeatIndex { get; init; } - public .? ResolvedGenericTypes { get; init; } - public string? Skip { get; init; } - } - public class TestDataRow : <.TestDataRow> - { - public TestDataRow(T Data, string? DisplayName = null, string? Skip = null, string[]? Categories = null, [.("Data")] string? DataExpression = null) { } - public string[]? Categories { get; init; } - public T Data { get; init; } - public string? DataExpression { get; init; } - public string? DisplayName { get; init; } - public string? Skip { get; init; } - } - public class TestDefinition : .ITestDefinition - { - public TestDefinition() { } - } - public class TestDefinition : .TestDefinition - where T : class - { - public TestDefinition() { } - } - public sealed class TestDependency : <.TestDependency> - { - public TestDependency() { } - public int ClassGenericArity { get; init; } - public ? ClassType { get; init; } - public int MethodGenericArity { get; init; } - public string? MethodName { get; init; } - public []? MethodParameters { get; init; } - public bool ProceedOnFailure { get; init; } - public bool Equals(.TestDependency? other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public bool Matches(.TestMetadata test, .TestMetadata? dependentTest = null) { } - public override string ToString() { } - public static .TestDependency FromClass( classType, bool proceedOnFailure = false) { } - public static .TestDependency FromClassAndMethod( classType, string methodName, bool proceedOnFailure = false) { } - public static .TestDependency FromMethodName(string methodName, bool proceedOnFailure = false) { } - } - public class TestDetails : ., ., ., ., ., . - { - public TestDetails(.<> allAttributes) { } - public . Attributes { get; } - public required .<, .<>> AttributesByType { get; init; } - public . Categories { get; } - public . Class { get; } - public [] ClassGenericArguments { get; set; } - public required object ClassInstance { get; set; } - [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..PublicProperties)] - public required ClassType { get; init; } - public . Configuration { get; } - public .> CustomProperties { get; } - public . Identity { get; } - public . Location { get; } - public . Method { get; } - public [] MethodGenericArguments { get; set; } - public required .MethodMetadata MethodMetadata { get; set; } - public required string MethodName { get; init; } - public int RetryBackoffMs { get; set; } - public double RetryBackoffMultiplier { get; set; } - public int RetryLimit { get; set; } - public required ReturnType { get; set; } - public required object?[] TestClassArguments { get; set; } - public . TestClassInjectedPropertyArguments { get; init; } - public []? TestClassParameterTypes { get; set; } - public string TestFilePath { get; set; } - public required string TestId { get; init; } - public int TestLineNumber { get; set; } - public required object?[] TestMethodArguments { get; set; } - public required string TestName { get; init; } - public ? Timeout { get; set; } - public .<> GetAllAttributes() { } - public . GetAttributes() - where T : { } - public bool HasAttribute() - where T : { } - } - public class TestDetails : .TestDetails - where T : class - { - public TestDetails(.<> allAttributes) { } - } - public class TestDiscoveryContext : .Context - { - public .<.TestContext> AllTests { get; } - public .<.AssemblyHookContext> Assemblies { get; } - public .BeforeTestDiscoveryContext BeforeTestDiscoveryContext { get; } - public .<.ClassHookContext> TestClasses { get; } - public required string? TestFilter { get; init; } - public new static .TestDiscoveryContext? Current { get; } - public void AddTests(.<.TestContext> tests) { } - } - public static class TestEntryFactory - { - public static .TestEntry Create<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..PublicProperties)] T>( - string methodName, - string fullyQualifiedName, - string filePath, - int lineNumber, - .MethodMetadata methodMetadata, - <[], object?[], T> createInstance, - invokeBody, - int methodIndex, - createAttributes, - int attributeGroupIndex, - int startColumnNumber = 0, - int endLineNumber = 0, - int endColumnNumber = 0, - bool hasDataSource = false, - int repeatCount = 0, - string[]? categories = null, - string[]? properties = null, - string[]? dependsOn = null, - .TestDependency[]? dependencies = null, - .IDataSourceAttribute[]? testDataSources = null, - .IDataSourceAttribute[]? classDataSources = null, - .InjectableProperty[]? injectableProperties = null, - string? methodTypeArgumentsIdentity = null) - where T : class { } - public static .TestEntry CreateWithClassMetadata<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..PublicProperties)] T>( - string methodName, - string fullyQualifiedName, - string filePath, - int lineNumber, - .ClassMetadata classMetadata, - <[], object?[], T> createInstance, - invokeBody, - int methodIndex, - createAttributes, - int attributeGroupIndex, - ? returnType = null, - int genericTypeCount = 0, - .ParameterMetadata[]? parameters = null, - int startColumnNumber = 0, - int endLineNumber = 0, - int endColumnNumber = 0, - bool hasDataSource = false, - int repeatCount = 0, - string[]? categories = null, - string[]? properties = null, - string[]? dependsOn = null, - .TestDependency[]? dependencies = null, - .IDataSourceAttribute[]? testDataSources = null, - .IDataSourceAttribute[]? classDataSources = null, - .InjectableProperty[]? injectableProperties = null) - where T : class { } - } - public readonly struct TestEntryFilterData - { - public required string[] Categories { get; init; } - public required string ClassName { get; init; } - public required string[] DependsOn { get; init; } - public required bool HasDataSource { get; init; } - public required string MethodName { get; init; } - public required string[] Properties { get; init; } - public required int RepeatCount { get; init; } - } - public sealed class TestEntrySource<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..PublicProperties)] T> : .ITestEntrySource - where T : class - { - public TestEntrySource(<.TestEntry[]> factory) { } - public string ClassName { get; } - public ClassType { get; } - public int Count { get; } - public .TestEntryFilterData GetFilterData(int index) { } - public .<.TestMetadata> Materialize(int index, string testSessionId) { } - } - public sealed class TestEntry<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..PublicProperties)] T> - where T : class - { - public TestEntry() { } - public required int AttributeGroupIndex { get; init; } - public string[] Categories { get; init; } - public .IDataSourceAttribute[] ClassDataSources { get; init; } - public required CreateAttributes { get; init; } - public required <[], object?[], T> CreateInstance { get; init; } - public .TestDependency[] Dependencies { get; init; } - public string[] DependsOn { get; init; } - public int EndColumnNumber { get; init; } - public int EndLineNumber { get; init; } - public required string FilePath { get; init; } - public required string FullyQualifiedName { get; init; } - public bool HasDataSource { get; init; } - public .InjectableProperty[] InjectableProperties { get; init; } - public required InvokeBody { get; init; } - public required int LineNumber { get; init; } - public required int MethodIndex { get; init; } - public required .MethodMetadata MethodMetadata { get; init; } - public required string MethodName { get; init; } - public string? MethodTypeArgumentsIdentity { get; init; } - public string[] Properties { get; init; } - public int RepeatCount { get; init; } - public int StartColumnNumber { get; init; } - public .IDataSourceAttribute[] TestDataSources { get; init; } - } - public class TestInstantiationException : .TestBuilderException - { - public TestInstantiationException( testClassType, innerException) { } - public TestInstantiationException( testClassType, string message) { } - public TestClassType { get; } - } - public abstract class TestMetadata - { - protected TestMetadata() { } - public required <[]> AttributeFactory { get; init; } - public required .IDataSourceAttribute[] ClassDataSources { get; init; } - public abstract <.ExecutableTestCreationContext, .TestMetadata, .AbstractExecutableTest> CreateExecutableTestFactory { get; } - public required .IDataSourceAttribute[] DataSources { get; init; } - public .TestDependency[] Dependencies { get; init; } - public required string FilePath { get; init; } - public .GenericMethodInfo? GenericMethodInfo { get; init; } - public []? GenericMethodTypeArguments { get; init; } - public .GenericTypeInfo? GenericTypeInfo { get; init; } - public int InheritanceDepth { get; set; } - public <[], object?[], object> InstanceFactory { get; init; } - public required int LineNumber { get; init; } - public required .MethodMetadata MethodMetadata { get; init; } - public required .PropertyDataSource[] PropertyDataSources { get; init; } - public .PropertyInjectionData[] PropertyInjections { get; init; } - public int? RepeatCount { get; init; } - [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..PublicProperties)] - public required TestClassType { get; init; } - public ? TestInvoker { get; init; } - public required string TestMethodName { get; init; } - public required string TestName { get; init; } - public string TestSessionId { get; set; } - } - public static class TestMetadataFactory - { - [.("ReflectionAnalysis", "IL2087", Justification="Factory is only called from generated code that always passes concrete types")] - [.("ReflectionAnalysis", "IL2091", Justification="Factory is only called from generated code that always passes concrete types")] - public static .TestMetadata Create( - string testName, - string testMethodName, - int lineNumber, - invokeTypedTest, - <[]> attributeFactory, - <[], object?[], T> instanceFactory, - .MethodMetadata methodMetadata, - string testSessionId, - string filePath = "", - int inheritanceDepth = 0, - .TestDependency[]? dependencies = null, - .IDataSourceAttribute[]? dataSources = null, - .IDataSourceAttribute[]? classDataSources = null, - .PropertyDataSource[]? propertyDataSources = null, - .PropertyInjectionData[]? propertyInjections = null, - int? repeatCount = default) - where T : class { } - } - public class TestMetadata<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..PublicProperties)] T> : .TestMetadata, . - where T : class - { - public TestMetadata() { } - public override <.ExecutableTestCreationContext, .TestMetadata, .AbstractExecutableTest> CreateExecutableTestFactory { get; } - public new <[], object?[], T>? InstanceFactory { get; init; } - public ? InvokeTypedTest { get; init; } - public new ? TestInvoker { get; init; } - public void UseRuntimeDataGeneration(string testSessionId) { } - } - public enum TestPhase - { - Discovery = 0, - Registration = 1, - BeforeTest = 2, - Execution = 3, - AfterTest = 4, - } - public class TestRegisteredContext - { - public TestRegisteredContext(.TestContext testContext) { } - public string? CustomDisplayName { get; } - public .DiscoveredTest DiscoveredTest { get; set; } - [("Use StateBag property instead.")] - public . ObjectBag { get; } - public . StateBag { get; } - public .TestContext TestContext { get; } - public .TestDetails TestDetails { get; } - public string TestName { get; } - public void ClearParallelConstraints() { } - public void ClearParallelLimiter() { } - public void SetHookExecutor(. executor) { } - public void SetParallelLimiter(. parallelLimit) { } - public void SetSkipped(string reason) { } - public void SetTestExecutor(. executor) { } - } - public class TestResult : <.TestResult> - { - public TestResult() { } - public required string ComputerName { get; init; } - public required ? Duration { get; init; } - public required ? End { get; init; } - public required ? Exception { get; init; } - public bool IsOverridden { get; init; } - public ? OriginalException { get; init; } - public string? Output { get; } - public string? OverrideReason { get; init; } - public required ? Start { get; init; } - public required .TestState State { get; init; } - } - public class TestSessionContext : .Context - { - public .<.TestContext> AllTests { get; } - public .<.AssemblyHookContext> Assemblies { get; } - public required string Id { get; init; } - public .CancellationToken SessionCancellationToken { get; } - public .<.ClassHookContext> TestClasses { get; } - public .TestDiscoveryContext TestDiscoveryContext { get; } - public required string? TestFilter { get; init; } - public .<> UnobservedTaskExceptions { get; } - public new static .TestSessionContext? Current { get; } - public static .TestBuilderContext GlobalStaticPropertyContext { get; } - public void AddArtifact(.Artifact artifact) { } - public void AddAssembly(.AssemblyHookContext assemblyHookContext) { } - } - public enum TestState - { - NotStarted = 0, - WaitingForDependencies = 1, - Queued = 2, - Running = 3, - Passed = 4, - Failed = 5, - Skipped = 6, - Timeout = 7, - Cancelled = 8, - } - public static class TestStateExtensions - { - public static bool IsFailure(this .TestState state) { } - public static bool IsFinal(this .TestState state) { } - public static bool IsSuccess(this .TestState state) { } - public static bool IsTransient(this .TestState state) { } - } - public sealed class TestVariantInfo : <.TestVariantInfo> - { - public string DisplayName { get; } - public string TestId { get; } - } - [(.Assembly | .Class | .Method)] - public class TimeoutAttribute : .TUnitAttribute, .IScopedAttribute, ., ., . - { - public TimeoutAttribute(int timeoutInMilliseconds) { } - public int Order { get; } - public ScopeType { get; } - public Timeout { get; } - public . OnHookRegistered(.HookRegisteredContext context) { } - public . OnTestDiscovered(.DiscoveredTestContext context) { } - } - [("Use OpenTelemetry activity spans instead. Hook timings are now automatically reco" + - "rded as OTel child spans of the test activity.")] - public class Timing : <.Timing> - { - public Timing(string StepName, Start, End) { } - public Duration { get; } - public End { get; init; } - public Start { get; init; } - public string StepName { get; init; } - } - public sealed class TypeArrayComparer : .<[]> - { - public static readonly .TypeArrayComparer Instance; - public bool Equals([]? x, []? y) { } - public int GetHashCode([] obj) { } - } - public abstract class TypeInfo : <.TypeInfo> - { - protected TypeInfo() { } - } - public abstract class TypedDataSourceAttribute : , .IDataSourceAttribute, .ITypedDataSourceAttribute - { - protected TypedDataSourceAttribute() { } - public virtual bool DeferEnumeration { get; set; } - public virtual bool SkipIfEmpty { get; set; } - [.(typeof(.TypedDataSourceAttribute.d__9))] - public .<<.>> GetDataRowsAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - public abstract .<<.>> GetTypedDataRowsAsync(.DataGeneratorMetadata dataGeneratorMetadata); - } - [(.Class | .Method | .Property, AllowMultiple=true)] - public abstract class UntypedDataSourceGeneratorAttribute : .AsyncUntypedDataSourceGeneratorAttribute - { - protected UntypedDataSourceGeneratorAttribute() { } - protected abstract .<> GenerateDataSources(.DataGeneratorMetadata dataGeneratorMetadata); - [.(typeof(.UntypedDataSourceGeneratorAttribute.d__1))] - protected override sealed .<<.>> GenerateDataSourcesAsync(.DataGeneratorMetadata dataGeneratorMetadata) { } - } -} -namespace .AotCompatibility -{ - public enum AotCompatibilityMode - { - SourceGenerated = 0, - ManuallyRegistered = 1, - ConcreteTypesOnly = 2, - TupleInterfaceBased = 3, - } - [(.Method)] - public class AotCompatibleAttribute : - { - public AotCompatibleAttribute() { } - public string? Details { get; init; } - public . Mode { get; init; } - } - public static class GenericTestRegistry - { - public static .MethodInfo? GetCompiledMethod( declaringType, string methodName, [] typeArguments) { } - public static TDelegate? GetDirectDelegate( declaringType, string methodName, [] typeArguments) - where TDelegate : { } - public static .<[]> GetRegisteredCombinations( declaringType) { } - public static bool IsMarkedAotCompatible(.MethodInfo method) { } - public static bool IsRegistered( declaringType, string methodName, [] typeArguments) { } - public static void MarkAsAotCompatible(.MethodInfo method) { } - public static void RegisterDirectDelegate( declaringType, string methodName, [] typeArguments, T delegateInstance) - where T : { } - public static void RegisterGenericMethod( declaringType, string methodName, [] typeArguments, .MethodInfo compiledMethod) { } - } -} -namespace .Attributes -{ - [(.Class | .Constructor | .Method | .Property)] - public sealed class AotCompatibleAttribute : - { - public AotCompatibleAttribute() { } - public string? AlternativeForReflection { get; set; } - public string? Notes { get; set; } - } - [(.Class | .Constructor | .Method | .Property)] - public sealed class RequiresReflectionAttribute : - { - public RequiresReflectionAttribute(string reason) { } - public string? AotAlternative { get; set; } - public string Reason { get; } - } -} -namespace .Converters -{ - public static class AotConverterRegistry - { - public static int Register(. converter) { } - public static void Register( converter) { } - public static bool TryConvert( sourceType, targetType, object? value, out object? result) { } - public static bool TryGetConverter( sourceType, targetType, out .? converter) { } - } - public class FuncAotConverter : . - { - public FuncAotConverter( converter) { } - public SourceType { get; } - public TargetType { get; } - public object? Convert(object? value) { } - } - public interface IAotConverter - { - SourceType { get; } - TargetType { get; } - object? Convert(object? value); - } -} -namespace .Data -{ - public class ScopedDictionary - where TScope : notnull - { - public ScopedDictionary() { } - public void Clear() { } - public object? GetOrCreate(TScope scope, type, <, object?> factory) { } - } - public class ThreadSafeDictionary - where TKey : notnull - { - public ThreadSafeDictionary() { } - public TValue this[TKey key] { get; } - public . Keys { get; } - public . Values { get; } - public void Clear() { } - public TValue GetOrAdd(TKey key, func) { } - public TValue GetOrAdd(TKey key, func, TArg arg) { } - public TValue? Remove(TKey key) { } - public bool TryGetValue(TKey key, [.(true)] out TValue? value) { } - } -} -namespace .DataSources -{ - public static class TestDataFormatter - { - public static string CreateDisplayName(.TestMetadata metadata, object?[] arguments, .TestDataCombination? dataCombination = null) { } - public static string CreateGenericDisplayName(.TestMetadata metadata, [] genericTypes, object?[] arguments) { } - public static string FormatArguments(.TestContext context) { } - public static string FormatArguments(object?[] arguments) { } - public static string FormatArguments(object?[] arguments, .<> formatters) { } - } -} -namespace .Discovery -{ - public sealed class InitializerPropertyInfo - { - public InitializerPropertyInfo() { } - public required GetValue { get; init; } - public required string PropertyName { get; init; } - public required PropertyType { get; init; } - } - public static class InitializerPropertyRegistry - { - public static .[]? GetProperties( type) { } - public static bool HasRegistration( type) { } - public static int Register( type, .[] properties) { } - } -} -namespace .Enums -{ - public enum DataGeneratorType - { - ClassParameters = 0, - TestParameters = 1, - Property = 2, - } - public enum EventReceiverStage - { - Early = 0, - Late = 1, - } - public enum LogLevel - { - None = -1, - Trace = 0, - Debug = 1, - Information = 2, - Warning = 3, - Error = 4, - Critical = 5, - } - [] - public enum OS - { - Linux = 1, - Windows = 2, - MacOs = 4, - Browser = 8, - } - public enum Priority - { - Low = 0, - BelowNormal = 1, - Normal = 2, - AboveNormal = 3, - High = 4, - Critical = 5, - } - public enum TestRelationship - { - None = 0, - Retry = 1, - Generated = 2, - Derived = 3, - } - public enum TimelineMode - { - Collapsed = 0, - FullExecution = 1, - } -} -namespace .Events -{ - [] - public enum EventType - { - Initialize = 1, - Dispose = 2, - TestRegistered = 4, - TestStart = 8, - TestEnd = 16, - TestSkipped = 32, - FirstTestInClass = 64, - FirstTestInAssembly = 128, - FirstTestInTestSession = 256, - LastTestInClass = 512, - LastTestInAssembly = 1024, - LastTestInTestSession = 2048, - TestRetry = 2049, - All = 4095, - } -} -namespace .Exceptions -{ - public class AfterAssemblyException : . - { - public AfterAssemblyException(string message, innerException) { } - } - public class AfterClassException : . - { - public AfterClassException(string message, innerException) { } - } - public class AfterTestDiscoveryException : . - { - public AfterTestDiscoveryException(string message, innerException) { } - } - public class AfterTestException : . - { - public AfterTestException(string message, innerException) { } - } - public class AfterTestSessionException : . - { - public AfterTestSessionException(string message, innerException) { } - } - public class BeforeAssemblyException : . - { - public BeforeAssemblyException(string message, innerException) { } - } - public class BeforeClassException : . - { - public BeforeClassException(string message, innerException) { } - } - public class BeforeTestDiscoveryException : . - { - public BeforeTestDiscoveryException(string message, innerException) { } - } - public class BeforeTestException : . - { - public BeforeTestException(string message, innerException) { } - } - public class BeforeTestSessionException : . - { - public BeforeTestSessionException(string message, innerException) { } - } - public class CircularDependencyException : - { - public CircularDependencyException() { } - public CircularDependencyException(string message) { } - public CircularDependencyException(string message, innerException) { } - } - public class DependencyConflictException : . { } - public class FailTestException : . - { - public FailTestException(string reason) { } - public string Reason { get; } - } - public class GenericTypeResolutionException : - { - public GenericTypeResolutionException(string message) { } - public GenericTypeResolutionException(string message, innerException) { } - } - public class InconclusiveTestException : . - { - public InconclusiveTestException(string message) { } - public InconclusiveTestException(string message, exception) { } - } - public class SkipTestException : . - { - public SkipTestException(string reason) { } - public string Reason { get; } - } - public class TUnitException : - { - public TUnitException() { } - public TUnitException(string? message) { } - public TUnitException(string? message, ? innerException) { } - } - public class TestDependencyException : . - { - public TestDependencyException(string dependencyName, bool proceedOnFailure) { } - public string DependencyName { get; } - public bool ProceedOnFailure { get; } - } - public class TestExecutionException : . - { - public TestExecutionException(? testException, .<> hookExceptions, .<> eventReceiverExceptions) { } - public .<> EventReceiverExceptions { get; } - public .<> HookExceptions { get; } - public ? TestException { get; } - } - public class TestFailedInitializationException : - { - public TestFailedInitializationException(string? message, ? innerException) { } - } - public class TestNotExecutedException : . { } - public class TestRunCanceledException : . - { - public TestRunCanceledException() { } - } - public class TimeoutException : . { } -} -namespace .Executors -{ - [(.Assembly | .Class | .Method)] - public class CultureAttribute : .TUnitAttribute, .IScopedAttribute, ., ., . - { - public CultureAttribute(.CultureInfo cultureInfo) { } - public CultureAttribute(string cultureName) { } - public int Order { get; } - public ScopeType { get; } - public . OnHookRegistered(.HookRegisteredContext context) { } - public . OnTestRegistered(.TestRegisteredContext context) { } - } - [(.Assembly | .Class | .Method)] - public class HookExecutorAttribute : .TUnitAttribute, .IScopedAttribute, ., . - { - public HookExecutorAttribute([.(..PublicConstructors)] type) { } - public HookExecutorType { get; } - public int Order { get; } - public ScopeType { get; } - public . OnHookRegistered(.HookRegisteredContext context) { } - } - [(.Assembly | .Class | .Method)] - public sealed class HookExecutorAttribute<[.(..PublicConstructors)] T> : . - where T : ., new () - { - public HookExecutorAttribute() { } - } - [(.Assembly | .Class | .Method)] - public class InvariantCultureAttribute : . - { - public InvariantCultureAttribute() { } - } - [(.Assembly | .Class | .Method)] - [.("windows")] - public class STAThreadExecutorAttribute : .TUnitAttribute, .IScopedAttribute, ., ., . - { - public STAThreadExecutorAttribute() { } - public int Order { get; } - public ScopeType { get; } - public . OnHookRegistered(.HookRegisteredContext context) { } - public . OnTestRegistered(.TestRegisteredContext context) { } - } - [(.Assembly | .Class | .Method)] - public sealed class TestExecutorAttribute : .TUnitAttribute, .IScopedAttribute, ., ., . - { - public TestExecutorAttribute([.(..PublicConstructors)] type) { } - public int Order { get; } - public ScopeType { get; } - public . OnHookRegistered(.HookRegisteredContext context) { } - public . OnTestRegistered(.TestRegisteredContext context) { } - } - [(.Assembly | .Class | .Method)] - public sealed class TestExecutorAttribute : .TUnitAttribute, .IScopedAttribute, ., ., . - where T : ., new () - { - public TestExecutorAttribute() { } - public int Order { get; } - public ScopeType { get; } - public . OnHookRegistered(.HookRegisteredContext context) { } - public . OnTestRegistered(.TestRegisteredContext context) { } - } -} -namespace .Extensions -{ - public static class MetadataExtensions - { - public static DeclaringType(this .MethodMetadata method) { } - public static string DisplayName(this .MethodMetadata method) { } - public static .<> GetCustomAttributes(this .MethodMetadata method) { } - public static .MethodInfo GetReflectionInfo(this .MethodMetadata method) { } - public static bool IsGenericMethodDefinition(this .MethodMetadata method) { } - public static string MethodName(this .MethodMetadata method) { } - } - public static class ReflectionExtensions - { - public static [] GetCustomAttributesSafe(this .ICustomAttributeProvider provider, bool inherit = true) { } - public static T[] GetCustomAttributesSafe(this .ICustomAttributeProvider provider, bool inherit = true) - where T : { } - } - public static class TestContextExtensions - { - [.("Dynamic test metadata creation uses reflection")] - public static . AddDynamicTest<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicMethods | ..NonPublicMethods | ..PublicFields | ..NonPublicFields | ..PublicProperties)] T>(this .TestContext context, .DynamicTest dynamicTest) - where T : class { } - [.("Creating test variants requires runtime compilation and reflection")] - public static .<.TestVariantInfo> CreateTestVariant(this .TestContext context, object?[]? methodArguments = null, object?[]? classArguments = null, .? properties = null, . relationship = 3, string? displayName = null) { } - public static string GetClassTypeName(this .TestContext context) { } - public static bool IsVariant(this . dependencies) { } - } -} -namespace .Helpers -{ - public static class ArgumentFormatter - { - public static string Format(object? o, .<> formatters) { } - public static string Format(object? o, ? parameterType, .<> formatters) { } - public static string FormatArguments(. arguments) { } - public static string GetConstantValue(.TestContext testContext, object? o) { } - } - public static class AttributeDictionaryHelper - { - public static .<, .<>> Empty { get; } - public static .<, .<>> ToAttributeDictionary(this [] attributes) { } - } - public static class CastHelper - { - [.("AOT", "IL3050:Calling members annotated with \'RequiresDynamicCodeAttribute\' may break fu" + - "nctionality when AOT compiling.")] - public static object? Cast([.(..None | ..PublicParameterlessConstructor | ..PublicMethods | ..Interfaces)] type, object? value) { } - [.("Trimming", "IL2087:\'type\' argument does not satisfy \'DynamicallyAccessedMembersAttribute\' in " + - "call to target method.", Justification="Cast is called from source-generated code that handles parseable types at comp" + - "ile time. The runtime TryParsableConvert fallback is only used in non-AOT scenar" + - "ios.")] - public static T? Cast<[.(..PublicParameterlessConstructor)] T>(object? value) { } - [.("AOT", "IL3050:Calling members annotated with \'RequiresDynamicCodeAttribute\' may break fu" + - "nctionality when AOT compiling.")] - public static object? CastIfNeeded([.(..None | ..PublicParameterlessConstructor | ..PublicMethods | ..Interfaces)] type, object? value) { } - public static T[] ToTrailingArray<[.(..PublicParameterlessConstructor)] T>(object value) { } - } - public static class ClassConstructorHelper - { - public static .ClassConstructorAttribute? GetClassConstructorAttribute([] attributes) { } - public static bool HasClassConstructorAttribute([] attributes) { } - public static . TryCreateInstanceWithClassConstructor(.<> attributes, [.(..PublicConstructors)] testClassType, .TestBuilderContext testBuilderContext, string testSessionId) { } - public static . TryCreateInstanceWithClassConstructor(.<> attributes, [.(..PublicConstructors)] testClassType, string testSessionId, .TestContext testContext) { } - } - [.DebuggerDisplay("Count = {CurrentCount}")] - public class Counter - { - public Counter() { } - public int CurrentCount { get; } - public event ? OnCountChanged; - public int Add(int value) { } - public int Decrement() { } - public int Increment() { } - } - public static class DataConversionHelper - { - [.(typeof(..d__2))] - public static . ConvertAsyncEnumerableToObjectArrays(. source, [.] .CancellationToken ct = default) { } - [.(typeof(..d__3))] - public static . ConvertAsyncEnumerableTupleToObjectArrays(. source, [.] .CancellationToken ct = default) - where T : . { } - [.(typeof(..d__1))] - public static . ConvertToAsyncEnumerableInternal(. data, [.] .CancellationToken ct = default) { } - public static . ConvertToObjectArrays(object? data) { } - public static object?[] UnwrapTuple(. tuple) { } - public static .<.> WrapTaskEnumerableAsObjectArrays(.<.> task) { } - } - public static class DataSourceFactories - { - public static .<<.>> FromAsyncEnumerable(<.> invoke) { } - public static .<<.>> FromAsyncEnumerable(.DataGeneratorMetadata dataGeneratorMetadata, <.> invoke) { } - public static .<<.>> FromEnumerable( invoke) { } - public static .<<.>> FromEnumerable(.DataGeneratorMetadata dataGeneratorMetadata, invoke) { } - [.(typeof(..d__19))] - public static .<<.>> FromInstanceAsyncEnumerable(.DataGeneratorMetadata dataGeneratorMetadata, > invoke) { } - [.(typeof(..d__16))] - public static .<<.>> FromInstanceEnumerable(.DataGeneratorMetadata dataGeneratorMetadata, invoke) { } - [.(typeof(..d__21))] - public static .<<.>> FromInstanceRuntimeValue(.DataGeneratorMetadata dataGeneratorMetadata, invoke) { } - [.(typeof(..d__17))] - public static .<<.>> FromInstanceTask(.DataGeneratorMetadata dataGeneratorMetadata, > invoke) { } - [.(typeof(..d__15))] - public static .<<.>> FromInstanceValue(.DataGeneratorMetadata dataGeneratorMetadata, invoke) { } - [.(typeof(..d__18))] - public static .<<.>> FromInstanceValueTask(.DataGeneratorMetadata dataGeneratorMetadata, > invoke) { } - [.(typeof(..d__20))] - public static .<<.>> FromRuntimeValue(.DataGeneratorMetadata dataGeneratorMetadata, invoke) { } - public static .<<.>> FromTask(<.> invoke) { } - public static .<<.>> FromTask(.DataGeneratorMetadata dataGeneratorMetadata, <.> invoke) { } - public static .<<.>> FromValue( invoke) { } - public static .<<.>> FromValue(.DataGeneratorMetadata dataGeneratorMetadata, invoke) { } - public static .<<.>> FromValueTask(<.> invoke) { } - public static .<<.>> FromValueTask(.DataGeneratorMetadata dataGeneratorMetadata, <.> invoke) { } - } - public static class DataSourceHelpers - { - public static <.>[] HandleTupleValue(object? value, bool shouldUnwrap) { } - public static object? InvokeIfFunc(object? value) { } - public static T InvokeIfFunc(object? value) { } - public static bool IsTuple(object? obj) { } - public static . ProcessDataSourceResult(T data) { } - public static . ProcessDataSourceResultGeneric(T data) { } - public static . ProcessEnumerableDataSource(. enumerable) { } - public static <.>[] ProcessTestDataSource(T data, int expectedParameterCount = -1) { } - public static void RegisterTypeCreator(<.MethodMetadata, string, .> creator) { } - [.("AOT", "IL3050:Calling members annotated with \'RequiresDynamicCodeAttribute\' may break fu" + - "nctionality when AOT compiling", Justification="This method is only used in reflection mode. In AOT/source-gen mode, property inj" + - "ection uses compile-time generated code.")] - [.("Trimming", "IL2026:Members annotated with \'RequiresUnreferencedCodeAttribute\' require dynamic" + - " access", Justification="This method is only used in reflection mode. In AOT/source-gen mode, property inj" + - "ection uses compile-time generated code.")] - public static . ResolveDataSourceForPropertyAsync([.(..None | ..PublicParameterlessConstructor | ..PublicFields | ..NonPublicFields | ..PublicProperties)] containingType, string propertyName, .MethodMetadata testInformation, string testSessionId) { } - public static object?[] ToObjectArray(this object? item) { } - public static object?[] ToObjectArrayWithTypes(this object? item, []? expectedTypes) { } - [return: .(new string[] { - "success", - "createdInstance"})] - public static .<> TryCreateWithInitializerAsync( type, .MethodMetadata testInformation, string testSessionId) { } - public static object?[] UnwrapTupleAot(object? value) { } - } - public static class DecimalParsingHelper - { - public static decimal ParseDecimalWithCultureFallback(string value) { } - } - public static class GenericTypeHelper - { - public static GetGenericTypeDefinition( type) { } - public static bool IsConstructedGenericType( type) { } - [.("MakeGenericType requires runtime code generation")] - [.("MakeGenericType requires runtime code generation")] - public static MakeGenericTypeSafe( genericTypeDefinition, params [] typeArguments) { } - } - public static class ParallelTaskHelper - { - public static . ForEachAsync(. items, action) { } - public static . ForEachAsync(T[] items, action) { } - public static . ForEachAsync(. items, action, .CancellationToken cancellationToken) { } - public static . ForEachAsync(T[] items, action, .CancellationToken cancellationToken) { } - public static . ForEachWithIndexAsync(T[] items, action) { } - public static . ForEachWithIndexAsync(T[] items, action, .CancellationToken cancellationToken) { } - } - public class ProcessorCountParallelLimit : . - { - public ProcessorCountParallelLimit() { } - public int Limit { get; } - } - public sealed class ReferenceEqualityComparer : . - { - public static readonly . Instance; - public bool Equals(object? x, object? y) { } - public int GetHashCode(object obj) { } - } - public static class TestClassTypeHelper - { - public static GetTestClassType(.DataGeneratorMetadata dataGeneratorMetadata) { } - } - public static class TestNameGenerator - { - public static string GenerateTestName( testClass, .MethodInfo testMethod) { } - public static string GenerateTestName(string className, string methodName) { } - } - public static class TupleFactory - { - public static object? CreateTuple([.(..PublicConstructors)] tupleType, object?[] elements) { } - public static bool IsTupleType( type) { } - public static bool TryCreateTupleUsingReflection([.(..PublicConstructors)] tupleType, object?[] elements, out object? result) { } - } - public static class TupleHelper - { - [.("Tuple expansion uses reflection as fallback")] - public static . ExpandTupleArray(object? value) { } - public static bool IsTupleArrayType( type) { } - public static bool IsTupleType(. tuple) { } - public static bool IsTupleType(? type) { } - public static bool IsTupleType(object? obj) { } - public static bool ShouldUnwrapForMethodArguments(object? value, int expectedParameterCount) { } - public static object?[] UnwrapTuple(.? value) { } - public static object?[] UnwrapTuple(object? value) { } - } -} -namespace .Hooks -{ - public class AfterAssemblyHookMethod : .<.AssemblyHookContext>, <.> - { - public AfterAssemblyHookMethod() { } - public override . ExecuteAsync(.AssemblyHookContext context, .CancellationToken cancellationToken) { } - } - public class AfterClassHookMethod : .<.ClassHookContext>, <.> - { - public AfterClassHookMethod() { } - public override . ExecuteAsync(.ClassHookContext context, .CancellationToken cancellationToken) { } - } - public class AfterTestDiscoveryHookMethod : .<.TestDiscoveryContext>, <.> - { - public AfterTestDiscoveryHookMethod() { } - public override . ExecuteAsync(.TestDiscoveryContext context, .CancellationToken cancellationToken) { } - } - public class AfterTestHookMethod : .<.TestContext>, <.> - { - public AfterTestHookMethod() { } - public override . ExecuteAsync(.TestContext context, .CancellationToken cancellationToken) { } - } - public class AfterTestSessionHookMethod : .<.TestSessionContext>, <.> - { - public AfterTestSessionHookMethod() { } - public override . ExecuteAsync(.TestSessionContext context, .CancellationToken cancellationToken) { } - } - public class BeforeAssemblyHookMethod : .<.AssemblyHookContext>, <.> - { - public BeforeAssemblyHookMethod() { } - public override . ExecuteAsync(.AssemblyHookContext context, .CancellationToken cancellationToken) { } - } - public class BeforeClassHookMethod : .<.ClassHookContext>, <.> - { - public BeforeClassHookMethod() { } - public override . ExecuteAsync(.ClassHookContext context, .CancellationToken cancellationToken) { } - } - public class BeforeTestDiscoveryHookMethod : .<.BeforeTestDiscoveryContext>, <.> - { - public BeforeTestDiscoveryHookMethod() { } - public override . ExecuteAsync(.BeforeTestDiscoveryContext context, .CancellationToken cancellationToken) { } - } - public class BeforeTestHookMethod : .<.TestContext>, <.> - { - public BeforeTestHookMethod() { } - public override . ExecuteAsync(.TestContext context, .CancellationToken cancellationToken) { } - } - public class BeforeTestSessionHookMethod : .<.TestSessionContext>, <.> - { - public BeforeTestSessionHookMethod() { } - public override . ExecuteAsync(.TestSessionContext context, .CancellationToken cancellationToken) { } - } - public abstract class HookMethod : <.> - { - protected HookMethod() { } - public virtual .Assembly? Assembly { get; } - public .<> Attributes { get; } - [.(..PublicMethods)] - public abstract ClassType { get; } - public required . HookExecutor { get; init; } - public required .MethodMetadata MethodInfo { get; init; } - public string Name { get; } - public required int Order { get; init; } - public required int RegistrationIndex { get; init; } - public ? Timeout { get; } - public TAttribute? GetAttribute() - where TAttribute : { } - } - public interface IExecutableHook - { - .MethodMetadata MethodInfo { get; } - string Name { get; } - int Order { get; } - . ExecuteAsync(T context, .CancellationToken cancellationToken); - } - public interface IHookMessagePublisher - { - . Discover(string sessionId, string displayName, . hookMethod); - . Push(string sessionId, string displayName, . hookMethod, <.> func); - } - public class InstanceHookMethod : ., <.>, .<.TestContext> - { - public InstanceHookMethod() { } - public ? Body { get; init; } - [.(..PublicMethods)] - public override ClassType { get; } - public required InitClassType { init; } - public . ExecuteAsync(.TestContext context, .CancellationToken cancellationToken) { } - } - public class LastTestInAssemblyAdapter : .<.AssemblyHookContext> - { - public LastTestInAssemblyAdapter(. lastTestInAssemblyEventReceiver, .TestContext testContext) { } - public .MethodMetadata MethodInfo { get; } - public string Name { get; } - public int Order { get; } - public bool Execute(.AssemblyHookContext context, .CancellationToken cancellationToken) { } - public . ExecuteAsync(.AssemblyHookContext context, .CancellationToken cancellationToken) { } - } - [.("Method with DynamicallyAccessedMembersAttribute accessed via reflection")] - public class LastTestInClassAdapter : .<.ClassHookContext> - { - public LastTestInClassAdapter(. lastTestInClassEventReceiver, .TestContext testContext) { } - public .MethodMetadata MethodInfo { get; } - public string Name { get; } - public int Order { get; } - public bool Execute(.ClassHookContext context, .CancellationToken cancellationToken) { } - public . ExecuteAsync(.ClassHookContext context, .CancellationToken cancellationToken) { } - } - public sealed class LazyHookEntry - where T : . - { - public LazyHookEntry(T hook) { } - public LazyHookEntry(int registrationIndex, factory) { } - public int RegistrationIndex { get; } - public T Materialize() { } - } - public abstract class StaticHookMethod : ., <.> - { - protected StaticHookMethod() { } - [.(..PublicMethods)] - public override ClassType { get; } - public required string FilePath { get; init; } - public required int LineNumber { get; init; } - } - public abstract class StaticHookMethod : ., <.>, . - { - protected StaticHookMethod() { } - public ? Body { get; init; } - public abstract . ExecuteAsync(T context, .CancellationToken cancellationToken); - } -} -namespace .Interfaces -{ - public sealed class CompileTimeResolvedData - { - public CompileTimeResolvedData() { } - public . ClassData { get; init; } - public . MethodData { get; init; } - public . PropertyData { get; init; } - public .<.IDataSourceAttribute> UnresolvedAttributes { get; init; } - } - public interface IAotCompatibleAsyncDataSource : . { } - public interface IAotCompatibleDataSource : . { } - public interface IAsyncDataSource - { - .<> GenerateDataFactoriesAsync(.DataSourceContext context, .CancellationToken cancellationToken = default); - } - public interface IAsyncDiscoveryInitializer : . { } - public interface IAsyncInitializer - { - . InitializeAsync(); - } - public interface IClassConstructor - { - . Create([.(..PublicConstructors)] type, .ClassConstructorMetadata classConstructorMetadata); - } - public interface ICompileTimeDataResolver - { - bool CanResolveAtCompileTime(.IDataSourceAttribute dataAttribute); - .<.> ResolveClassDataAsync(.ClassMetadata classMetadata); - .<.> ResolveMethodDataAsync(.MethodMetadata methodMetadata); - .<.> ResolvePropertyDataAsync(.ClassMetadata classMetadata); - } - public interface IConfiguration - { - string? Get(string key); - } - public interface IContext - { - .TextWriter ErrorOutputWriter { get; } - .TextWriter OutputWriter { get; } - . GetDefaultLogger(); - } - public interface IDataSource - { - .<> GenerateDataFactories(.DataSourceContext context); - } - public interface IDisposer - { - . DisposeAsync(object? obj); - } - public interface IEventReceiver - { - int Order { get; } - } - public interface IExecutionOrder - { - int Order { get; } - int Priority { get; } - } - public interface IFirstTestInAssemblyEventReceiver : . - { - . OnFirstTestInAssembly(.AssemblyHookContext context, .TestContext testContext); - } - public interface IFirstTestInClassEventReceiver : . - { - . OnFirstTestInClass(.ClassHookContext context, .TestContext testContext); - } - public interface IFirstTestInTestSessionEventReceiver : . - { - . OnFirstTestInTestSession(.TestSessionContext current, .TestContext testContext); - } - public interface IGenericTypeResolver - { - [] ResolveGenericClassArguments([.(..PublicConstructors)] genericTypeDefinition, object?[] constructorArguments); - [] ResolveGenericMethodArguments(.MethodInfo genericMethodDefinition, object?[] runtimeArguments); - } - public interface IHasLoggers - { - .<.> Loggers { get; } - } - public interface IHookExecutor - { - . ExecuteAfterAssemblyHook(.MethodMetadata hookMethodInfo, .AssemblyHookContext context, <.> action); - . ExecuteAfterClassHook(.MethodMetadata hookMethodInfo, .ClassHookContext context, <.> action); - . ExecuteAfterTestDiscoveryHook(.MethodMetadata hookMethodInfo, .TestDiscoveryContext context, <.> action); - . ExecuteAfterTestHook(.MethodMetadata hookMethodInfo, .TestContext context, <.> action); - . ExecuteAfterTestSessionHook(.MethodMetadata hookMethodInfo, .TestSessionContext context, <.> action); - . ExecuteBeforeAssemblyHook(.MethodMetadata hookMethodInfo, .AssemblyHookContext context, <.> action); - . ExecuteBeforeClassHook(.MethodMetadata hookMethodInfo, .ClassHookContext context, <.> action); - . ExecuteBeforeTestDiscoveryHook(.MethodMetadata hookMethodInfo, .BeforeTestDiscoveryContext context, <.> action); - . ExecuteBeforeTestHook(.MethodMetadata hookMethodInfo, .TestContext context, <.> action); - . ExecuteBeforeTestSessionHook(.MethodMetadata hookMethodInfo, .TestSessionContext context, <.> action); - } - public interface IHookRegisteredEventReceiver : . - { - . OnHookRegistered(.HookRegisteredContext context); - } - public interface IInfersType { } - public interface IKeyedDataSource - { - string Key { get; set; } - } - public interface ILastTestInAssemblyEventReceiver : . - { - . OnLastTestInAssembly(.AssemblyHookContext context, .TestContext testContext); - } - public interface ILastTestInClassEventReceiver : . - { - . OnLastTestInClass(.ClassHookContext context, .TestContext testContext); - } - public interface ILastTestInTestSessionEventReceiver : . - { - . OnLastTestInTestSession(.TestSessionContext current, .TestContext testContext); - } - public interface IParallelConstraint { } - public interface IParallelLimit - { - int Limit { get; } - } - public interface ISourceGeneratedTestRegistry - { - ? GetClassFactory(string testId); - >? GetMethodInvoker(string testId); - ? GetParameterizedClassFactory(string testId); - . GetRegisteredTestIds(); - void RegisterClassFactory(string testId, factory); - void RegisterClassFactory(string testId, factory); - void RegisterMethodInvoker(string testId, > invoker); - } - public interface ITUnitPlugin : ., ., ., ., ., ., . { } - public interface ITestClass - { - [] ClassGenericArguments { get; } - object ClassInstance { get; } - [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..PublicProperties)] - ClassType { get; } - object?[] TestClassArguments { get; } - . TestClassInjectedPropertyArguments { get; } - []? TestClassParameterTypes { get; } - } - public interface ITestConfiguration - { - int RetryBackoffMs { get; } - double RetryBackoffMultiplier { get; } - int RetryLimit { get; } - ? Timeout { get; } - } - public interface ITestDependencies - { - .<.TestDetails> DependsOn { get; } - string? ParentTestId { get; } - . Relationship { get; } - .<.TestContext> GetTests(<.TestContext, bool> predicate); - .<.TestContext> GetTests(string testName); - .<.TestContext> GetTests(string testName, classType); - } - public interface ITestDetailsMetadata - { - .<, .<>> AttributesByType { get; } - . Categories { get; } - .> CustomProperties { get; } - .<> GetAllAttributes(); - . GetAttributes() - where T : ; - bool HasAttribute() - where T : ; - } - public interface ITestDiscoveryEventReceiver : . - { - . OnTestDiscovered(.DiscoveredTestContext context); - } - public interface ITestEndEventReceiver : . - { - . Stage { get; } - . OnTestEnd(.TestContext context); - } - public interface ITestEvents - { - .AsyncEvent<.TestContext>? OnDispose { get; } - .AsyncEvent<.TestContext>? OnInitialize { get; } - .AsyncEvent<.TestContext>? OnTestEnd { get; } - .AsyncEvent<.TestContext>? OnTestRegistered { get; } - [.(new string[] { - "TestContext", - "RetryAttempt"})] - .AsyncEvent<<.TestContext, int>>? OnTestRetry { get; } - .AsyncEvent<.TestContext>? OnTestSkipped { get; } - .AsyncEvent<.TestContext>? OnTestStart { get; } - } - public interface ITestExecution - { - .CancellationToken CancellationToken { get; } - int CurrentRetryAttempt { get; } - .? CustomHookExecutor { get; set; } - bool IsNotDiscoverable { get; set; } - .TestPhase Phase { get; } - bool ReportResult { get; set; } - .TestResult? Result { get; } - .<.TestResult> RetryAttempts { get; } - <.TestContext, , int, .>? RetryFunc { get; } - string? SkipReason { get; } - ? TestEnd { get; } - ? TestStart { get; } - void AddLinkedCancellationToken(.CancellationToken cancellationToken); - void Cancel(); - void OverrideResult(.TestState state, string reason); - } - public interface ITestExecutor - { - . ExecuteTest(.TestContext context, <.> action); - } - public interface ITestFinder - { - .<.TestContext> GetTests( classType); - .TestContext[] GetTestsByNameAndParameters(string testName, .<> methodParameterTypes, classType, .<> classParameterTypes, . classArguments); - } - public interface ITestIdentity - { - string MethodName { get; } - string TestId { get; } - string TestName { get; } - } - public interface ITestIsolation - { - int UniqueId { get; } - string GetIsolatedName(string baseName); - string GetIsolatedPrefix(string separator = "_"); - } - public interface ITestLocation - { - string TestFilePath { get; } - int TestLineNumber { get; } - } - public interface ITestMetadata - { - .IDataSourceAttribute ClassDataSource { get; } - string DefinitionId { get; } - string DisplayName { get; set; } - ? DisplayNameFormatter { get; set; } - .IDataSourceAttribute MethodDataSource { get; } - .TestDetails TestDetails { get; } - string TestName { get; } - } - public interface ITestMethod - { - [] MethodGenericArguments { get; } - .MethodMetadata MethodMetadata { get; } - ReturnType { get; } - object?[] TestMethodArguments { get; } - } - public interface ITestNameFormatter - { - string BuildTestId(string template, int testIndex, int repeatIndex = 0, int classDataIndex = 0, int methodDataIndex = 0); - string FormatArgumentValue(object? value); - string FormatTestName(string template, object?[]? classArgs = null, object?[]? methodArgs = null, .? propertyValues = null); - } - public interface ITestOutput - { - .<.Artifact> Artifacts { get; } - .TextWriter ErrorOutput { get; } - .TextWriter StandardOutput { get; } - [("Use OpenTelemetry activity spans instead. Hook timings are now automatically reco" + - "rded as OTel child spans of the test activity.")] - .<.Timing> Timings { get; } - void AttachArtifact(.Artifact artifact); - void AttachArtifact(string filePath, string? displayName = null, string? description = null); - string GetErrorOutput(); - string GetStandardOutput(); - [("Use OpenTelemetry activity spans instead. Hook timings are now automatically reco" + - "rded as OTel child spans of the test activity.")] - void RecordTiming(.Timing timing); - void WriteError(string message); - void WriteLine(string message); - } - public interface ITestParallelization - { - .<.> Constraints { get; } - . ExecutionPriority { get; set; } - .? Limiter { get; } - void AddConstraint(. constraint); - } - public interface ITestRegisteredEventReceiver : . - { - . OnTestRegistered(.TestRegisteredContext context); - } - public interface ITestRegistry - { - [.("Adding dynamic tests requires runtime compilation and reflection which are not su" + - "pported in native AOT scenarios.")] - . AddDynamicTest<[.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicMethods | ..NonPublicMethods | ..PublicFields | ..NonPublicFields | ..PublicProperties)] T>(.TestContext context, .DynamicTest dynamicTest) - where T : class; - [.("Creating test variants requires runtime compilation and reflection which are not " + - "supported in native AOT scenarios.")] - .<.TestVariantInfo> CreateTestVariant(.TestContext currentContext, object?[]? methodArguments, object?[]? classArguments, .? properties, . relationship, string? displayName); - } - public interface ITestRetryEventReceiver : . - { - . OnTestRetry(.TestContext context, int retryAttempt); - } - public interface ITestSkippedEventReceiver : . - { - . OnTestSkipped(.TestContext context); - } - public interface ITestStartEventReceiver : . - { - . Stage { get; } - . OnTestStart(.TestContext context); - } - public interface ITestStateBag - { - int Count { get; } - object? this[string key] { get; set; } - . Items { get; } - bool ContainsKey(string key); - T GetOrAdd(string key, valueFactory); - bool TryGetValue(string key, [.(false)] out T value); - bool TryRemove(string key, [.(false)] out object? value); - } - public interface ITypedTestMetadata - { - [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..PublicMethods | ..PublicProperties)] - TestClassType { get; } - } -} -namespace . -{ - public interface IPropertySource - { - bool ShouldInitialize { get; } - Type { get; } - .<..PropertyInjectionMetadata> GetPropertyMetadata(); - } - public sealed class PropertyInjectionMetadata - { - public PropertyInjectionMetadata() { } - [.(..None | ..PublicProperties | ..NonPublicProperties)] - public required ContainingType { get; init; } - public required <.IDataSourceAttribute> CreateDataSource { get; init; } - public ? GetProperty { get; init; } - public required string PropertyName { get; init; } - [.(..None | ..PublicParameterlessConstructor | ..PublicConstructors | ..NonPublicConstructors | ..PublicProperties)] - public required PropertyType { get; init; } - public required SetProperty { get; init; } - } -} -namespace .Logging -{ - public class DefaultLogger : . - { - public DefaultLogger(.Context context) { } - protected .Context Context { get; } - protected virtual string GenerateMessage(string message, ? exception, . logLevel) { } - public override void Log(. logLevel, TState state, ? exception, formatter) { } - public override . LogAsync(. logLevel, TState state, ? exception, formatter) { } - public void PushProperties(.> dictionary) { } - public void PushProperty(string name, object? value) { } - protected virtual void WriteToOutput(string message, bool isError) { } - protected virtual . WriteToOutputAsync(string message, bool isError) { } - } - public interface ILogSink - { - bool IsEnabled(. level); - void Log(. level, string message, ? exception, .Context? context); - . LogAsync(. level, string message, ? exception, .Context? context); - } - public interface ILogger - { - bool IsEnabled(. logLevel); - void Log(. logLevel, TState state, ? exception, formatter); - . LogAsync(. logLevel, TState state, ? exception, formatter); - } - public interface ILogger : . { } - public enum LogLevel - { - Trace = 0, - Debug = 1, - Information = 2, - Warning = 3, - Error = 4, - Critical = 5, - None = 6, - } - public static class LoggingExtensions - { - public static void LogCritical(this . logger, string message) { } - public static . LogCriticalAsync(this . logger, string message) { } - public static void LogDebug(this . logger, string message) { } - public static . LogDebugAsync(this . logger, string message) { } - public static void LogError(this . logger, ex) { } - public static void LogError(this . logger, string message) { } - public static void LogError(this . logger, string message, ex) { } - public static . LogErrorAsync(this . logger, ex) { } - public static . LogErrorAsync(this . logger, string message) { } - public static . LogErrorAsync(this . logger, string message, ex) { } - public static void LogInformation(this . logger, string message) { } - public static . LogInformationAsync(this . logger, string message) { } - public static void LogTrace(this . logger, string message) { } - public static . LogTraceAsync(this . logger, string message) { } - public static void LogWarning(this . logger, string message) { } - public static . LogWarningAsync(this . logger, string message) { } - } - public abstract class TUnitLogger : . - { - protected TUnitLogger() { } - public virtual bool IsEnabled(. logLevel) { } - public abstract void Log(. logLevel, TState state, ? exception, formatter); - public abstract . LogAsync(. logLevel, TState state, ? exception, formatter); - } - public static class TUnitLoggerFactory - { - public static void AddSink(. sink) { } - public static void AddSink() - where TSink : ., new () { } - } -} -namespace .Models -{ - public enum ExecutionContextType - { - Parallel = 0, - NotInParallel = 1, - KeyedNotInParallel = 2, - ParallelGroup = 3, - } - public class TestExecutionContext : <.> - { - public TestExecutionContext() { } - public required . ContextType { get; init; } - public string? GroupKey { get; init; } - public int? Order { get; init; } - } - public class TestExecutionData - { - public TestExecutionData() { } - public <.DataGeneratorMetadata, .CancellationToken, .<.>>? AsyncDataExecutor { get; set; } - public <.DataGeneratorMetadata, .CancellationToken, .<.<<.>>>>? AsyncDataSourceResolver { get; set; } - public <.<.>>? AsyncMethodDataResolver { get; set; } - public ? ClassFactory { get; set; } - public bool HasAsyncDataSource { get; } - public bool HasMethodDataResolver { get; } - public bool HasStronglyTypedDelegates { get; } - public <.>? MethodDataResolver { get; set; } - public ? MethodInvoker { get; set; } - } -} -namespace .PropertyInjection -{ - public static class PropertyCacheKeyGenerator - { - public static string GetCacheKey(.PropertyInfo property) { } - public static string GetCacheKey(..PropertyInjectionMetadata metadata) { } - } -} -namespace .Services -{ - [.("Generic type resolution requires runtime type generation")] - public class GenericTypeResolver : . - { - public GenericTypeResolver() { } - public [] ResolveGenericClassArguments([.(..PublicConstructors)] genericTypeDefinition, object?[] constructorArguments) { } - public [] ResolveGenericMethodArguments(.MethodInfo genericMethodDefinition, object?[] runtimeArguments) { } - } - public static class ModeDetector - { - public static bool IsSourceGenerationAvailable { get; } - } - public class NoOpGenericTypeResolver : . - { - public NoOpGenericTypeResolver() { } - public [] ResolveGenericClassArguments([.(..PublicConstructors)] genericTypeDefinition, object?[] constructorArguments) { } - public [] ResolveGenericMethodArguments(.MethodInfo genericMethodDefinition, object?[] runtimeArguments) { } - } - public static class ServiceProviderExtensions - { - public static object GetRequiredService(this serviceProvider, serviceType) { } - public static T GetRequiredService(this serviceProvider) - where T : class { } - public static T? GetService(this serviceProvider) - where T : class { } - } - public class TestExecutionRegistry : . - { - public TestExecutionRegistry() { } - public static . Instance { get; } - public void Clear() { } - public <.DataGeneratorMetadata, .CancellationToken, .<.>>? GetAsyncDataExecutor(string testId) { } - public <.DataGeneratorMetadata, .CancellationToken, .<.<<.>>>>? GetAsyncDataSourceResolver(string testId) { } - public <.<.>>? GetAsyncMethodDataResolver(string testId) { } - public ? GetClassFactory(string testId) { } - public <.>? GetMethodDataResolver(string testId) { } - public >? GetMethodInvoker(string testId) { } - public . GetOrCreateTestData(string testId) { } - public ? GetParameterizedClassFactory(string testId) { } - public . GetRegisteredTestIds() { } - public T? GetStronglyTypedClassFactory(string testId) - where T : { } - public T? GetStronglyTypedMethodInvoker(string testId) - where T : { } - public .? GetTestData(string testId) { } - public bool HasAsyncDataSourceResolver(string testId) { } - public bool HasMethodDataResolver(string testId) { } - public bool HasStronglyTypedFactory(string testId) { } - public void RegisterAsyncDataExecutor(string testId, <.DataGeneratorMetadata, .CancellationToken, .<.>> executor) { } - public void RegisterAsyncDataSourceResolver(string testId, <.DataGeneratorMetadata, .CancellationToken, .<.<<.>>>> resolver) { } - public void RegisterAsyncMethodDataResolver(string testId, <.<.>> resolver) { } - public void RegisterClassFactory(string testId, factory) { } - public void RegisterClassFactory(string testId, factory) { } - public void RegisterMethodDataResolver(string testId, <.> resolver) { } - public void RegisterMethodInvoker(string testId, > invoker) { } - public void RegisterStronglyTypedClassFactory(string testId, factory) - where T : class { } - public void RegisterStronglyTypedClassFactory(string testId, factory) - where T : class { } - public void RegisterStronglyTypedMethodInvoker(string testId, invoker) - where T : class { } - public void RegisterTest(string testId, . data) { } - } - public class TestNameFormatter : . - { - public TestNameFormatter() { } - public string BuildTestId(string template, int testIndex, int repeatIndex = 0, int classDataIndex = 0, int methodDataIndex = 0) { } - public string FormatArgumentValue(object? value) { } - public string FormatTestName(string template, object?[]? classArgs = null, object?[]? methodArgs = null, .? propertyValues = null) { } - } - public class TestServiceProvider : - { - public TestServiceProvider() { } - public . AddSingleton( serviceType, object service) { } - public . AddSingleton(T service) - where T : class { } - public . AddTransient( serviceType, factory) { } - public . AddTransient( factory) - where T : class { } - public object? GetService( serviceType) { } - } -} -namespace .Settings -{ - public sealed class DisplaySettings - { - public bool DetailedStackTrace { get; set; } - } - public sealed class ExecutionSettings - { - public bool FailFast { get; set; } - public bool FailOnUnobservedTaskExceptions { get; set; } - public bool ThreadPoolTuningEnabled { get; set; } - } - public sealed class ParallelismSettings - { - public int? MaximumParallelTests { get; set; } - } - public sealed class ReportingSettings - { - public bool ArtifactUploadEnabled { get; set; } - public bool HtmlReportEnabled { get; set; } - public bool JsonReportEnabled { get; set; } - } - public sealed class TUnitSettings - { - public . Display { get; } - public . Execution { get; } - public . Parallelism { get; } - public . Reporting { get; } - public . Timeouts { get; } - } - public sealed class TimeoutSettings - { - public DefaultHookTimeout { get; set; } - public DefaultTestTimeout { get; set; } - public ForcefulExitTimeout { get; set; } - public ProcessExitHookDelay { get; set; } - } -} -namespace .StaticProperties -{ - public sealed class StaticPropertyMetadata - { - public StaticPropertyMetadata() { } - public required DeclaringType { get; init; } - public required <.> InitializerAsync { get; init; } - public required string PropertyName { get; init; } - public required PropertyType { get; init; } - } - public static class StaticPropertyRegistry - { - public static .<.> GetRegisteredProperties() { } - public static int Register(. metadata) { } - public static bool TryGetInitializedValue( declaringType, string propertyName, out object? value) { } - } -} \ No newline at end of file diff --git a/tests/TUnit.PublicAPI/Tests.OpenTelemetry_Library_Has_No_API_Changes.DotNet8_0.verified.txt b/tests/TUnit.PublicAPI/Tests.OpenTelemetry_Library_Has_No_API_Changes.DotNet11_0.verified.txt similarity index 96% rename from tests/TUnit.PublicAPI/Tests.OpenTelemetry_Library_Has_No_API_Changes.DotNet8_0.verified.txt rename to tests/TUnit.PublicAPI/Tests.OpenTelemetry_Library_Has_No_API_Changes.DotNet11_0.verified.txt index 88a39050e84..c28580cbe0d 100644 --- a/tests/TUnit.PublicAPI/Tests.OpenTelemetry_Library_Has_No_API_Changes.DotNet8_0.verified.txt +++ b/tests/TUnit.PublicAPI/Tests.OpenTelemetry_Library_Has_No_API_Changes.DotNet11_0.verified.txt @@ -1,7 +1,7 @@ [assembly: .(@".Core, PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] [assembly: .(@".Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] [assembly: .(@".Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")] +[assembly: .(".NETCoreApp,Version=v11.0", FrameworkDisplayName=".NET 11.0")] namespace { public static class AutoReceiver diff --git a/tests/TUnit.PublicAPI/Tests.OpenTelemetry_Library_Has_No_API_Changes.DotNet9_0.verified.txt b/tests/TUnit.PublicAPI/Tests.OpenTelemetry_Library_Has_No_API_Changes.DotNet9_0.verified.txt deleted file mode 100644 index 647b8cfc0fc..00000000000 --- a/tests/TUnit.PublicAPI/Tests.OpenTelemetry_Library_Has_No_API_Changes.DotNet9_0.verified.txt +++ /dev/null @@ -1,41 +0,0 @@ -[assembly: .(@".Core, PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(@".Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(@".Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(".NETCoreApp,Version=v9.0", FrameworkDisplayName=".NET 9.0")] -namespace -{ - public static class AutoReceiver - { - public const int AutoReceiverOrder = -2147482648; - public static string? Endpoint { get; } - [.Before(., "PATH_SCRUBBED", 39, Order=-2147482648)] - public static void Start() { } - [.After(., "PATH_SCRUBBED", 61, Order=-2147482648)] - public static . Stop() { } - } - public static class AutoStart - { - public const int AutoStartOrder = 2147483647; - [.Before(., "PATH_SCRUBBED", 29, Order=2147483647)] - public static void Start() { } - [.After(., "PATH_SCRUBBED", 96, Order=2147483647)] - public static void Stop() { } - } - public sealed class CorrelationScope - { - public const string FactoryIdBaggageKey = ".id"; - public CorrelationScope() { } - public string FactoryId { get; } - } - public static class TUnitOpenTelemetry - { - public static void Configure(<.TracerProviderBuilder> configure) { } - } - public sealed class TUnitTestCorrelationProcessor : <.Activity> - { - public TUnitTestCorrelationProcessor() { } - public TUnitTestCorrelationProcessor(.CorrelationScope? scope) { } - public override void OnEnd(.Activity activity) { } - public override void OnStart(.Activity activity) { } - } -} \ No newline at end of file diff --git a/tests/TUnit.PublicAPI/Tests.Playwright_Library_Has_No_API_Changes.DotNet8_0.verified.txt b/tests/TUnit.PublicAPI/Tests.Playwright_Library_Has_No_API_Changes.DotNet11_0.verified.txt similarity index 98% rename from tests/TUnit.PublicAPI/Tests.Playwright_Library_Has_No_API_Changes.DotNet8_0.verified.txt rename to tests/TUnit.PublicAPI/Tests.Playwright_Library_Has_No_API_Changes.DotNet11_0.verified.txt index a3f493b4631..8e7007842c9 100644 --- a/tests/TUnit.PublicAPI/Tests.Playwright_Library_Has_No_API_Changes.DotNet8_0.verified.txt +++ b/tests/TUnit.PublicAPI/Tests.Playwright_Library_Has_No_API_Changes.DotNet11_0.verified.txt @@ -1,5 +1,5 @@ [assembly: .(@", PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")] +[assembly: .(".NETCoreApp,Version=v11.0", FrameworkDisplayName=".NET 11.0")] namespace { public class BrowserFixture : , . diff --git a/tests/TUnit.PublicAPI/Tests.Playwright_Library_Has_No_API_Changes.DotNet9_0.verified.txt b/tests/TUnit.PublicAPI/Tests.Playwright_Library_Has_No_API_Changes.DotNet9_0.verified.txt deleted file mode 100644 index 49ea0c52a8f..00000000000 --- a/tests/TUnit.PublicAPI/Tests.Playwright_Library_Has_No_API_Changes.DotNet9_0.verified.txt +++ /dev/null @@ -1,170 +0,0 @@ -[assembly: .(@", PublicKey=0024000004800000940000000602000000240000525341310004000001000100698a70398fa0b2230c5a72e3bd9d56b48f809f6173e49a19fbb942d621be93ad48c5566b47b28faabc359b9ad3ff4e00bbdea88f5bdfa250f391fedd28182b2e37b55d429c0151a42a98ea7a5821818cd15a79fef9903e8607a88304cf3e0317bf86ec96e32e1381535a6582251e5a6eed40b5a3ed82bc444598b1269cce57a7")] -[assembly: .(".NETCoreApp,Version=v9.0", FrameworkDisplayName=".NET 9.0")] -namespace -{ - public class BrowserFixture : , . - { - public BrowserFixture() { } - public .IBrowser Browser { get; } - public virtual string BrowserName { get; } - public ? DisconnectedAt { get; } - [.ClassDataSourceAttribute<.PlaywrightFixture>(Shared=.)] - public required .PlaywrightFixture PlaywrightFixture { get; init; } - public virtual . DisposeAsync() { } - protected virtual .BrowserTypeLaunchOptions GetLaunchOptions() { } - public virtual . InitializeAsync() { } - } - public class BrowserTest : .PlaywrightTest - { - public BrowserTest() { } - public BrowserTest(.BrowserTypeLaunchOptions options) { } - public .IBrowser Browser { get; } - public virtual bool PropagateTraceContext { get; } - public virtual .? TraceContextOrigins { get; } - [.Before(., "", 0)] - public . BrowserSetup() { } - [.After(., "", 0)] - public . BrowserTearDown(.TestContext testContext) { } - public .<.IBrowserContext> NewContext(.BrowserNewContextOptions options) { } - } - [(.Assembly | .Class | .Method)] - public class CaptureOnFailureAttribute : .TUnitAttribute, .IScopedAttribute, ., ., . - { - public CaptureOnFailureAttribute(string path = "playwright-artifacts") { } - public int Order { get; } - public string Path { get; } - public ScopeType { get; } - public bool Screenshot { get; set; } - public bool Trace { get; set; } - public . OnTestDiscovered(.DiscoveredTestContext discoveredTestContext) { } - public . OnTestEnd(.TestContext context) { } - } - public class ContextFixture : , ., ., . - { - public ContextFixture() { } - [.ClassDataSourceAttribute<.BrowserFixture>(Shared=.)] - public required .BrowserFixture BrowserFixture { get; init; } - public .IBrowserContext Context { get; } - protected virtual bool PropagateTraceContext { get; } - protected virtual .? TraceContextOrigins { get; } - public virtual . DisposeAsync() { } - protected virtual .BrowserNewContextOptions GetContextOptions() { } - public virtual . InitializeAsync() { } - } - public class ContextTest : .BrowserTest - { - public ContextTest() { } - public ContextTest(.BrowserTypeLaunchOptions options) { } - public .IBrowserContext Context { get; } - public virtual .BrowserNewContextOptions ContextOptions(.TestContext testContext) { } - [.Before(., "", 0)] - public . ContextSetup(.TestContext testContext) { } - } - public sealed class DefaultPlaywrightParallelLimiter : . - { - public DefaultPlaywrightParallelLimiter() { } - public int Limit { get; } - } - public interface IWorkerService - { - . DisposeAsync(); - . ResetAsync(); - } - public class PageFixture : , ., ., . - { - public PageFixture() { } - [.ClassDataSourceAttribute<.ContextFixture>] - public required .ContextFixture ContextFixture { get; init; } - public .IPage Page { get; } - public virtual . DisposeAsync() { } - public virtual . InitializeAsync() { } - } - public class PageTest : .ContextTest - { - public PageTest() { } - public PageTest(.BrowserTypeLaunchOptions options) { } - public .IPage Page { get; } - [.Before(., "", 0)] - public . PageSetup() { } - } - public class PlaywrightFixture : , . - { - public PlaywrightFixture() { } - public .IPlaywright Playwright { get; } - protected virtual string TestIdAttribute { get; } - public virtual . DisposeAsync() { } - public .IAPIResponseAssertions Expect(.IAPIResponse response) { } - public .ILocatorAssertions Expect(.ILocator locator) { } - public .IPageAssertions Expect(.IPage page) { } - public virtual . InitializeAsync() { } - } - public static class PlaywrightSettingsExtensions - { - extension(. settings) - { - public .TUnitPlaywrightSettings PlaywrightSettings { get; } - } - } - public class PlaywrightSkipAttribute : .SkipAttribute - { - public PlaywrightSkipAttribute(params .[] combinations) { } - public .TestContext? TestContext { get; set; } - public override . ShouldSkip(.TestRegisteredContext context) { } - [] - public enum Targets : short - { - Windows = 1, - Linux = 2, - OSX = 4, - Chromium = 8, - Firefox = 16, - Webkit = 32, - } - } - public class PlaywrightTest : .WorkerAwareTest - { - public PlaywrightTest() { } - public virtual string BrowserName { get; } - public .IBrowserType BrowserType { get; } - public static .IPlaywright Playwright { get; } - public .IAPIResponseAssertions Expect(.IAPIResponse response) { } - public .ILocatorAssertions Expect(.ILocator locator) { } - public .IPageAssertions Expect(.IPage page) { } - [.After(., "", 0)] - public static void PlaywrightCleanup() { } - [.Before(., "", 0)] - public static . PlaywrightSetup() { } - public static void SetDefaultExpectTimeout(float timeout) { } - } - [(.Method)] - public class RecordVideoAttribute : .TUnitAttribute, ., ., . - { - public RecordVideoAttribute(string path = "playwright-artifacts", int width = 1280, int height = 1400) { } - public int Height { get; } - public int Order { get; } - public string Path { get; } - public int Width { get; } - public . OnTestDiscovered(.DiscoveredTestContext discoveredTestContext) { } - public . OnTestEnd(.TestContext context) { } - } - public class TUnitPlaywrightSettings - { - public .BrowserNewContextOptions? DefaultBrowserNewContextOptions { get; set; } - public .BrowserTypeLaunchOptions? DefaultBrowserTypeLaunchOptions { get; set; } - public bool RelaunchDisconnectedBrowser { get; set; } - } - public class WorkerAwareTest : ., . - { - public WorkerAwareTest() { } - public virtual bool UseDefaultParallelLimiter { get; } - public int WorkerIndex { get; } - public . OnTestRegistered(.TestRegisteredContext context) { } - public . RegisterService(string name, <.> factory) - where T : class, .IWorkerService { } - protected bool TestOk(.TestContext testContext) { } - [.Before(., "", 0)] - public void WorkerSetup() { } - [.After(., "", 0)] - public . WorkerTeardown(.TestContext testContext) { } - } -} \ No newline at end of file diff --git a/tests/TUnit.PublicAPI/Tests.Should_Library_Has_No_API_Changes.DotNet9_0.verified.txt b/tests/TUnit.PublicAPI/Tests.Should_Library_Has_No_API_Changes.DotNet11_0.verified.txt similarity index 99% rename from tests/TUnit.PublicAPI/Tests.Should_Library_Has_No_API_Changes.DotNet9_0.verified.txt rename to tests/TUnit.PublicAPI/Tests.Should_Library_Has_No_API_Changes.DotNet11_0.verified.txt index c6c6632bc0d..f4d48c59d96 100644 --- a/tests/TUnit.PublicAPI/Tests.Should_Library_Has_No_API_Changes.DotNet9_0.verified.txt +++ b/tests/TUnit.PublicAPI/Tests.Should_Library_Has_No_API_Changes.DotNet11_0.verified.txt @@ -1,4 +1,4 @@ -[assembly: .(".NETCoreApp,Version=v9.0", FrameworkDisplayName=".NET 9.0")] +[assembly: .(".NETCoreApp,Version=v11.0", FrameworkDisplayName=".NET 11.0")] namespace . { [(.Class, AllowMultiple=false)] diff --git a/tests/TUnit.PublicAPI/Tests.Should_Library_Has_No_API_Changes.DotNet8_0.verified.txt b/tests/TUnit.PublicAPI/Tests.Should_Library_Has_No_API_Changes.DotNet8_0.verified.txt deleted file mode 100644 index ebddb57737c..00000000000 --- a/tests/TUnit.PublicAPI/Tests.Should_Library_Has_No_API_Changes.DotNet8_0.verified.txt +++ /dev/null @@ -1,973 +0,0 @@ -[assembly: .(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")] -namespace . -{ - [(.Class, AllowMultiple=false)] - public sealed class ShouldGeneratePartialAttribute : - { - public ShouldGeneratePartialAttribute( wrappedTypeDefinition) { } - public WrappedTypeDefinition { get; } - } - [(.Class, AllowMultiple=false)] - public sealed class ShouldNameAttribute : - { - public ShouldNameAttribute(string name) { } - public string Name { get; } - } -} -namespace . -{ - public interface IShouldSource { } - public interface IShouldSource : ..IShouldSource - { - . Context { get; } - string? ConsumeBecauseMessage(); - } - public sealed class ShouldAssertion : ., ..IShouldSource, ..IShouldSource - { - public ShouldAssertion(. context, . inner) { } - public ..ShouldContinuation And { get; } - public . Context { get; } - public ..ShouldContinuation Or { get; } - public . AssertAsync() { } - public ..ShouldAssertion Because(string message) { } - public . GetAwaiter() { } - } - [..ShouldGeneratePartial(typeof(.))] - public sealed class ShouldCollectionSource : ..ShouldEnumerableSourceBase<., TItem, ..ShouldCollectionSource> - { - public ShouldCollectionSource(.? value, string? expression) { } - public ..ShouldAssertion<.> BeEmpty() { } - public ..ShouldAssertion<.> BeInDescendingOrder() { } - public ..ShouldAssertion<.> BeInOrder() { } - public ..ShouldAssertion<.> Contain( predicate, [.("predicate")] string? expression = null) { } - public ..ShouldAssertion<.> Contain(TItem expected, [.("expected")] string? expression = null) { } - public ..ShouldAssertion<.> Contain(TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public ..ShouldAssertion<.> HaveAtLeast(int minCount, [.("minCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveAtMost(int maxCount, [.("maxCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveCount(int expectedCount, [.("expectedCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveCountBetween(int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public ..ShouldAssertion<.> HaveDistinctItems() { } - public ..ShouldAssertion<.> HaveDistinctItems(. comparer, [.("comparer")] string? comparerExpression = null) { } - public ..ShouldSingleItemAssertion<., TItem> HaveSingleItem() { } - public ..ShouldAssertion<.> NotBeEmpty() { } - public ..ShouldAssertion<.> NotContain(TItem expected, [.("expected")] string? expression = null) { } - public ..ShouldAssertion<.> NotContain(TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - } - public readonly struct ShouldContinuation : ..IShouldSource, ..IShouldSource - { - public ShouldContinuation(. context) { } - public . Context { get; } - public ..ShouldContinuation Because(string message) { } - } - public readonly struct ShouldDelegateCollectionSource : ..IShouldSource, ..IShouldSource<.> - { - public ShouldDelegateCollectionSource(.<.> context) { } - public .<.> Context { get; } - public ..ShouldDelegateCollectionSource Because(string message) { } - public ..ShouldAssertion<.> HaveAtLeast(int minCount, [.("minCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveAtMost(int maxCount, [.("maxCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveCount(int expectedCount, [.("expectedCount")] string? expression = null) { } - public ..ShouldAssertion Throw() - where TException : { } - public ..ShouldAssertion ThrowExactly() - where TException : { } - } - public readonly struct ShouldDelegateSource : ..IShouldSource, ..IShouldSource - { - public ShouldDelegateSource(. context) { } - public . Context { get; } - public ..ShouldDelegateSource Because(string message) { } - public ..ShouldAssertion Throw() - where TException : { } - public ..ShouldAssertion ThrowExactly() - where TException : { } - } - [..ShouldGeneratePartial(typeof(.))] - public sealed class ShouldDictionarySource : ..ShouldEnumerableSourceBase<., ., ..ShouldDictionarySource> - where TKey : notnull - { - public ShouldDictionarySource(.? value, string? expression) { } - public ..ShouldAssertion<.> AllKeys( predicate, [.("predicate")] string? expression = null) { } - public ..ShouldAssertion<.> AllValues( predicate, [.("predicate")] string? expression = null) { } - public ..ShouldAssertion<.> AnyKey( predicate, [.("predicate")] string? expression = null) { } - public ..ShouldAssertion<.> AnyValue( predicate, [.("predicate")] string? expression = null) { } - public ..ShouldAssertion<.> BeEmpty() { } - public ..ShouldAssertion<.> BeInDescendingOrder() { } - public ..ShouldAssertion<.> BeInOrder() { } - public ..ShouldAssertion<.> Contain(. expected, [.("expected")] string? expression = null) { } - public ..ShouldAssertion<.> Contain(<., bool> predicate, [.("predicate")] string? expression = null) { } - public ..ShouldAssertion<.> Contain(. expected, .<.> comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public ..ShouldAssertion<.> ContainKey(TKey expectedKey, [.("expectedKey")] string? expression = null) { } - public ..ShouldAssertion<.> ContainKey(TKey expectedKey, .? comparer, [.("expectedKey")] string? keyExpression = null, [.("comparer")] string? comparerExpression = null) { } - public ..ShouldAssertion<.> ContainKeyWithValue(TKey expectedKey, TValue expectedValue, [.("expectedKey")] string? keyExpression = null, [.("expectedValue")] string? valueExpression = null) { } - public ..ShouldAssertion<.> ContainValue(TValue expectedValue, [.("expectedValue")] string? expression = null) { } - public ..ShouldAssertion<.> HaveAtLeast(int minCount, [.("minCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveAtMost(int maxCount, [.("maxCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveCount(int expectedCount, [.("expectedCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveCountBetween(int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public ..ShouldAssertion<.> HaveDistinctItems() { } - public ..ShouldAssertion<.> HaveDistinctItems(.<.> comparer, [.("comparer")] string? comparerExpression = null) { } - public ..ShouldAssertion<.> HaveSingleItem() { } - public ..ShouldAssertion<.> NotBeEmpty() { } - public ..ShouldAssertion<.> NotContain(. expected, [.("expected")] string? expression = null) { } - public ..ShouldAssertion<.> NotContain(. expected, .<.> comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public ..ShouldAssertion<.> NotContainKey(TKey expectedKey, [.("expectedKey")] string? expression = null) { } - public ..ShouldAssertion<.> NotContainValue(TValue expectedValue, [.("expectedValue")] string? expression = null) { } - } - public abstract class ShouldEnumerableSourceBase : ..ShouldSourceBase - where TCollection : . - where TSelf : ..ShouldEnumerableSourceBase - { - protected ShouldEnumerableSourceBase(. context) { } - public ..ShouldAssertion All( predicate, [.("predicate")] string? expression = null) { } - public ..ShouldAssertion Any( predicate, [.("predicate")] string? expression = null) { } - protected TAssertion ApplyBecause(TAssertion assertion) - where TAssertion : . { } - public ..ShouldAssertion HaveSingleItem( predicate, [.("predicate")] string? expression = null) { } - } - [..ShouldGeneratePartial(typeof(.))] - public sealed class ShouldHashSetSource : ..ShouldSetSourceBase<., TItem, ..ShouldHashSetSource> - { - public ShouldHashSetSource(.? value, string? expression) { } - public ..ShouldAssertion<.> BeEmpty() { } - public ..ShouldAssertion<.> BeInDescendingOrder() { } - public ..ShouldAssertion<.> BeInOrder() { } - public ..ShouldAssertion<.> Contain( predicate, [.("predicate")] string? expression = null) { } - public ..ShouldAssertion<.> Contain(TItem expected, [.("expected")] string? expression = null) { } - public ..ShouldAssertion<.> Contain(TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - protected override . CreateSetAdapter(. value) { } - public ..ShouldAssertion<.> HaveAtLeast(int minCount, [.("minCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveAtMost(int maxCount, [.("maxCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveCount(int expectedCount, [.("expectedCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveCountBetween(int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public ..ShouldAssertion<.> HaveDistinctItems() { } - public ..ShouldAssertion<.> HaveDistinctItems(. comparer, [.("comparer")] string? comparerExpression = null) { } - public ..ShouldSingleItemAssertion<., TItem> HaveSingleItem() { } - public ..ShouldAssertion<.> NotBeEmpty() { } - public ..ShouldAssertion<.> NotContain(TItem expected, [.("expected")] string? expression = null) { } - public ..ShouldAssertion<.> NotContain(TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - } - [..ShouldGeneratePartial(typeof(.))] - public sealed class ShouldMutableDictionarySource : ..ShouldEnumerableSourceBase<., ., ..ShouldMutableDictionarySource> - where TKey : notnull - { - public ShouldMutableDictionarySource(.? value, string? expression) { } - public ..ShouldAssertion<.> AllKeys( predicate, [.("predicate")] string? expression = null) { } - public ..ShouldAssertion<.> AllValues( predicate, [.("predicate")] string? expression = null) { } - public ..ShouldAssertion<.> AnyKey( predicate, [.("predicate")] string? expression = null) { } - public ..ShouldAssertion<.> AnyValue( predicate, [.("predicate")] string? expression = null) { } - public ..ShouldAssertion<.> BeEmpty() { } - public ..ShouldAssertion<.> BeInDescendingOrder() { } - public ..ShouldAssertion<.> BeInOrder() { } - public ..ShouldAssertion<.> Contain(. expected, [.("expected")] string? expression = null) { } - public ..ShouldAssertion<.> Contain(<., bool> predicate, [.("predicate")] string? expression = null) { } - public ..ShouldAssertion<.> Contain(. expected, .<.> comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public ..ShouldAssertion<.> ContainKey(TKey expectedKey, [.("expectedKey")] string? expression = null) { } - public ..ShouldAssertion<.> ContainKey(TKey expectedKey, .? comparer, [.("expectedKey")] string? keyExpression = null, [.("comparer")] string? comparerExpression = null) { } - public ..ShouldAssertion<.> ContainKeyWithValue(TKey expectedKey, TValue expectedValue, [.("expectedKey")] string? keyExpression = null, [.("expectedValue")] string? valueExpression = null) { } - public ..ShouldAssertion<.> ContainValue(TValue expectedValue, [.("expectedValue")] string? expression = null) { } - public ..ShouldAssertion<.> HaveAtLeast(int minCount, [.("minCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveAtMost(int maxCount, [.("maxCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveCount(int expectedCount, [.("expectedCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveCountBetween(int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public ..ShouldAssertion<.> HaveDistinctItems() { } - public ..ShouldAssertion<.> HaveDistinctItems(.<.> comparer, [.("comparer")] string? comparerExpression = null) { } - public ..ShouldAssertion<.> HaveSingleItem() { } - public ..ShouldAssertion<.> NotBeEmpty() { } - public ..ShouldAssertion<.> NotContain(. expected, [.("expected")] string? expression = null) { } - public ..ShouldAssertion<.> NotContain(. expected, .<.> comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public ..ShouldAssertion<.> NotContainKey(TKey expectedKey, [.("expectedKey")] string? expression = null) { } - public ..ShouldAssertion<.> NotContainValue(TValue expectedValue, [.("expectedValue")] string? expression = null) { } - } - [..ShouldGeneratePartial(typeof(.))] - public sealed class ShouldReadOnlySetSource : ..ShouldSetSourceBase<., TItem, ..ShouldReadOnlySetSource> - { - public ShouldReadOnlySetSource(.? value, string? expression) { } - public ..ShouldAssertion<.> BeEmpty() { } - public ..ShouldAssertion<.> BeInDescendingOrder() { } - public ..ShouldAssertion<.> BeInOrder() { } - public ..ShouldAssertion<.> Contain( predicate, [.("predicate")] string? expression = null) { } - public ..ShouldAssertion<.> Contain(TItem expected, [.("expected")] string? expression = null) { } - public ..ShouldAssertion<.> Contain(TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - protected override . CreateSetAdapter(. value) { } - public ..ShouldAssertion<.> HaveAtLeast(int minCount, [.("minCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveAtMost(int maxCount, [.("maxCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveCount(int expectedCount, [.("expectedCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveCountBetween(int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public ..ShouldAssertion<.> HaveDistinctItems() { } - public ..ShouldAssertion<.> HaveDistinctItems(. comparer, [.("comparer")] string? comparerExpression = null) { } - public ..ShouldSingleItemAssertion<., TItem> HaveSingleItem() { } - public ..ShouldAssertion<.> NotBeEmpty() { } - public ..ShouldAssertion<.> NotContain(TItem expected, [.("expected")] string? expression = null) { } - public ..ShouldAssertion<.> NotContain(TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - } - public abstract class ShouldSetSourceBase : ..ShouldEnumerableSourceBase - where TSet : . - where TSelf : ..ShouldSetSourceBase - { - protected ShouldSetSourceBase(. context) { } - public ..ShouldAssertion BeProperSubsetOf(. other, [.("other")] string? expression = null) { } - public ..ShouldAssertion BeProperSupersetOf(. other, [.("other")] string? expression = null) { } - public ..ShouldAssertion BeSubsetOf(. other, [.("other")] string? expression = null) { } - public ..ShouldAssertion BeSupersetOf(. other, [.("other")] string? expression = null) { } - protected abstract . CreateSetAdapter(TSet value); - public ..ShouldAssertion NotOverlap(. other, [.("other")] string? expression = null) { } - public ..ShouldAssertion Overlap(. other, [.("other")] string? expression = null) { } - public ..ShouldAssertion SetEquals(. other, [.("other")] string? expression = null) { } - } - [..ShouldGeneratePartial(typeof(.))] - public sealed class ShouldSetSource : ..ShouldSetSourceBase<., TItem, ..ShouldSetSource> - { - public ShouldSetSource(.? value, string? expression) { } - public ..ShouldAssertion<.> BeEmpty() { } - public ..ShouldAssertion<.> BeInDescendingOrder() { } - public ..ShouldAssertion<.> BeInOrder() { } - public ..ShouldAssertion<.> Contain( predicate, [.("predicate")] string? expression = null) { } - public ..ShouldAssertion<.> Contain(TItem expected, [.("expected")] string? expression = null) { } - public ..ShouldAssertion<.> Contain(TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - protected override . CreateSetAdapter(. value) { } - public ..ShouldAssertion<.> HaveAtLeast(int minCount, [.("minCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveAtMost(int maxCount, [.("maxCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveCount(int expectedCount, [.("expectedCount")] string? expression = null) { } - public ..ShouldAssertion<.> HaveCountBetween(int min, int max, [.("min")] string? minExpression = null, [.("max")] string? maxExpression = null) { } - public ..ShouldAssertion<.> HaveDistinctItems() { } - public ..ShouldAssertion<.> HaveDistinctItems(. comparer, [.("comparer")] string? comparerExpression = null) { } - public ..ShouldSingleItemAssertion<., TItem> HaveSingleItem() { } - public ..ShouldAssertion<.> NotBeEmpty() { } - public ..ShouldAssertion<.> NotContain(TItem expected, [.("expected")] string? expression = null) { } - public ..ShouldAssertion<.> NotContain(TItem expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - } - public sealed class ShouldSingleItemAssertion : ., ..IShouldSource, ..IShouldSource - where TCollection : . - { - public ShouldSingleItemAssertion(. context, . inner) { } - public ..ShouldContinuation And { get; } - public . Context { get; } - public ..ShouldContinuation Or { get; } - public . AssertAsync() { } - public ..ShouldSingleItemAssertion Because(string message) { } - public . GetAwaiter() { } - } - public abstract class ShouldSourceBase : ..IShouldSource, ..IShouldSource - where TSelf : ..ShouldSourceBase - { - protected ShouldSourceBase(. context) { } - public . Context { get; } - public TSelf Because(string message) { } - protected string? ConsumeBecauseMessage() { } - protected void ResetShouldExpression(string? expression) { } - } - public readonly struct ShouldSource : ..IShouldSource, ..IShouldSource - { - public ShouldSource(. context) { } - public . Context { get; } - public ..ShouldSource Because(string message) { } - } -} -namespace . -{ - public static class ShouldArrayAssertionExtensions - { - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion BeEmpty(this ..IShouldSource source) { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion<.> BeSingleElement(this ..IShouldSource<.> source) { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion BeSingleElement(this ..IShouldSource source) { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion NotBeEmpty(this ..IShouldSource source) { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion<.> NotBeSingleElement(this ..IShouldSource<.> source) { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion NotBeSingleElement(this ..IShouldSource source) { } - } - public static class ShouldAssertionExtensions - { - public static ..ShouldAssertion<> BeAfter(this ..IShouldSource<> source, expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion<> BeAfter(this ..IShouldSource<> source, expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion<> BeAfter(this ..IShouldSource<> source, expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion<> BeAfter(this ..IShouldSource<> source, expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion<> BeAfterOrEqualTo(this ..IShouldSource<> source, expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion<> BeAfterOrEqualTo(this ..IShouldSource<> source, expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion<> BeAfterOrEqualTo(this ..IShouldSource<> source, expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion<> BeAfterOrEqualTo(this ..IShouldSource<> source, expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion<> BeBefore(this ..IShouldSource<> source, expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion<> BeBefore(this ..IShouldSource<> source, expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion<> BeBefore(this ..IShouldSource<> source, expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion<> BeBefore(this ..IShouldSource<> source, expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion<> BeBeforeOrEqualTo(this ..IShouldSource<> source, expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion<> BeBeforeOrEqualTo(this ..IShouldSource<> source, expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion<> BeBeforeOrEqualTo(this ..IShouldSource<> source, expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion<> BeBeforeOrEqualTo(this ..IShouldSource<> source, expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion BeDefined(this ..IShouldSource source) - where TEnum : struct, { } - public static ..ShouldAssertion BeOfType(this ..IShouldSource source, expectedType, [.("expectedType")] string? expression = null) { } - public static ..ShouldAssertion BeParsableInto<[.(..None | ..PublicMethods | ..Interfaces)] T>(this ..IShouldSource source) { } - public static ..ShouldAssertion EqualTo(this ..IShouldSource source, TValue? expected, [.("expected")] string? expression = null) { } - public static ..ShouldAssertion Eventually(this ..IShouldSource source, <., .> assertionBuilder, timeout, ? pollingInterval = default, .CancellationToken cancellationToken = default, [.("timeout")] string? timeoutExpression = null, [.("pollingInterval")] string? pollingIntervalExpression = null) { } - [("Use Length().IsEqualTo(expectedLength) instead.")] - public static ..ShouldAssertion HaveLength(this ..IShouldSource source, int expectedLength, [.("expectedLength")] string? expression = null) { } - public static ..ShouldAssertion HaveMessage(this ..IShouldSource source, string expectedMessage, [.("expectedMessage")] string? expression = null) - where TException : { } - public static ..ShouldAssertion HaveMessage(this ..IShouldSource source, string expectedMessage, comparison, [.("expectedMessage")] string? expression = null) - where TException : { } - public static ..ShouldAssertion HaveMessageContaining(this ..IShouldSource source, string expectedSubstring, [.("expectedSubstring")] string? expression = null) - where TException : { } - public static ..ShouldAssertion HaveMessageContaining(this ..IShouldSource source, string expectedSubstring, comparison, [.("expectedSubstring")] string? expression = null) - where TException : { } - public static ..ShouldAssertion HaveMessageEqualTo(this ..IShouldSource source, string expectedMessage) { } - public static ..ShouldAssertion HaveMessageEqualTo(this ..IShouldSource source, string expectedMessage, comparison) { } - public static ..ShouldAssertion HaveMessageStartingWith(this ..IShouldSource source, string expectedPrefix) { } - public static ..ShouldAssertion HaveMessageStartingWith(this ..IShouldSource source, string expectedPrefix, comparison) { } - public static ..ShouldAssertion NotBeDefined(this ..IShouldSource source) - where TEnum : struct, { } - public static ..ShouldAssertion NotBeNull(this ..IShouldSource source) - where TValue : class { } - public static ..ShouldAssertion NotBeParsableInto<[.(..None | ..PublicMethods | ..Interfaces)] T>(this ..IShouldSource source) { } - public static ..ShouldAssertion WaitFor(this ..IShouldSource source, <., .> assertionBuilder, timeout, ? pollingInterval = default, .CancellationToken cancellationToken = default, [.("timeout")] string? timeoutExpression = null, [.("pollingInterval")] string? pollingIntervalExpression = null) { } - public static ..ShouldAssertion WithInnerException(this ..IShouldSource source) - where TException : - where TInnerException : { } - public static ..ShouldAssertion WithMessage(this ..IShouldSource source, string expectedMessage, [.("expectedMessage")] string? expression = null) - where TException : { } - public static ..ShouldAssertion WithMessage(this ..IShouldSource source, string expectedMessage, comparison, [.("expectedMessage")] string? expression = null) - where TException : { } - public static ..ShouldAssertion WithMessageContaining(this ..IShouldSource source, string expectedSubstring, [.("expectedSubstring")] string? expression = null) - where TException : { } - public static ..ShouldAssertion WithMessageContaining(this ..IShouldSource source, string expectedSubstring, comparison, [.("expectedSubstring")] string? expression = null) - where TException : { } - public static ..ShouldAssertion WithMessageMatching(this ..IShouldSource source, .StringMatcher matcher, [.("matcher")] string? expression = null) - where TException : { } - public static ..ShouldAssertion WithMessageMatching(this ..IShouldSource source, string pattern, [.("pattern")] string? expression = null) - where TException : { } - public static ..ShouldAssertion WithMessageNotContaining(this ..IShouldSource source, string notExpectedSubstring, [.("notExpectedSubstring")] string? expression = null) - where TException : { } - public static ..ShouldAssertion WithMessageNotContaining(this ..IShouldSource source, string notExpectedSubstring, comparison, [.("notExpectedSubstring")] string? expression = null) - where TException : { } - public static ..ShouldAssertion WithStackTraceContaining(this ..IShouldSource source, string expectedSubstring, [.("expectedSubstring")] string? expression = null) - where TException : { } - public static ..ShouldAssertion WithStackTraceContaining(this ..IShouldSource source, string expectedSubstring, comparison, [.("expectedSubstring")] string? expression = null) - where TException : { } - } - public static class ShouldBetweenAssertionExtensions - { - public static ..ShouldAssertion BeBetween(this ..IShouldSource source, TValue minimum, TValue maximum, [.("minimum")] string? minimumExpression = null, [.("maximum")] string? maximumExpression = null) - where TValue : { } - } - public static class ShouldBooleanAssertionExtensions - { - public static ..ShouldAssertion BeFalse(this ..IShouldSource source) { } - public static ..ShouldAssertion BeFalse(this ..IShouldSource source) { } - public static ..ShouldAssertion BeTrue(this ..IShouldSource source) { } - public static ..ShouldAssertion BeTrue(this ..IShouldSource source) { } - } - public static class ShouldByteAssertions - { - public static ..ShouldAssertion BeEven(this ..IShouldSource source) { } - public static ..ShouldAssertion BeOdd(this ..IShouldSource source) { } - public static ..ShouldAssertion BeZero(this ..IShouldSource source) { } - public static ..ShouldAssertion NotBeZero(this ..IShouldSource source) { } - } - public static class ShouldCancellationTokenAssertionExtensions - { - public static ..ShouldAssertion<.CancellationToken> BeNone(this ..IShouldSource<.CancellationToken> source) { } - public static ..ShouldAssertion<.CancellationToken> NotBeNone(this ..IShouldSource<.CancellationToken> source) { } - } - public static class ShouldCollectionAllAssertionExtensions - { - public static ..ShouldAssertion All(this ..IShouldSource source, predicate, string predicateDescription, [.("predicate")] string? predicateExpression = null, [.("predicateDescription")] string? predicateDescriptionExpression = null) - where TCollection : . { } - } - public static class ShouldCollectionAnyAssertionExtensions - { - public static ..ShouldAssertion Any(this ..IShouldSource source, predicate, string predicateDescription, [.("predicate")] string? predicateExpression = null, [.("predicateDescription")] string? predicateDescriptionExpression = null) - where TCollection : . { } - } - public static class ShouldCollectionContainsAssertionExtensions - { - public static ..ShouldAssertion Contain(this ..IShouldSource source, TItem expected, .? comparer = null, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) - where TCollection : . { } - } - public static class ShouldCollectionContainsPredicateAssertionExtensions - { - public static ..ShouldAssertion Contain(this ..IShouldSource source, predicate, [.("predicate")] string? predicateExpression = null) - where TCollection : . { } - } - public static class ShouldCollectionDoesNotContainAssertionExtensions - { - public static ..ShouldAssertion NotContain(this ..IShouldSource source, TItem expected, .? comparer = null, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) - where TCollection : . { } - } - public static class ShouldCollectionDoesNotContainPredicateAssertionExtensions - { - public static ..ShouldAssertion NotContain(this ..IShouldSource source, predicate, string predicateDescription, [.("predicate")] string? predicateExpression = null, [.("predicateDescription")] string? predicateDescriptionExpression = null) - where TCollection : . { } - } - public static class ShouldCollectionIsInDescendingOrderAssertionExtensions - { - public static ..ShouldAssertion BeInDescendingOrder(this ..IShouldSource source) - where TCollection : . { } - } - public static class ShouldCollectionIsInOrderAssertionExtensions - { - public static ..ShouldAssertion BeInOrder(this ..IShouldSource source) - where TCollection : . { } - } - public static class ShouldComparisonAssertionExtensions - { - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion BeGreaterThan(this ..IShouldSource source, TValue minimum, [.("minimum")] string? minimumExpression = null) - where TValue : { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion BeGreaterThanOrEqualTo(this ..IShouldSource source, TValue minimum, [.("minimum")] string? minimumExpression = null) - where TValue : { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion BeLessThan(this ..IShouldSource source, TValue maximum, [.("maximum")] string? maximumExpression = null) - where TValue : { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion BeLessThanOrEqualTo(this ..IShouldSource source, TValue maximum, [.("maximum")] string? maximumExpression = null) - where TValue : { } - } - public static class ShouldDateOnlyAssertionExtensions - { - public static ..ShouldAssertion<> BeFirstDayOfMonth(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeInFuture(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeInPast(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeLastDayOfMonth(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeLeapYear(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeOnWeekday(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeOnWeekend(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeToday(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> NotBeLeapYear(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> NotBeToday(this ..IShouldSource<> source) { } - } - public static class ShouldDateOnlyEqualsAssertionExtensions - { - public static ..ShouldAssertion<> BeEqualTo(this ..IShouldSource<> source, expected, [.("expected")] string? expectedExpression = null) { } - } - public static class ShouldDateTimeAssertionExtensions - { - public static ..ShouldAssertion<> BeInFuture(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeInFutureUtc(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeInPast(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeInPastUtc(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeLeapYear(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeOnWeekday(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeOnWeekend(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeToday(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeUtc(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> NotBeLeapYear(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> NotBeToday(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> NotBeUtc(this ..IShouldSource<> source) { } - } - public static class ShouldDateTimeEqualsAssertionExtensions - { - public static ..ShouldAssertion<> BeEqualTo(this ..IShouldSource<> source, expected, [.("expected")] string? expectedExpression = null) { } - } - public static class ShouldDateTimeEqualsExactAssertionExtensions - { - public static ..ShouldAssertion<> EqualExact(this ..IShouldSource<> source, expected, [.("expected")] string? expectedExpression = null) { } - } - public static class ShouldDateTimeOffsetAssertionExtensions - { - public static ..ShouldAssertion<> BeInFuture(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeInFutureUtc(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeInPast(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeInPastUtc(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeLeapYear(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeOnWeekday(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeOnWeekend(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeToday(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeUtc(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> NotBeLeapYear(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> NotBeToday(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> NotBeUtc(this ..IShouldSource<> source) { } - } - public static class ShouldDateTimeOffsetEqualsAssertionExtensions - { - public static ..ShouldAssertion<> BeEqualTo(this ..IShouldSource<> source, expected, [.("expected")] string? expectedExpression = null) { } - } - public static class ShouldDayOfWeekAssertionExtensions - { - public static ..ShouldAssertion<> BeFriday(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeMonday(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeWeekday(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeWeekend(this ..IShouldSource<> source) { } - } - public static class ShouldDecimalAssertions - { - public static ..ShouldAssertion BeZero(this ..IShouldSource source) { } - public static ..ShouldAssertion NotBeZero(this ..IShouldSource source) { } - } - public static class ShouldDecimalEqualsAssertionExtensions - { - public static ..ShouldAssertion BeEqualTo(this ..IShouldSource source, decimal expected, [.("expected")] string? expectedExpression = null) { } - } - public static class ShouldDecimalIsCloseToAssertionExtensions - { - public static ..ShouldAssertion BeCloseTo(this ..IShouldSource source, decimal expected, decimal tolerance, [.("expected")] string? expectedExpression = null, [.("tolerance")] string? toleranceExpression = null) { } - } - public static class ShouldDecimalIsWithinPercentOfAssertionExtensions - { - public static ..ShouldAssertion BeWithinPercentOf(this ..IShouldSource source, decimal expected, decimal percent, [.("expected")] string? expectedExpression = null, [.("percent")] string? percentExpression = null) { } - } - public static class ShouldDirectoryHasFilesAssertionExtensions - { - public static ..ShouldAssertion<.DirectoryInfo> HaveFiles(this ..IShouldSource<.DirectoryInfo> source) { } - } - public static class ShouldDirectoryHasNoSubdirectoriesAssertionExtensions - { - public static ..ShouldAssertion<.DirectoryInfo> HaveNoSubdirectories(this ..IShouldSource<.DirectoryInfo> source) { } - } - public static class ShouldDirectoryInfoAssertionExtensions - { - public static ..ShouldAssertion<.DirectoryInfo> BeEmpty(this ..IShouldSource<.DirectoryInfo> source) { } - public static ..ShouldAssertion<.DirectoryInfo> BeHidden(this ..IShouldSource<.DirectoryInfo> source) { } - public static ..ShouldAssertion<.DirectoryInfo> BeRoot(this ..IShouldSource<.DirectoryInfo> source) { } - public static ..ShouldAssertion<.DirectoryInfo> BeSystemDirectory(this ..IShouldSource<.DirectoryInfo> source) { } - public static ..ShouldAssertion<.DirectoryInfo> NotBeEmpty(this ..IShouldSource<.DirectoryInfo> source) { } - public static ..ShouldAssertion<.DirectoryInfo> NotBeHidden(this ..IShouldSource<.DirectoryInfo> source) { } - public static ..ShouldAssertion<.DirectoryInfo> NotBeRoot(this ..IShouldSource<.DirectoryInfo> source) { } - } - public static class ShouldDoubleAssertions - { - public static ..ShouldAssertion BeZero(this ..IShouldSource source) { } - public static ..ShouldAssertion NotBeZero(this ..IShouldSource source) { } - } - public static class ShouldDoubleEqualsAssertionExtensions - { - public static ..ShouldAssertion BeEqualTo(this ..IShouldSource source, double expected, [.("expected")] string? expectedExpression = null) { } - } - public static class ShouldDoubleIsCloseToAssertionExtensions - { - public static ..ShouldAssertion BeCloseTo(this ..IShouldSource source, double expected, double tolerance, [.("expected")] string? expectedExpression = null, [.("tolerance")] string? toleranceExpression = null) { } - } - public static class ShouldDoubleIsWithinPercentOfAssertionExtensions - { - public static ..ShouldAssertion BeWithinPercentOf(this ..IShouldSource source, double expected, double percent, [.("expected")] string? expectedExpression = null, [.("percent")] string? percentExpression = null) { } - } - public static class ShouldEnumAssertionExtensions - { - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion HaveFlag(this ..IShouldSource source, TEnum expectedFlag, [.("expectedFlag")] string? expectedFlagExpression = null) - where TEnum : struct, { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion HaveSameNameAs(this ..IShouldSource source, otherEnumValue, [.("otherEnumValue")] string? otherEnumValueExpression = null) - where TEnum : struct, { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion HaveSameValueAs(this ..IShouldSource source, otherEnumValue, [.("otherEnumValue")] string? otherEnumValueExpression = null) - where TEnum : struct, { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion NotHaveFlag(this ..IShouldSource source, TEnum unexpectedFlag, [.("unexpectedFlag")] string? unexpectedFlagExpression = null) - where TEnum : struct, { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion NotHaveSameNameAs(this ..IShouldSource source, otherEnumValue, [.("otherEnumValue")] string? otherEnumValueExpression = null) - where TEnum : struct, { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion NotHaveSameValueAs(this ..IShouldSource source, otherEnumValue, [.("otherEnumValue")] string? otherEnumValueExpression = null) - where TEnum : struct, { } - } - public static class ShouldEqualsAssertionExtensions - { - public static ..ShouldAssertion BeEqualTo(this ..IShouldSource source, TValue? expected, [.("expected")] string? expectedExpression = null) { } - public static ..ShouldAssertion BeEqualTo(this ..IShouldSource source, TValue? expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - } - public static class ShouldEquatableAssertionExtensions - { - public static ..ShouldAssertion BeEquatableTo(this ..IShouldSource source, TExpected expected, [.("expected")] string? expectedExpression = null) - where TActual : { } - } - public static class ShouldFileInfoAssertionExtensions - { - public static ..ShouldAssertion<.FileInfo> BeArchived(this ..IShouldSource<.FileInfo> source) { } - public static ..ShouldAssertion<.FileInfo> BeEmpty(this ..IShouldSource<.FileInfo> source) { } - public static ..ShouldAssertion<.FileInfo> BeHidden(this ..IShouldSource<.FileInfo> source) { } - public static ..ShouldAssertion<.FileInfo> BeSystemFile(this ..IShouldSource<.FileInfo> source) { } - public static ..ShouldAssertion<.FileInfo> HaveExtension(this ..IShouldSource<.FileInfo> source) { } - public static ..ShouldAssertion<.FileInfo> HaveNoExtension(this ..IShouldSource<.FileInfo> source) { } - public static ..ShouldAssertion<.FileInfo> NotBeEmpty(this ..IShouldSource<.FileInfo> source) { } - public static ..ShouldAssertion<.FileInfo> NotBeHidden(this ..IShouldSource<.FileInfo> source) { } - } - public static class ShouldFileIsNotExecutableAssertionExtensions - { - public static ..ShouldAssertion<.FileInfo> NotBeExecutable(this ..IShouldSource<.FileInfo> source) { } - } - public static class ShouldFileIsNotSystemAssertionExtensions - { - public static ..ShouldAssertion<.FileInfo> NotBeSystem(this ..IShouldSource<.FileInfo> source) { } - } - public static class ShouldFileSystemComparisonAssertions - { - public static ..ShouldAssertion<.DirectoryInfo> BeEquivalentTo(this ..IShouldSource<.DirectoryInfo> source, .DirectoryInfo expected, [.("expected")] string? expectedExpression = null) { } - public static ..ShouldAssertion<.FileInfo> HaveSameContentAs(this ..IShouldSource<.FileInfo> source, .FileInfo expected, [.("expected")] string? expectedExpression = null) { } - public static ..ShouldAssertion<.DirectoryInfo> HaveSameStructureAs(this ..IShouldSource<.DirectoryInfo> source, .DirectoryInfo expected, [.("expected")] string? expectedExpression = null) { } - public static ..ShouldAssertion<.DirectoryInfo> NotBeEquivalentTo(this ..IShouldSource<.DirectoryInfo> source, .DirectoryInfo expected, [.("expected")] string? expectedExpression = null) { } - public static ..ShouldAssertion<.FileInfo> NotHaveSameContentAs(this ..IShouldSource<.FileInfo> source, .FileInfo expected, [.("expected")] string? expectedExpression = null) { } - } - public static class ShouldFloatAssertions - { - public static ..ShouldAssertion BeZero(this ..IShouldSource source) { } - public static ..ShouldAssertion NotBeZero(this ..IShouldSource source) { } - } - public static class ShouldFloatEqualsAssertionExtensions - { - public static ..ShouldAssertion BeEqualTo(this ..IShouldSource source, float expected, [.("expected")] string? expectedExpression = null) { } - } - public static class ShouldFloatIsCloseToAssertionExtensions - { - public static ..ShouldAssertion BeCloseTo(this ..IShouldSource source, float expected, float tolerance, [.("expected")] string? expectedExpression = null, [.("tolerance")] string? toleranceExpression = null) { } - } - public static class ShouldFloatIsWithinPercentOfAssertionExtensions - { - public static ..ShouldAssertion BeWithinPercentOf(this ..IShouldSource source, float expected, float percent, [.("expected")] string? expectedExpression = null, [.("percent")] string? percentExpression = null) { } - } - public static class ShouldGenericAssertions - { - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion BeIn(this ..IShouldSource source, T[] collection) { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion BeIn(this ..IShouldSource source, . collection, [.("collection")] string? collectionExpression = null) { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion NotBeIn(this ..IShouldSource source, T[] collection) { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion NotBeIn(this ..IShouldSource source, . collection, [.("collection")] string? collectionExpression = null) { } - } - public static class ShouldGuidAssertionExtensions - { - public static ..ShouldAssertion<> BeEmptyGuid(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> NotBeEmptyGuid(this ..IShouldSource<> source) { } - } - public static class ShouldHasSingleItemAssertionExtensions - { - public static ..ShouldSingleItemAssertion<., TItem> HaveSingleItem(this ..IShouldSource<.> source) { } - public static ..ShouldSingleItemAssertion HaveSingleItem(this ..IShouldSource source) - where TCollection : . { } - } - public static class ShouldHasSingleItemPredicateAssertionExtensions - { - public static ..ShouldAssertion HaveSingleItem(this ..IShouldSource source, predicate, string predicateDescription, [.("predicate")] string? predicateExpression = null, [.("predicateDescription")] string? predicateDescriptionExpression = null) - where TCollection : . { } - } - public static class ShouldHttpStatusCodeAssertionExtensions - { - public static ..ShouldAssertion<.HttpStatusCode> BeClientError(this ..IShouldSource<.HttpStatusCode> source) { } - public static ..ShouldAssertion<.HttpStatusCode> BeError(this ..IShouldSource<.HttpStatusCode> source) { } - public static ..ShouldAssertion<.HttpStatusCode> BeInformational(this ..IShouldSource<.HttpStatusCode> source) { } - public static ..ShouldAssertion<.HttpStatusCode> BeRedirection(this ..IShouldSource<.HttpStatusCode> source) { } - public static ..ShouldAssertion<.HttpStatusCode> BeServerError(this ..IShouldSource<.HttpStatusCode> source) { } - public static ..ShouldAssertion<.HttpStatusCode> BeSuccess(this ..IShouldSource<.HttpStatusCode> source) { } - public static ..ShouldAssertion<.HttpStatusCode> NotBeSuccess(this ..IShouldSource<.HttpStatusCode> source) { } - } - public static class ShouldIntAssertions - { - public static ..ShouldAssertion BeEven(this ..IShouldSource source) { } - public static ..ShouldAssertion BeOdd(this ..IShouldSource source) { } - public static ..ShouldAssertion BeZero(this ..IShouldSource source) { } - public static ..ShouldAssertion NotBeZero(this ..IShouldSource source) { } - } - public static class ShouldIntEqualsAssertionExtensions - { - public static ..ShouldAssertion BeEqualTo(this ..IShouldSource source, int expected, [.("expected")] string? expectedExpression = null) { } - } - public static class ShouldIntIsCloseToAssertionExtensions - { - public static ..ShouldAssertion BeCloseTo(this ..IShouldSource source, int expected, int tolerance, [.("expected")] string? expectedExpression = null, [.("tolerance")] string? toleranceExpression = null) { } - } - public static class ShouldIntIsWithinPercentOfAssertionExtensions - { - public static ..ShouldAssertion BeWithinPercentOf(this ..IShouldSource source, int expected, double percent, [.("expected")] string? expectedExpression = null, [.("percent")] string? percentExpression = null) { } - } - public static class ShouldIsDefaultAssertionExtensions - { - public static ..ShouldAssertion BeDefault(this ..IShouldSource source) - where TValue : struct { } - } - public static class ShouldIsDefaultNullableAssertionExtensions - { - public static ..ShouldAssertion BeDefault(this ..IShouldSource source) - where TValue : struct { } - } - public static class ShouldIsDefaultReferenceAssertionExtensions - { - public static ..ShouldAssertion BeDefault(this ..IShouldSource source) - where TValue : class { } - } - public static class ShouldIsEquatableOrEqualToAssertionExtensions - { - public static ..ShouldAssertion BeEquatableOrEqualTo(this ..IShouldSource source, TValue expected, [.("expected")] string? expectedExpression = null) { } - } - public static class ShouldIsEquivalentToAssertionExtensions - { - [.("Collection equivalency uses structural comparison for complex objects, which requ" + - "ires reflection and is not compatible with AOT")] - public static ..ShouldAssertion BeEquivalentTo(this ..IShouldSource source, . expected, . ordering = 0, [.("expected")] string? expectedExpression = null, [.("ordering")] string? orderingExpression = null) - where TCollection : . { } - public static ..ShouldAssertion BeEquivalentTo(this ..IShouldSource source, . expected, . comparer, . ordering = 0, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null, [.("ordering")] string? orderingExpression = null) - where TCollection : . { } - } - public static class ShouldIsNotDefaultAssertionExtensions - { - public static ..ShouldAssertion NotBeDefault(this ..IShouldSource source) - where TValue : struct { } - } - public static class ShouldIsNotDefaultNullableAssertionExtensions - { - public static ..ShouldAssertion NotBeDefault(this ..IShouldSource source) - where TValue : struct { } - } - public static class ShouldIsNotDefaultReferenceAssertionExtensions - { - public static ..ShouldAssertion NotBeDefault(this ..IShouldSource source) - where TValue : class { } - } - public static class ShouldJsonElementAssertionExtensions - { - public static ..ShouldAssertion<.> BeArray(this ..IShouldSource<.> source) { } - public static ..ShouldAssertion<.> BeBoolean(this ..IShouldSource<.> source) { } - public static ..ShouldAssertion<.> BeNull(this ..IShouldSource<.> source) { } - public static ..ShouldAssertion<.> BeNumber(this ..IShouldSource<.> source) { } - public static ..ShouldAssertion<.> BeObject(this ..IShouldSource<.> source) { } - public static ..ShouldAssertion<.> BeString(this ..IShouldSource<.> source) { } - public static ..ShouldAssertion<.> HaveProperty(this ..IShouldSource<.> source, string propertyName, [.("propertyName")] string? propertyNameExpression = null) { } - public static ..ShouldAssertion<.> NotBeNull(this ..IShouldSource<.> source) { } - public static ..ShouldAssertion<.> NotHaveProperty(this ..IShouldSource<.> source, string propertyName, [.("propertyName")] string? propertyNameExpression = null) { } - } - public static class ShouldJsonStringAssertionExtensions - { - public static ..ShouldAssertion BeValidJson(this ..IShouldSource source) { } - public static ..ShouldAssertion BeValidJsonArray(this ..IShouldSource source) { } - public static ..ShouldAssertion BeValidJsonObject(this ..IShouldSource source) { } - public static ..ShouldAssertion NotBeValidJson(this ..IShouldSource source) { } - } - public static class ShouldLazyAssertionExtensions - { - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion<> BeValueCreated(this ..IShouldSource<> source) { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion<> BeValueNotCreated(this ..IShouldSource<> source) { } - } - public static class ShouldLongAssertions - { - public static ..ShouldAssertion BeEven(this ..IShouldSource source) { } - public static ..ShouldAssertion BeOdd(this ..IShouldSource source) { } - public static ..ShouldAssertion BeZero(this ..IShouldSource source) { } - public static ..ShouldAssertion NotBeZero(this ..IShouldSource source) { } - } - public static class ShouldLongEqualsAssertionExtensions - { - public static ..ShouldAssertion BeEqualTo(this ..IShouldSource source, long expected, [.("expected")] string? expectedExpression = null) { } - } - public static class ShouldLongIsCloseToAssertionExtensions - { - public static ..ShouldAssertion BeCloseTo(this ..IShouldSource source, long expected, long tolerance, [.("expected")] string? expectedExpression = null, [.("tolerance")] string? toleranceExpression = null) { } - } - public static class ShouldLongIsWithinPercentOfAssertionExtensions - { - public static ..ShouldAssertion BeWithinPercentOf(this ..IShouldSource source, long expected, double percent, [.("expected")] string? expectedExpression = null, [.("percent")] string? percentExpression = null) { } - } - public static class ShouldNotEqualsAssertionExtensions - { - public static ..ShouldAssertion NotBeEqualTo(this ..IShouldSource source, TValue notExpected, .? comparer = null, [.("notExpected")] string? notExpectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - } - public static class ShouldNotEquivalentToAssertionExtensions - { - [.("Collection equivalency uses structural comparison for complex objects, which requ" + - "ires reflection and is not compatible with AOT")] - public static ..ShouldAssertion NotBeEquivalentTo(this ..IShouldSource source, . notExpected, . ordering = 0, [.("notExpected")] string? notExpectedExpression = null, [.("ordering")] string? orderingExpression = null) - where TCollection : . { } - public static ..ShouldAssertion NotBeEquivalentTo(this ..IShouldSource source, . notExpected, . comparer, . ordering = 0, [.("notExpected")] string? notExpectedExpression = null, [.("comparer")] string? comparerExpression = null, [.("ordering")] string? orderingExpression = null) - where TCollection : . { } - } - public static class ShouldNullAssertionExtension - { - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion BeNull(this ..IShouldSource source) { } - } - public static class ShouldNullableEquatableAssertionExtensions - { - public static ..ShouldAssertion BeEquatableTo(this ..IShouldSource source, TExpected expected, [.("expected")] string? expectedExpression = null) - where TActual : struct, { } - } - public static class ShouldRangeAssertionExtensions - { - [("Use IsFullRange instead.")] - public static ..ShouldAssertion<> BeAll(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeFullRange(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> HaveBothIndicesFromEnd(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> HaveEndFromBeginning(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> HaveStartFromBeginning(this ..IShouldSource<> source) { } - } - public static class ShouldReferenceAssertionExtensions - { - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion BeSameReferenceAs(this ..IShouldSource source, object? expected, [.("expected")] string? expectedExpression = null) { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion NotBeSameReferenceAs(this ..IShouldSource source, object? expected, [.("expected")] string? expectedExpression = null) { } - } - public static class ShouldSbyteAssertions - { - public static ..ShouldAssertion BeEven(this ..IShouldSource source) { } - public static ..ShouldAssertion BeOdd(this ..IShouldSource source) { } - public static ..ShouldAssertion BeZero(this ..IShouldSource source) { } - public static ..ShouldAssertion NotBeZero(this ..IShouldSource source) { } - } - public static class ShouldShortAssertions - { - public static ..ShouldAssertion BeEven(this ..IShouldSource source) { } - public static ..ShouldAssertion BeOdd(this ..IShouldSource source) { } - public static ..ShouldAssertion BeZero(this ..IShouldSource source) { } - public static ..ShouldAssertion NotBeZero(this ..IShouldSource source) { } - } - public static class ShouldStrictEqualityAssertions - { - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion BeStrictlyEqualTo(this ..IShouldSource source, T expected, [.("expected")] string? expectedExpression = null) { } - [.("Trimming", "IL2091", Justification="Forwarded from source method")] - public static ..ShouldAssertion NotBeStrictlyEqualTo(this ..IShouldSource source, T expected, [.("expected")] string? expectedExpression = null) { } - } - public static class ShouldStringBuilderAssertionExtensions - { - public static ..ShouldAssertion<.StringBuilder> BeEmpty(this ..IShouldSource<.StringBuilder> source) { } - public static ..ShouldAssertion<.StringBuilder> HaveExcessCapacity(this ..IShouldSource<.StringBuilder> source) { } - public static ..ShouldAssertion<.StringBuilder> NotBeEmpty(this ..IShouldSource<.StringBuilder> source) { } - } - public static class ShouldStringContainsAssertionExtensions - { - public static ..ShouldAssertion Contain(this ..IShouldSource source, string expected, [.("expected")] string? expectedExpression = null) { } - public static ..ShouldAssertion Contain(this ..IShouldSource source, string expected, comparison, [.("expected")] string? expectedExpression = null, [.("comparison")] string? comparisonExpression = null) { } - } - public static class ShouldStringDoesNotContainAssertionExtensions - { - public static ..ShouldAssertion NotContain(this ..IShouldSource source, string expected, [.("expected")] string? expectedExpression = null) { } - public static ..ShouldAssertion NotContain(this ..IShouldSource source, string expected, comparison, [.("expected")] string? expectedExpression = null, [.("comparison")] string? comparisonExpression = null) { } - } - public static class ShouldStringDoesNotEndWithAssertionExtensions - { - public static ..ShouldAssertion NotEndWith(this ..IShouldSource source, string expected, [.("expected")] string? expectedExpression = null) { } - public static ..ShouldAssertion NotEndWith(this ..IShouldSource source, string expected, comparison, [.("expected")] string? expectedExpression = null, [.("comparison")] string? comparisonExpression = null) { } - } - public static class ShouldStringDoesNotMatchAssertionExtensions - { - public static ..ShouldAssertion NotMatch(this ..IShouldSource source, . regex, [.("regex")] string? regexExpression = null) { } - public static ..ShouldAssertion NotMatch(this ..IShouldSource source, string pattern, [.("pattern")] string? patternExpression = null) { } - } - public static class ShouldStringDoesNotStartWithAssertionExtensions - { - public static ..ShouldAssertion NotStartWith(this ..IShouldSource source, string expected, [.("expected")] string? expectedExpression = null) { } - public static ..ShouldAssertion NotStartWith(this ..IShouldSource source, string expected, comparison, [.("expected")] string? expectedExpression = null, [.("comparison")] string? comparisonExpression = null) { } - } - public static class ShouldStringEmptyAssertionExtensions - { - public static ..ShouldAssertion BeEmpty(this ..IShouldSource source) { } - public static ..ShouldAssertion NotBeEmpty(this ..IShouldSource source) { } - } - public static class ShouldStringEndsWithAssertionExtensions - { - public static ..ShouldAssertion EndWith(this ..IShouldSource source, string expected, [.("expected")] string? expectedExpression = null) { } - public static ..ShouldAssertion EndWith(this ..IShouldSource source, string expected, comparison, [.("expected")] string? expectedExpression = null, [.("comparison")] string? comparisonExpression = null) { } - } - public static class ShouldStringEqualsAssertionExtensions - { - public static ..ShouldAssertion BeEqualTo(this ..IShouldSource source, string? expected, [.("expected")] string? expectedExpression = null) { } - public static ..ShouldAssertion BeEqualTo(this ..IShouldSource source, string? expected, . comparer, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null) { } - public static ..ShouldAssertion BeEqualTo(this ..IShouldSource source, string? expected, comparison, [.("expected")] string? expectedExpression = null, [.("comparison")] string? comparisonExpression = null) { } - } - public static class ShouldStringLengthRangeAssertionExtensions - { - public static ..ShouldAssertion HaveLengthBetween(this ..IShouldSource source, int minLength, int maxLength, [.("minLength")] string? minLengthExpression = null, [.("maxLength")] string? maxLengthExpression = null) { } - public static ..ShouldAssertion HaveMaxLength(this ..IShouldSource source, int maxLength, [.("maxLength")] string? maxLengthExpression = null) { } - public static ..ShouldAssertion HaveMinLength(this ..IShouldSource source, int minLength, [.("minLength")] string? minLengthExpression = null) { } - } - public static class ShouldStringStartsWithAssertionExtensions - { - public static ..ShouldAssertion StartWith(this ..IShouldSource source, string expected, [.("expected")] string? expectedExpression = null) { } - public static ..ShouldAssertion StartWith(this ..IShouldSource source, string expected, comparison, [.("expected")] string? expectedExpression = null, [.("comparison")] string? comparisonExpression = null) { } - } - public static class ShouldTimeOnlyAssertionExtensions - { - public static ..ShouldAssertion<> BeAM(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeEndOfHour(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeMidnight(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeNoon(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BePM(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeStartOfHour(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> NotBeMidnight(this ..IShouldSource<> source) { } - } - public static class ShouldTimeOnlyEqualsAssertionExtensions - { - public static ..ShouldAssertion<> BeEqualTo(this ..IShouldSource<> source, expected, [.("expected")] string? expectedExpression = null) { } - } - public static class ShouldTimeSpanAssertionExtensions - { - public static ..ShouldAssertion<> BeNegative(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeNonNegative(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeNonPositive(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BePositive(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> BeZero(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> NotBeZero(this ..IShouldSource<> source) { } - } - public static class ShouldTimeSpanEqualsAssertionExtensions - { - public static ..ShouldAssertion<> BeEqualTo(this ..IShouldSource<> source, expected, [.("expected")] string? expectedExpression = null) { } - } - public static class ShouldUintAssertions - { - public static ..ShouldAssertion BeEven(this ..IShouldSource source) { } - public static ..ShouldAssertion BeOdd(this ..IShouldSource source) { } - public static ..ShouldAssertion BeZero(this ..IShouldSource source) { } - public static ..ShouldAssertion NotBeZero(this ..IShouldSource source) { } - } - public static class ShouldUlongAssertions - { - public static ..ShouldAssertion BeEven(this ..IShouldSource source) { } - public static ..ShouldAssertion BeOdd(this ..IShouldSource source) { } - public static ..ShouldAssertion BeZero(this ..IShouldSource source) { } - public static ..ShouldAssertion NotBeZero(this ..IShouldSource source) { } - } - public static class ShouldUshortAssertions - { - public static ..ShouldAssertion BeEven(this ..IShouldSource source) { } - public static ..ShouldAssertion BeOdd(this ..IShouldSource source) { } - public static ..ShouldAssertion BeZero(this ..IShouldSource source) { } - public static ..ShouldAssertion NotBeZero(this ..IShouldSource source) { } - } - public static class ShouldVersionAssertionExtensions - { - public static ..ShouldAssertion<> BeMajorVersion(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> HaveBuildNumber(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> HaveNoBuildNumber(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> HaveNoRevisionNumber(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> HaveRevisionNumber(this ..IShouldSource<> source) { } - public static ..ShouldAssertion<> NotBeMajorVersion(this ..IShouldSource<> source) { } - } -} -namespace .Should -{ - public static class ShouldExtensions - { - public static ..ShouldDelegateSource Should(this action, [.("action")] string? expression = null) { } - public static ..ShouldDelegateSource Should(this <.> action, [.("action")] string? expression = null) { } - public static ..ShouldSource Should(this string? value, [.("value")] string? expression = null) { } - public static ..ShouldHashSetSource Should(this .? value, [.("value")] string? expression = null) { } - public static ..ShouldSource<.> Should(this . value, string? expression = null) { } - public static ..ShouldCollectionSource Should(this .? value, [.("value")] string? expression = null) { } - public static ..ShouldCollectionSource Should(this .? value, [.("value")] string? expression = null) { } - public static ..ShouldCollectionSource Should(this .? value, [.("value")] string? expression = null) { } - public static ..ShouldCollectionSource Should(this .? value, [.("value")] string? expression = null) { } - public static ..ShouldCollectionSource Should(this .? value, [.("value")] string? expression = null) { } - public static ..ShouldReadOnlySetSource Should(this .? value, [.("value")] string? expression = null) { } - public static ..ShouldSetSource Should(this .? value, [.("value")] string? expression = null) { } - public static ..ShouldDelegateCollectionSource Should(this <.?> func, [.("func")] string? expression = null) { } - public static ..ShouldDelegateCollectionSource Should(this <.<.?>> func, [.("func")] string? expression = null) { } - public static ..ShouldDelegateSource Should(this <.> func, [.("func")] string? expression = null) { } - public static ..ShouldDelegateSource Should(this func, [.("func")] string? expression = null) { } - public static ..ShouldSource<> Should(this value, string? expression = null) { } - public static ..ShouldSource<> Should(this value, string? expression = null) { } - public static ..ShouldSource Should(this T? value, [.("value")] string? expression = null) { } - public static ..ShouldCollectionSource Should(this T[]? value, [.("value")] string? expression = null) { } - public static ..ShouldMutableDictionarySource Should(this .? value, [.("value")] string? expression = null) - where TKey : notnull { } - public static ..ShouldDictionarySource Should(this .? value, [.("value")] string? expression = null) - where TKey : notnull { } - } -} \ No newline at end of file diff --git a/tests/TUnit.RpcTests/Tests.cs b/tests/TUnit.RpcTests/Tests.cs index f8bc0c84bb6..18d8daa8941 100644 --- a/tests/TUnit.RpcTests/Tests.cs +++ b/tests/TUnit.RpcTests/Tests.cs @@ -7,8 +7,8 @@ public class Tests { public static IEnumerable> Frameworks() { - yield return () => "net8.0"; yield return () => "net10.0"; + yield return () => "net11.0"; } [Test] diff --git a/tests/TUnit.TestProject.Library/TUnit.TestProject.Library.csproj b/tests/TUnit.TestProject.Library/TUnit.TestProject.Library.csproj index b4b903a377e..05bc4863b9f 100644 --- a/tests/TUnit.TestProject.Library/TUnit.TestProject.Library.csproj +++ b/tests/TUnit.TestProject.Library/TUnit.TestProject.Library.csproj @@ -7,7 +7,7 @@ - net8.0;net9.0;net10.0;net472;netstandard2.0 + net10.0;net11.0;net472;netstandard2.0 diff --git a/tools/TUnit.Pipeline/Modules/Abstract/TestBaseModule.cs b/tools/TUnit.Pipeline/Modules/Abstract/TestBaseModule.cs index b5051322a65..54faa8a1a1e 100644 --- a/tools/TUnit.Pipeline/Modules/Abstract/TestBaseModule.cs +++ b/tools/TUnit.Pipeline/Modules/Abstract/TestBaseModule.cs @@ -15,10 +15,10 @@ public abstract class TestBaseModule : Module> /// Every modern TFM the repo targets on Linux, and net10.0 alone on macOS and Windows. Running /// every test project on all three TFMs on every OS (#7129) doubled the macOS pipeline and starved /// its 3-core, 7 GB runner until it lost contact. Earlier TFMs need covering on one OS only, so - /// Linux covers net8.0 and net9.0. Windows still adds net472 through . + /// Linux covers net11.0. Windows still adds net472 through . /// protected static IReadOnlyList ModernFrameworks { get; } = - IsLinux ? ["net10.0", "net9.0", "net8.0"] : ["net10.0"]; + IsLinux ? ["net11.0", "net10.0"] : ["net10.0"]; /// /// , plus net472 on Windows, the only OS that can run .NET Framework tests. @@ -36,7 +36,7 @@ public abstract class TestBaseModule : Module> /// True on Windows, where legacy .NET Framework TFMs (net4xx) can be tested. protected static bool IsWindows => RuntimeInformation.IsOSPlatform(OSPlatform.Windows); - /// True on Linux, the only OS where includes net8.0 and net9.0. + /// True on Linux, the only OS where includes net11.0. protected static bool IsLinux => RuntimeInformation.IsOSPlatform(OSPlatform.Linux); protected sealed override async Task?> ExecuteAsync(IModuleContext context, CancellationToken cancellationToken) diff --git a/tools/TUnit.Pipeline/Modules/PublishNugetTesterAOTModule.cs b/tools/TUnit.Pipeline/Modules/PublishNugetTesterAOTModule.cs index aed6292637e..630aae9d4dd 100644 --- a/tools/TUnit.Pipeline/Modules/PublishNugetTesterAOTModule.cs +++ b/tools/TUnit.Pipeline/Modules/PublishNugetTesterAOTModule.cs @@ -38,7 +38,7 @@ protected override ModuleConfiguration Configure() => ModuleConfiguration.Create .AssertExists(); // Test AOT publishing - foreach (var framework in new[] { "net8.0", "net9.0", "net10.0" }) + foreach (var framework in new[] { "net10.0", "net11.0" }) { var result = await context.SubModule($"AOT-{framework}", async () => { diff --git a/tools/TUnit.Pipeline/Modules/TestNugetPackageModule.cs b/tools/TUnit.Pipeline/Modules/TestNugetPackageModule.cs index 2b1a928fd77..7d6fbac4534 100644 --- a/tools/TUnit.Pipeline/Modules/TestNugetPackageModule.cs +++ b/tools/TUnit.Pipeline/Modules/TestNugetPackageModule.cs @@ -45,10 +45,10 @@ protected override IEnumerable TestableFrameworks { yield return "net10.0"; - // See ModernFrameworks: only Linux covers net8.0. + // See ModernFrameworks: only Linux covers net11.0. if (IsLinux) { - yield return "net8.0"; + yield return "net11.0"; } if (IsWindows) diff --git a/tools/speed-comparison/TestVersions/TestVersions.csproj b/tools/speed-comparison/TestVersions/TestVersions.csproj index 5c0a78df5ac..b51a0083ddc 100644 --- a/tools/speed-comparison/TestVersions/TestVersions.csproj +++ b/tools/speed-comparison/TestVersions/TestVersions.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 enable enable diff --git a/tools/speed-comparison/Tests.Benchmark/BenchmarkConfig.cs b/tools/speed-comparison/Tests.Benchmark/BenchmarkConfig.cs index 9f4cb57f23c..bb956254a43 100644 --- a/tools/speed-comparison/Tests.Benchmark/BenchmarkConfig.cs +++ b/tools/speed-comparison/Tests.Benchmark/BenchmarkConfig.cs @@ -13,7 +13,7 @@ public class BenchmarkConfig : ManualConfig public BenchmarkConfig() { var job = Job.Default - .WithRuntime(CoreRuntime.Core10_0); + .WithRuntime(CoreRuntime.Core11_0); AddJob(job); AddLogger(ConsoleLogger.Default); diff --git a/tools/speed-comparison/Tests.Benchmark/Tests.Benchmark.csproj b/tools/speed-comparison/Tests.Benchmark/Tests.Benchmark.csproj index 227b29b9e71..2e59aab06b0 100644 --- a/tools/speed-comparison/Tests.Benchmark/Tests.Benchmark.csproj +++ b/tools/speed-comparison/Tests.Benchmark/Tests.Benchmark.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 enable enable diff --git a/tools/speed-comparison/UnifiedTests/UnifiedTests.csproj b/tools/speed-comparison/UnifiedTests/UnifiedTests.csproj index d59ec472427..f6df6f39b43 100644 --- a/tools/speed-comparison/UnifiedTests/UnifiedTests.csproj +++ b/tools/speed-comparison/UnifiedTests/UnifiedTests.csproj @@ -13,7 +13,7 @@ - net10.0 + net11.0 enable enable false @@ -25,6 +25,9 @@ true true Exe + + $(Features);runtime-async=on diff --git a/tools/speed-comparison/prepare-aot.bat b/tools/speed-comparison/prepare-aot.bat index 1c32069b1bc..0b4ad637418 100644 --- a/tools/speed-comparison/prepare-aot.bat +++ b/tools/speed-comparison/prepare-aot.bat @@ -2,7 +2,7 @@ REM Script to prepare AOT builds for benchmarking set FRAMEWORK=%1 -if "%FRAMEWORK%"=="" set FRAMEWORK=net8.0 +if "%FRAMEWORK%"=="" set FRAMEWORK=net11.0 echo Building TUnit AOT version for %FRAMEWORK%... dotnet publish UnifiedTests\UnifiedTests.csproj -c Release -p:TestFramework=TUNIT -p:PublishAot=true --framework %FRAMEWORK% diff --git a/tools/speed-comparison/prepare-aot.ps1 b/tools/speed-comparison/prepare-aot.ps1 index bbb5d2ab287..ef753faa6ed 100644 --- a/tools/speed-comparison/prepare-aot.ps1 +++ b/tools/speed-comparison/prepare-aot.ps1 @@ -1,6 +1,6 @@ # Script to prepare AOT builds for benchmarking param( - [string]$Framework = "net8.0" + [string]$Framework = "net11.0" ) Write-Host "Building TUnit AOT version for $Framework..." diff --git a/tools/tunit-nuget-tester/TUnit.AspNetCore.NugetTester/TUnit.AspNetCore.NugetTester.WebApp/TUnit.AspNetCore.NugetTester.WebApp.csproj b/tools/tunit-nuget-tester/TUnit.AspNetCore.NugetTester/TUnit.AspNetCore.NugetTester.WebApp/TUnit.AspNetCore.NugetTester.WebApp.csproj index ff70c90a2d4..c8f01e4347b 100644 --- a/tools/tunit-nuget-tester/TUnit.AspNetCore.NugetTester/TUnit.AspNetCore.NugetTester.WebApp/TUnit.AspNetCore.NugetTester.WebApp.csproj +++ b/tools/tunit-nuget-tester/TUnit.AspNetCore.NugetTester/TUnit.AspNetCore.NugetTester.WebApp/TUnit.AspNetCore.NugetTester.WebApp.csproj @@ -1,7 +1,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 enable enable false diff --git a/tools/tunit-nuget-tester/TUnit.AspNetCore.NugetTester/TUnit.AspNetCore.NugetTester/TUnit.AspNetCore.NugetTester.csproj b/tools/tunit-nuget-tester/TUnit.AspNetCore.NugetTester/TUnit.AspNetCore.NugetTester/TUnit.AspNetCore.NugetTester.csproj index 0752ac30059..e0491022fee 100644 --- a/tools/tunit-nuget-tester/TUnit.AspNetCore.NugetTester/TUnit.AspNetCore.NugetTester/TUnit.AspNetCore.NugetTester.csproj +++ b/tools/tunit-nuget-tester/TUnit.AspNetCore.NugetTester/TUnit.AspNetCore.NugetTester/TUnit.AspNetCore.NugetTester.csproj @@ -1,7 +1,7 @@ - net8.0;net9.0;net10.0 + net10.0;net11.0 latest true enable diff --git a/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester.FSharp/TUnit.NugetTester.FSharp.fsproj b/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester.FSharp/TUnit.NugetTester.FSharp.fsproj index c4b076548be..4341f1d5927 100644 --- a/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester.FSharp/TUnit.NugetTester.FSharp.fsproj +++ b/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester.FSharp/TUnit.NugetTester.FSharp.fsproj @@ -1,7 +1,7 @@  - net6.0;net8.0;net9.0;net10.0;net462;net472;net48;net481 + net6.0;net10.0;net11.0;net462;net472;net48;net481 latest true enable diff --git a/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester.VB/TUnit.NugetTester.VB.vbproj b/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester.VB/TUnit.NugetTester.VB.vbproj index 65ff716ba09..36b2857dcd8 100644 --- a/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester.VB/TUnit.NugetTester.VB.vbproj +++ b/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester.VB/TUnit.NugetTester.VB.vbproj @@ -1,7 +1,7 @@  - net6.0;net8.0;net9.0;net10.0;net462;net472;net48;net481 + net6.0;net10.0;net11.0;net462;net472;net48;net481 latest true enable diff --git a/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester/TUnit.NugetTester.csproj b/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester/TUnit.NugetTester.csproj index d93e0c378b1..cf367727e12 100644 --- a/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester/TUnit.NugetTester.csproj +++ b/tools/tunit-nuget-tester/TUnit.NugetTester/TUnit.NugetTester/TUnit.NugetTester.csproj @@ -1,7 +1,7 @@  - net8.0;net9.0;net10.0;net462;net472;net48;net481 + net10.0;net11.0;net462;net472;net48;net481 latest true enable