From b32490d203cb2d4a462445c29a423e5992841180 Mon Sep 17 00:00:00 2001 From: Tom Longhurst <30480171+thomhurst@users.noreply.github.com> Date: Sun, 12 Jul 2026 14:16:20 +0100 Subject: [PATCH 1/5] feat(assertions): add single-item chaining Closes #6221 --- TUnit.Assertions.Tests/ListAssertionTests.cs | 57 +++ .../MemoryAssertionTests.cs | 8 + .../Collections/MemoryAssertions.cs | 17 +- .../Conditions/CollectionAssertions.cs | 26 + .../Conditions/SingleItemSource.cs | 17 + ...Has_No_API_Changes.DotNet10_0.verified.txt | 479 ++++++++++++++++++ ..._Has_No_API_Changes.DotNet8_0.verified.txt | 468 +++++++++++++++++ ..._Has_No_API_Changes.DotNet9_0.verified.txt | 479 ++++++++++++++++++ ...ary_Has_No_API_Changes.Net4_7.verified.txt | 432 ++++++++++++++++ docs/docs/assertions/collections.md | 8 + 10 files changed, 1990 insertions(+), 1 deletion(-) create mode 100644 TUnit.Assertions/Conditions/SingleItemSource.cs diff --git a/TUnit.Assertions.Tests/ListAssertionTests.cs b/TUnit.Assertions.Tests/ListAssertionTests.cs index 7272cbed486..7e7a8eb192d 100644 --- a/TUnit.Assertions.Tests/ListAssertionTests.cs +++ b/TUnit.Assertions.Tests/ListAssertionTests.cs @@ -203,6 +203,55 @@ public async Task Test_List_HasSingleItem() await Assert.That(list).HasSingleItem(); } + [Test] + public async Task Test_List_HasSingleItem_Item_Allows_Chaining() + { + IList list = new List { 42 }; + + await Assert.That(list).HasSingleItem().Item.IsEqualTo(42); + } + + [Test] + public async Task Test_List_HasSingleItem_Item_Preserves_Preceding_Chain() + { + IList list = new List { 42 }; + + await Assert.That(list).IsNotEmpty().And.HasSingleItem().Item.IsEqualTo(42); + } + + [Test] + public async Task Test_List_HasSingleItem_Item_Does_Not_Reenumerate() + { + var enumerationCount = 0; + + IEnumerable GetItems() + { + enumerationCount++; + yield return 42; + } + + await Assert.That(GetItems()).HasSingleItem().Item.IsEqualTo(42); + await Assert.That(enumerationCount).IsEqualTo(1); + } + + [Test] + public async Task Test_List_HasSingleItem_Item_Preserves_Collection_Shape() + { + IList> list = [new List { 1, 2, 3 }]; + + await Assert.That(list).HasSingleItem().Item.Count().IsEqualTo(3); + } + + [Test] + public async Task Test_List_HasSingleItem_Item_Fails_Before_Item_Assertion() + { + IList list = []; + + var action = async () => await Assert.That(list).HasSingleItem().Item.IsEqualTo(0); + + await Assert.That(action).ThrowsException(); + } + [Test] public async Task Test_List_HasSingleItem_WithPredicate() { @@ -211,6 +260,14 @@ public async Task Test_List_HasSingleItem_WithPredicate() await Assert.That(item).IsEqualTo(3); } + [Test] + public async Task Test_List_HasSingleItem_WithPredicate_Item_Allows_Chaining() + { + IList list = new List { 1, 2, 3, 4, 5 }; + + await Assert.That(list).HasSingleItem(x => x == 3).Item.IsEqualTo(3); + } + [Test] public async Task Test_List_HasSingleItem_WithPredicate_Fails_WhenNoneMatch() { diff --git a/TUnit.Assertions.Tests/MemoryAssertionTests.cs b/TUnit.Assertions.Tests/MemoryAssertionTests.cs index de703c1341c..238f49e6e8a 100644 --- a/TUnit.Assertions.Tests/MemoryAssertionTests.cs +++ b/TUnit.Assertions.Tests/MemoryAssertionTests.cs @@ -55,6 +55,14 @@ public async Task Test_Memory_HasSingleItem() await Assert.That(memory).HasSingleItem(); } + [Test] + public async Task Test_Memory_HasSingleItem_Item_Allows_Chaining() + { + Memory memory = new[] { 42 }; + + await Assert.That(memory).HasSingleItem().Item.IsEqualTo(42); + } + [Test] public async Task Test_Memory_All() { diff --git a/TUnit.Assertions/Collections/MemoryAssertions.cs b/TUnit.Assertions/Collections/MemoryAssertions.cs index 2c24d2c83e6..22d98213f6f 100644 --- a/TUnit.Assertions/Collections/MemoryAssertions.cs +++ b/TUnit.Assertions/Collections/MemoryAssertions.cs @@ -1,6 +1,7 @@ #if NET5_0_OR_GREATER using System.Diagnostics.CodeAnalysis; using TUnit.Assertions.Abstractions; +using TUnit.Assertions.Conditions; using TUnit.Assertions.Conditions.Helpers; using TUnit.Assertions.Core; using TUnit.Assertions.Enums; @@ -235,6 +236,7 @@ protected override string GetExpectation() => public class MemoryHasSingleItemAssertion : MemoryAssertionBase { private readonly Func> _adapterFactory; + private TItem? _singleItem; public MemoryHasSingleItemAssertion( AssertionContext context, @@ -259,10 +261,23 @@ protected override Task CheckAsync(EvaluationMetadata } var adapter = _adapterFactory(metadata.Value); - return Task.FromResult(CollectionChecks.CheckHasSingleItem(adapter)); + return Task.FromResult(CollectionChecks.CheckHasSingleItem(adapter, out _singleItem)); } protected override string GetExpectation() => "to have a single item"; + + /// + /// Drills into the single item, allowing assertions to be chained directly against it. + /// + public SingleItemSource Item + { + get + { + Context.ExpressionBuilder.Append(".Item"); + Context.SetPendingLink(InternalWrappedExecution ?? this, CombinerType.And); + return new SingleItemSource(Context.Map(_ => _singleItem)); + } + } } /// diff --git a/TUnit.Assertions/Conditions/CollectionAssertions.cs b/TUnit.Assertions/Conditions/CollectionAssertions.cs index 78f0590971b..fa9f77c09f1 100644 --- a/TUnit.Assertions/Conditions/CollectionAssertions.cs +++ b/TUnit.Assertions/Conditions/CollectionAssertions.cs @@ -501,6 +501,19 @@ protected override Task CheckAsync(EvaluationMetadata "to have exactly one item"; + /// + /// Drills into the single item, allowing assertions to be chained directly against it. + /// + public SingleItemSource Item + { + get + { + Context.ExpressionBuilder.Append(".Item"); + Context.SetPendingLink(InternalWrappedExecution ?? this, CombinerType.And); + return new SingleItemSource(Context.Map(_ => _singleItem)); + } + } + /// /// Enables await syntax that returns the single item. /// This allows both chaining (.And) and item capture (await). @@ -560,6 +573,19 @@ protected override Task CheckAsync(EvaluationMetadata $"to have exactly one item matching {_predicateDescription}"; + /// + /// Drills into the single matching item, allowing assertions to be chained directly against it. + /// + public SingleItemSource Item + { + get + { + Context.ExpressionBuilder.Append(".Item"); + Context.SetPendingLink(InternalWrappedExecution ?? this, CombinerType.And); + return new SingleItemSource(Context.Map(_ => _singleItem)); + } + } + /// /// Enables await syntax that returns the matching item. /// This allows both chaining (.And) and item capture (await). diff --git a/TUnit.Assertions/Conditions/SingleItemSource.cs b/TUnit.Assertions/Conditions/SingleItemSource.cs new file mode 100644 index 00000000000..ea6c5bf10bf --- /dev/null +++ b/TUnit.Assertions/Conditions/SingleItemSource.cs @@ -0,0 +1,17 @@ +using TUnit.Assertions.Core; +using TUnit.Assertions.Sources; + +namespace TUnit.Assertions.Conditions; + +/// +/// Assertion source for the item captured by a successful HasSingleItem assertion. +/// +/// The collection item type. +[global::TUnit.Assertions.Attributes.GenerateCollectionShapeAssertions] +public sealed class SingleItemSource : ValueAssertion +{ + internal SingleItemSource(AssertionContext context) + : base(context) + { + } +} diff --git a/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet10_0.verified.txt b/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet10_0.verified.txt index 6c79349f71c..aaef3f7c8ea 100644 --- a/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet10_0.verified.txt +++ b/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet10_0.verified.txt @@ -562,6 +562,7 @@ namespace .Collections public class MemoryHasSingleItemAssertion : . { public MemoryHasSingleItemAssertion(. context, > adapterFactory) { } + public . Item { get; } protected override .<.> CheckAsync(. metadata) { } protected override . CreateAdapter(TMemory value) { } protected override string GetExpectation() { } @@ -1329,6 +1330,7 @@ namespace .Conditions where TCollection : . { public HasSingleItemAssertion(. context) { } + public . Item { get; } protected override .<.> CheckAsync(. metadata) { } public . GetAwaiter() { } protected override string GetExpectation() { } @@ -1338,6 +1340,7 @@ namespace .Conditions where TCollection : . { public HasSingleItemPredicateAssertion(. context, predicate, string predicateDescription) { } + public . Item { get; } protected override .<.> CheckAsync(. metadata) { } public . GetAwaiter() { } protected override string GetExpectation() { } @@ -1988,6 +1991,7 @@ namespace .Conditions [.("IsSubnormal", CustomName="IsNotSubnormal", ExpectationMessage="be subnormal", NegateLogic=true)] [.("IsSubnormal", ExpectationMessage="be subnormal")] public static class SingleAssertionExtensions { } + public sealed class SingleItemSource : . { } [.(typeof(), "IsEmpty", CustomName="IsNotEmpty", ExpectationMessage="be empty", NegateLogic=true)] [.(typeof(), "IsEmpty", ExpectationMessage="be empty")] [.(typeof(), "IsEmpty", CustomName="IsNotEmpty", ExpectationMessage="be empty", NegateLogic=true)] @@ -5608,6 +5612,481 @@ namespace .Extensions 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) { } + [.(-1)] + public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } + public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } + [.(-1)] + public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } + public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } + [.(-1)] + public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } + public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } + [.(-1)] + public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } + public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } + [.(-1)] + public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } + public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } + [.(-1)] + public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } + public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } + [.(-1)] + public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } + public static . Count(this . source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } + [.(-1)] + 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 { } + [.(-1)] + 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 { } + [.(-1)] + 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 { } + [.(-1)] + 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 { diff --git a/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet8_0.verified.txt b/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet8_0.verified.txt index 7ea0eac6d10..6320c1887c2 100644 --- a/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet8_0.verified.txt +++ b/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet8_0.verified.txt @@ -545,6 +545,7 @@ namespace .Collections public class MemoryHasSingleItemAssertion : . { public MemoryHasSingleItemAssertion(. context, > adapterFactory) { } + public . Item { get; } protected override .<.> CheckAsync(. metadata) { } protected override . CreateAdapter(TMemory value) { } protected override string GetExpectation() { } @@ -1312,6 +1313,7 @@ namespace .Conditions where TCollection : . { public HasSingleItemAssertion(. context) { } + public . Item { get; } protected override .<.> CheckAsync(. metadata) { } public . GetAwaiter() { } protected override string GetExpectation() { } @@ -1321,6 +1323,7 @@ namespace .Conditions where TCollection : . { public HasSingleItemPredicateAssertion(. context, predicate, string predicateDescription) { } + public . Item { get; } protected override .<.> CheckAsync(. metadata) { } public . GetAwaiter() { } protected override string GetExpectation() { } @@ -1971,6 +1974,7 @@ namespace .Conditions [.("IsSubnormal", CustomName="IsNotSubnormal", ExpectationMessage="be subnormal", NegateLogic=true)] [.("IsSubnormal", ExpectationMessage="be subnormal")] public static class SingleAssertionExtensions { } + public sealed class SingleItemSource : . { } [.(typeof(), "IsEmpty", CustomName="IsNotEmpty", ExpectationMessage="be empty", NegateLogic=true)] [.(typeof(), "IsEmpty", ExpectationMessage="be empty")] [.(typeof(), "IsEmpty", CustomName="IsNotEmpty", ExpectationMessage="be empty", NegateLogic=true)] @@ -5528,6 +5532,470 @@ namespace .Extensions 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 { diff --git a/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet9_0.verified.txt b/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet9_0.verified.txt index 3329f0025d2..bad033c441a 100644 --- a/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet9_0.verified.txt +++ b/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet9_0.verified.txt @@ -562,6 +562,7 @@ namespace .Collections public class MemoryHasSingleItemAssertion : . { public MemoryHasSingleItemAssertion(. context, > adapterFactory) { } + public . Item { get; } protected override .<.> CheckAsync(. metadata) { } protected override . CreateAdapter(TMemory value) { } protected override string GetExpectation() { } @@ -1329,6 +1330,7 @@ namespace .Conditions where TCollection : . { public HasSingleItemAssertion(. context) { } + public . Item { get; } protected override .<.> CheckAsync(. metadata) { } public . GetAwaiter() { } protected override string GetExpectation() { } @@ -1338,6 +1340,7 @@ namespace .Conditions where TCollection : . { public HasSingleItemPredicateAssertion(. context, predicate, string predicateDescription) { } + public . Item { get; } protected override .<.> CheckAsync(. metadata) { } public . GetAwaiter() { } protected override string GetExpectation() { } @@ -1988,6 +1991,7 @@ namespace .Conditions [.("IsSubnormal", CustomName="IsNotSubnormal", ExpectationMessage="be subnormal", NegateLogic=true)] [.("IsSubnormal", ExpectationMessage="be subnormal")] public static class SingleAssertionExtensions { } + public sealed class SingleItemSource : . { } [.(typeof(), "IsEmpty", CustomName="IsNotEmpty", ExpectationMessage="be empty", NegateLogic=true)] [.(typeof(), "IsEmpty", ExpectationMessage="be empty")] [.(typeof(), "IsEmpty", CustomName="IsNotEmpty", ExpectationMessage="be empty", NegateLogic=true)] @@ -5608,6 +5612,481 @@ namespace .Extensions 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) { } + [.(-1)] + public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } + public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } + [.(-1)] + public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } + public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } + [.(-1)] + public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } + public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } + [.(-1)] + public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } + public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } + [.(-1)] + public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } + public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } + [.(-1)] + public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } + public static .<., TItem> Count(this .<.> source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } + [.(-1)] + public static .<., TItem> Count(this .<.> source, <., .?> countAssertion, [.("countAssertion")] string? expression = null) { } + public static . Count(this . source, <., .?> itemAssertion, [.("itemAssertion")] string? expression = null) { } + [.(-1)] + 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 { } + [.(-1)] + 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 { } + [.(-1)] + 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 { } + [.(-1)] + 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 { diff --git a/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.Net4_7.verified.txt b/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.Net4_7.verified.txt index dedaac056ff..8e38d658c79 100644 --- a/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.Net4_7.verified.txt +++ b/TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.Net4_7.verified.txt @@ -1151,6 +1151,7 @@ namespace .Conditions where TCollection : . { public HasSingleItemAssertion(. context) { } + public . Item { get; } protected override .<.> CheckAsync(. metadata) { } public . GetAwaiter() { } protected override string GetExpectation() { } @@ -1160,6 +1161,7 @@ namespace .Conditions where TCollection : . { public HasSingleItemPredicateAssertion(. context, predicate, string predicateDescription) { } + public . Item { get; } protected override .<.> CheckAsync(. metadata) { } public . GetAwaiter() { } protected override string GetExpectation() { } @@ -1761,6 +1763,7 @@ namespace .Conditions [.("IsPositiveInfinity", CustomName="IsNotPositiveInfinity", ExpectationMessage="be positive infinity", NegateLogic=true)] [.("IsPositiveInfinity", ExpectationMessage="be positive infinity")] public static class SingleAssertionExtensions { } + public sealed class SingleItemSource : . { } [.("Contains")] public class StringContainsAssertion : . { @@ -4792,6 +4795,435 @@ namespace .Extensions public static . IsNotPositiveInfinity(this . source) { } public static . IsPositiveInfinity(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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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> 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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> 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> 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> SetEquals(this .<.> source, . other, [.("other")] string? expression = null) { } + public static .<., TItem> SetEquals(this .<.> source, . other, [.("other")] string? expression = null) { } + } public static class StreamAssertionExtensions { public static . CanRead(this .<.Stream> source) { } diff --git a/docs/docs/assertions/collections.md b/docs/docs/assertions/collections.md index 5406ae9aeb0..b22be27ad95 100644 --- a/docs/docs/assertions/collections.md +++ b/docs/docs/assertions/collections.md @@ -239,6 +239,14 @@ public async Task Collection_Has_Single_Item() } ``` +Use `.Item` to continue assertions directly against the single item: + +```csharp +await Assert.That(users) + .HasSingleItem() + .Item.Member(user => user.Name, name => name.IsEqualTo("Alice")); +``` + ## Ordering Assertions ### IsInOrder From b83adf2e216e99b1c5ee85237f49f85a677011cf Mon Sep 17 00:00:00 2001 From: Tom Longhurst <30480171+thomhurst@users.noreply.github.com> Date: Sun, 12 Jul 2026 14:50:39 +0100 Subject: [PATCH 2/5] fix(assertions): guard single-item drill-ins --- TUnit.Assertions.Tests/ListAssertionTests.cs | 30 +++++++++++++++++++ .../Collections/MemoryAssertions.cs | 1 + .../Conditions/CollectionAssertions.cs | 2 ++ TUnit.Assertions/Core/Assertion.cs | 9 ++++++ 4 files changed, 42 insertions(+) diff --git a/TUnit.Assertions.Tests/ListAssertionTests.cs b/TUnit.Assertions.Tests/ListAssertionTests.cs index 7e7a8eb192d..e229676360c 100644 --- a/TUnit.Assertions.Tests/ListAssertionTests.cs +++ b/TUnit.Assertions.Tests/ListAssertionTests.cs @@ -252,6 +252,36 @@ public async Task Test_List_HasSingleItem_Item_Fails_Before_Item_Assertion() await Assert.That(action).ThrowsException(); } + [Test] + public async Task Test_List_HasSingleItem_Item_Rejects_Preceding_Or_Chain() + { + var action = async () => await Assert.That(Array.Empty()) + .IsEmpty().Or.HasSingleItem().Item.IsEqualTo(0); + + await Assert.That(action).Throws(); + } + + [Test] + public async Task Test_List_HasSingleItem_Item_Is_Not_Evaluated_After_Failure_In_Assert_Multiple() + { + var itemAssertionEvaluated = false; + + var action = async () => + { + using (Assert.Multiple()) + { + await Assert.That(Array.Empty()).HasSingleItem().Item.Satisfies(_ => + { + itemAssertionEvaluated = true; + return true; + }); + } + }; + + await Assert.That(action).ThrowsException(); + await Assert.That(itemAssertionEvaluated).IsFalse(); + } + [Test] public async Task Test_List_HasSingleItem_WithPredicate() { diff --git a/TUnit.Assertions/Collections/MemoryAssertions.cs b/TUnit.Assertions/Collections/MemoryAssertions.cs index 22d98213f6f..5ac432fcef1 100644 --- a/TUnit.Assertions/Collections/MemoryAssertions.cs +++ b/TUnit.Assertions/Collections/MemoryAssertions.cs @@ -273,6 +273,7 @@ public SingleItemSource Item { get { + ThrowIfMixingCombiner>(); Context.ExpressionBuilder.Append(".Item"); Context.SetPendingLink(InternalWrappedExecution ?? this, CombinerType.And); return new SingleItemSource(Context.Map(_ => _singleItem)); diff --git a/TUnit.Assertions/Conditions/CollectionAssertions.cs b/TUnit.Assertions/Conditions/CollectionAssertions.cs index fa9f77c09f1..d718c66abcd 100644 --- a/TUnit.Assertions/Conditions/CollectionAssertions.cs +++ b/TUnit.Assertions/Conditions/CollectionAssertions.cs @@ -508,6 +508,7 @@ public SingleItemSource Item { get { + ThrowIfMixingCombiner>(); Context.ExpressionBuilder.Append(".Item"); Context.SetPendingLink(InternalWrappedExecution ?? this, CombinerType.And); return new SingleItemSource(Context.Map(_ => _singleItem)); @@ -580,6 +581,7 @@ public SingleItemSource Item { get { + ThrowIfMixingCombiner>(); Context.ExpressionBuilder.Append(".Item"); Context.SetPendingLink(InternalWrappedExecution ?? this, CombinerType.And); return new SingleItemSource(Context.Map(_ => _singleItem)); diff --git a/TUnit.Assertions/Core/Assertion.cs b/TUnit.Assertions/Core/Assertion.cs index 4374a8f57b3..3c5b9813422 100644 --- a/TUnit.Assertions/Core/Assertion.cs +++ b/TUnit.Assertions/Core/Assertion.cs @@ -134,7 +134,16 @@ public Assertion Because(string message) { var preWork = Context.PendingPreWork; Context.PendingPreWork = null; // Clear BEFORE execution to prevent re-entry + var currentScope = AssertionScope.GetCurrentAssertionScope(); + var exceptionCountBefore = currentScope?.ExceptionCount ?? 0; await preWork(); + + // Cross-type drill-ins must not evaluate when their parent assertion failed. + // Outside Assert.Multiple the failure throws; inside it the scope count is our signal. + if (currentScope?.ExceptionCount > exceptionCountBefore) + { + return default; + } } // If this is an And/OrAssertion (composite), delegate to AssertAsync which has custom logic From f58d2a6ba3c8b2d28a5e966d9d55aafde83f58c5 Mon Sep 17 00:00:00 2001 From: Tom Longhurst <30480171+thomhurst@users.noreply.github.com> Date: Sun, 12 Jul 2026 16:20:56 +0100 Subject: [PATCH 3/5] fix(assertions): gate item Or chains --- TUnit.Assertions.Tests/ListAssertionTests.cs | 9 +++++ TUnit.Assertions/Core/Assertion.cs | 38 ++++++++++++-------- 2 files changed, 33 insertions(+), 14 deletions(-) diff --git a/TUnit.Assertions.Tests/ListAssertionTests.cs b/TUnit.Assertions.Tests/ListAssertionTests.cs index e229676360c..4d406ce7d0d 100644 --- a/TUnit.Assertions.Tests/ListAssertionTests.cs +++ b/TUnit.Assertions.Tests/ListAssertionTests.cs @@ -261,6 +261,15 @@ public async Task Test_List_HasSingleItem_Item_Rejects_Preceding_Or_Chain() await Assert.That(action).Throws(); } + [Test] + public async Task Test_List_HasSingleItem_Item_Or_Cannot_Bypass_Parent_Assertion() + { + var action = async () => await Assert.That(Array.Empty()) + .HasSingleItem().Item.IsEqualTo(1).Or.IsEqualTo(0); + + await Assert.That(action).ThrowsException(); + } + [Test] public async Task Test_List_HasSingleItem_Item_Is_Not_Evaluated_After_Failure_In_Assert_Multiple() { diff --git a/TUnit.Assertions/Core/Assertion.cs b/TUnit.Assertions/Core/Assertion.cs index 3c5b9813422..79822273768 100644 --- a/TUnit.Assertions/Core/Assertion.cs +++ b/TUnit.Assertions/Core/Assertion.cs @@ -114,6 +114,11 @@ public Assertion Because(string message) /// public virtual async Task AssertAsync() { + if (!await ExecutePendingPreWorkAsync()) + { + return default; + } + // If part of an And/Or chain, delegate to the wrapper if (_wrappedExecution != null) { @@ -129,21 +134,9 @@ public Assertion Because(string message) /// internal async Task ExecuteCoreAsync() { - // Execute any pending cross-type assertions first (e.g., string assertions before WhenParsedInto) - if (Context.PendingPreWork != null) + if (!await ExecutePendingPreWorkAsync()) { - var preWork = Context.PendingPreWork; - Context.PendingPreWork = null; // Clear BEFORE execution to prevent re-entry - var currentScope = AssertionScope.GetCurrentAssertionScope(); - var exceptionCountBefore = currentScope?.ExceptionCount ?? 0; - await preWork(); - - // Cross-type drill-ins must not evaluate when their parent assertion failed. - // Outside Assert.Multiple the failure throws; inside it the scope count is our signal. - if (currentScope?.ExceptionCount > exceptionCountBefore) - { - return default; - } + return default; } // If this is an And/OrAssertion (composite), delegate to AssertAsync which has custom logic @@ -164,6 +157,23 @@ public Assertion Because(string message) return contextResult.Value; } + private async Task ExecutePendingPreWorkAsync() + { + if (Context.PendingPreWork is not { } preWork) + { + return true; + } + + Context.PendingPreWork = null; // Clear before execution to prevent re-entry. + var currentScope = AssertionScope.GetCurrentAssertionScope(); + var exceptionCountBefore = currentScope?.ExceptionCount ?? 0; + await preWork(); + + // Cross-type drill-ins must not evaluate when their parent assertion failed. + // Outside Assert.Multiple the failure throws; inside it the scope count is our signal. + return currentScope is null || currentScope.ExceptionCount <= exceptionCountBefore; + } + // Create EvaluationMetadata in a separate scope to avoid creating additional // DateTimeOffset fields in the state machine private Task CreateMetadataAndCheckAsync(TValue? value, Exception? exception) From 04ead3083629bfc7629fe61d999767df8e7fdf1a Mon Sep 17 00:00:00 2001 From: Tom Longhurst <30480171+thomhurst@users.noreply.github.com> Date: Sun, 12 Jul 2026 16:31:59 +0100 Subject: [PATCH 4/5] fix(assertions): preserve item prework --- TUnit.Assertions.Tests/ListAssertionTests.cs | 11 +++++++++++ TUnit.Assertions/Collections/MemoryAssertions.cs | 2 +- .../Conditions/CollectionAssertions.cs | 4 ++-- TUnit.Assertions/Conditions/SingleItemSource.cs | 9 +++++++++ TUnit.Assertions/Core/AssertionContext.cs | 15 +++++++++++++++ 5 files changed, 38 insertions(+), 3 deletions(-) diff --git a/TUnit.Assertions.Tests/ListAssertionTests.cs b/TUnit.Assertions.Tests/ListAssertionTests.cs index 4d406ce7d0d..9ea13dae50e 100644 --- a/TUnit.Assertions.Tests/ListAssertionTests.cs +++ b/TUnit.Assertions.Tests/ListAssertionTests.cs @@ -270,6 +270,17 @@ public async Task Test_List_HasSingleItem_Item_Or_Cannot_Bypass_Parent_Assertion await Assert.That(action).ThrowsException(); } + [Test] + public async Task Test_List_HasSingleItem_Item_Preserves_Parent_Through_Mappings() + { + await Assert.That(new[] { "value" }).HasSingleItem().Item.Length().IsEqualTo(5); + + var action = async () => await Assert.That(Array.Empty()) + .HasSingleItem().Item.Length().IsEqualTo(0); + + await Assert.That(action).ThrowsException(); + } + [Test] public async Task Test_List_HasSingleItem_Item_Is_Not_Evaluated_After_Failure_In_Assert_Multiple() { diff --git a/TUnit.Assertions/Collections/MemoryAssertions.cs b/TUnit.Assertions/Collections/MemoryAssertions.cs index 5ac432fcef1..f88530eeffb 100644 --- a/TUnit.Assertions/Collections/MemoryAssertions.cs +++ b/TUnit.Assertions/Collections/MemoryAssertions.cs @@ -276,7 +276,7 @@ public SingleItemSource Item ThrowIfMixingCombiner>(); Context.ExpressionBuilder.Append(".Item"); Context.SetPendingLink(InternalWrappedExecution ?? this, CombinerType.And); - return new SingleItemSource(Context.Map(_ => _singleItem)); + return SingleItemSource.Create(Context, _ => _singleItem); } } } diff --git a/TUnit.Assertions/Conditions/CollectionAssertions.cs b/TUnit.Assertions/Conditions/CollectionAssertions.cs index d718c66abcd..199f254866d 100644 --- a/TUnit.Assertions/Conditions/CollectionAssertions.cs +++ b/TUnit.Assertions/Conditions/CollectionAssertions.cs @@ -511,7 +511,7 @@ public SingleItemSource Item ThrowIfMixingCombiner>(); Context.ExpressionBuilder.Append(".Item"); Context.SetPendingLink(InternalWrappedExecution ?? this, CombinerType.And); - return new SingleItemSource(Context.Map(_ => _singleItem)); + return SingleItemSource.Create(Context, _ => _singleItem); } } @@ -584,7 +584,7 @@ public SingleItemSource Item ThrowIfMixingCombiner>(); Context.ExpressionBuilder.Append(".Item"); Context.SetPendingLink(InternalWrappedExecution ?? this, CombinerType.And); - return new SingleItemSource(Context.Map(_ => _singleItem)); + return SingleItemSource.Create(Context, _ => _singleItem); } } diff --git a/TUnit.Assertions/Conditions/SingleItemSource.cs b/TUnit.Assertions/Conditions/SingleItemSource.cs index ea6c5bf10bf..981762c8ba0 100644 --- a/TUnit.Assertions/Conditions/SingleItemSource.cs +++ b/TUnit.Assertions/Conditions/SingleItemSource.cs @@ -14,4 +14,13 @@ internal SingleItemSource(AssertionContext context) : base(context) { } + + internal static SingleItemSource Create( + AssertionContext context, + Func mapper) + { + var itemContext = context.Map(mapper); + itemContext.PreservePendingPreWorkOnMap = true; + return new SingleItemSource(itemContext); + } } diff --git a/TUnit.Assertions/Core/AssertionContext.cs b/TUnit.Assertions/Core/AssertionContext.cs index 80dd8099e84..f674130ed72 100644 --- a/TUnit.Assertions/Core/AssertionContext.cs +++ b/TUnit.Assertions/Core/AssertionContext.cs @@ -67,6 +67,16 @@ public AssertionContext Map(Func, Evaluati newContext.PendingPreWork = async () => await pendingAssertion.ExecuteCoreAsync(); } + if (PreservePendingPreWorkOnMap && PendingPreWork is { } preWork) + { + PendingPreWork = null; + var existing = newContext.PendingPreWork; + newContext.PendingPreWork = existing is null + ? preWork + : async () => { await preWork(); await existing(); }; + newContext.PreservePendingPreWorkOnMap = true; + } + return newContext; } @@ -160,6 +170,11 @@ public AssertionContext MapException() where TException /// internal Func? PendingPreWork { get; set; } + /// + /// Keeps pending pre-work attached while drill-in operations map through intermediate types. + /// + internal bool PreservePendingPreWorkOnMap { get; set; } + /// /// Sets the pending link state for the next assertion to consume. /// Called by AndContinuation/OrContinuation constructors. From 9846aef7f567df88df12132da7bb97c0a025ce25 Mon Sep 17 00:00:00 2001 From: Tom Longhurst <30480171+thomhurst@users.noreply.github.com> Date: Sun, 12 Jul 2026 22:43:17 +0100 Subject: [PATCH 5/5] fix(assertions): scope drill-in failure gate --- TUnit.Assertions.Tests/ParseAssertionTests.cs | 3 ++- TUnit.Assertions/Conditions/SingleItemSource.cs | 1 + TUnit.Assertions/Core/Assertion.cs | 6 +++--- TUnit.Assertions/Core/AssertionContext.cs | 7 +++++++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/TUnit.Assertions.Tests/ParseAssertionTests.cs b/TUnit.Assertions.Tests/ParseAssertionTests.cs index bcc605df94e..3241dee12a0 100644 --- a/TUnit.Assertions.Tests/ParseAssertionTests.cs +++ b/TUnit.Assertions.Tests/ParseAssertionTests.cs @@ -161,8 +161,9 @@ await Assert.That(sut) } }).ThrowsException(); - // Should have recorded the length assertion failure + // Both the pre-work failure and mapped assertion failure must be recorded. await Assert.That(exception.Message).Contains("length"); + await Assert.That(exception.Message).Contains("456"); } [Test] diff --git a/TUnit.Assertions/Conditions/SingleItemSource.cs b/TUnit.Assertions/Conditions/SingleItemSource.cs index 981762c8ba0..f92cc9a1d5a 100644 --- a/TUnit.Assertions/Conditions/SingleItemSource.cs +++ b/TUnit.Assertions/Conditions/SingleItemSource.cs @@ -21,6 +21,7 @@ internal static SingleItemSource Create( { var itemContext = context.Map(mapper); itemContext.PreservePendingPreWorkOnMap = true; + itemContext.SkipAssertionOnPreWorkFailure = true; return new SingleItemSource(itemContext); } } diff --git a/TUnit.Assertions/Core/Assertion.cs b/TUnit.Assertions/Core/Assertion.cs index 79822273768..d5c6438d5b8 100644 --- a/TUnit.Assertions/Core/Assertion.cs +++ b/TUnit.Assertions/Core/Assertion.cs @@ -169,9 +169,9 @@ private async Task ExecutePendingPreWorkAsync() var exceptionCountBefore = currentScope?.ExceptionCount ?? 0; await preWork(); - // Cross-type drill-ins must not evaluate when their parent assertion failed. - // Outside Assert.Multiple the failure throws; inside it the scope count is our signal. - return currentScope is null || currentScope.ExceptionCount <= exceptionCountBefore; + return !Context.SkipAssertionOnPreWorkFailure + || currentScope is null + || currentScope.ExceptionCount <= exceptionCountBefore; } // Create EvaluationMetadata in a separate scope to avoid creating additional diff --git a/TUnit.Assertions/Core/AssertionContext.cs b/TUnit.Assertions/Core/AssertionContext.cs index f674130ed72..b09e3d417e7 100644 --- a/TUnit.Assertions/Core/AssertionContext.cs +++ b/TUnit.Assertions/Core/AssertionContext.cs @@ -75,6 +75,7 @@ public AssertionContext Map(Func, Evaluati ? preWork : async () => { await preWork(); await existing(); }; newContext.PreservePendingPreWorkOnMap = true; + newContext.SkipAssertionOnPreWorkFailure = SkipAssertionOnPreWorkFailure; } return newContext; @@ -175,6 +176,12 @@ public AssertionContext MapException() where TException /// internal bool PreservePendingPreWorkOnMap { get; set; } + /// + /// Skips the mapped assertion when pending pre-work fails inside . + /// Used when the mapped value is only valid after the pre-work succeeds. + /// + internal bool SkipAssertionOnPreWorkFailure { get; set; } + /// /// Sets the pending link state for the next assertion to consume. /// Called by AndContinuation/OrContinuation constructors.