From 802d46914e79253279266e1bc715293c70e72861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Breu=C3=9F?= Date: Tue, 15 Sep 2026 10:55:46 +0200 Subject: [PATCH] refactor!: name the collection result types after what they do `Contain` and `BeContainedIn` were pre-rename infinitives for methods now called `Contains` and `IsContainedIn`, and the six types behind them differed only in which proper-relation `Properly()` set. That relation is now a constructor argument, so one type per flavour serves both directions. The dictionary results were named after their continuation member rather than their method, and the last two public types in the root namespace join the others in `aweXpect.Results` and `aweXpect.Options`. Four `ImmutableArray` overloads of `IsEqualTo`/`IsNotEqualTo` returned a `BeContainedIn` result, which offered a `Properly()` that silently reinterpreted the expectation as a proper subset. They now return the plain match result like every other overload. --- .../EnumerableQuantifier.All.cs | 2 +- .../EnumerableQuantifier.AtLeast.cs | 2 +- .../EnumerableQuantifier.AtMost.cs | 2 +- .../EnumerableQuantifier.Between.cs | 2 +- .../EnumerableQuantifier.Exactly.cs | 2 +- .../EnumerableQuantifier.LessThan.cs | 2 +- .../EnumerableQuantifier.MoreThan.cs | 2 +- .../EnumerableQuantifier.None.cs | 2 +- .../EnumerableQuantifier.cs | 2 +- .../Results/CollectionBeContainedInResult.cs | 32 -- .../Results/CollectionContainResult.cs | 31 -- .../CollectionCountResult.cs | 4 +- ...insValueResult.cs => ContainsKeyResult.cs} | 4 +- ...sValuesResult.cs => ContainsKeysResult.cs} | 5 +- .../ObjectCollectionBeContainedInResult.cs | 33 -- ...s => ObjectProperCollectionMatchResult.cs} | 14 +- .../Results/ProperCollectionMatchResult.cs | 33 ++ .../StringCollectionBeContainedInResult.cs | 33 -- ...s => StringProperCollectionMatchResult.cs} | 14 +- .../That/Collections/CollectionHelpers.cs | 1 + .../Collections/ThatAsyncEnumerable.All.cs | 1 + .../Collections/ThatAsyncEnumerable.Any.cs | 1 + .../ThatAsyncEnumerable.AtLeast.cs | 1 + .../Collections/ThatAsyncEnumerable.AtMost.cs | 1 + .../ThatAsyncEnumerable.Between.cs | 1 + .../ThatAsyncEnumerable.Contains.cs | 56 ++-- .../ThatAsyncEnumerable.Elements.cs | 1 + .../ThatAsyncEnumerable.Exactly.cs | 1 + .../ThatAsyncEnumerable.HasCount.cs | 1 + .../ThatAsyncEnumerable.IsContainedIn.cs | 56 ++-- .../ThatAsyncEnumerable.LessThan.cs | 1 + .../ThatAsyncEnumerable.MoreThan.cs | 1 + .../Collections/ThatAsyncEnumerable.None.cs | 1 + .../Collections/ThatDictionary.ContainsKey.cs | 8 +- .../ThatDictionary.ContainsKeys.cs | 8 +- .../That/Collections/ThatEnumerable.All.cs | 1 + .../That/Collections/ThatEnumerable.Any.cs | 1 + .../Collections/ThatEnumerable.AtLeast.cs | 1 + .../That/Collections/ThatEnumerable.AtMost.cs | 1 + .../Collections/ThatEnumerable.Between.cs | 1 + .../Collections/ThatEnumerable.Contains.cs | 112 ++++--- .../Collections/ThatEnumerable.Elements.cs | 1 + .../Collections/ThatEnumerable.Exactly.cs | 1 + .../Collections/ThatEnumerable.HasCount.cs | 1 + .../ThatEnumerable.IsContainedIn.cs | 98 +++--- .../Collections/ThatEnumerable.IsEqualTo.cs | 16 +- .../Collections/ThatEnumerable.LessThan.cs | 1 + .../Collections/ThatEnumerable.MoreThan.cs | 1 + .../That/Collections/ThatEnumerable.None.cs | 1 + .../ThatReadOnlyDictionary.ContainsKey.cs | 8 +- .../ThatReadOnlyDictionary.ContainsKeys.cs | 8 +- .../Expected/aweXpect_net10.0.txt | 297 +++++++++--------- .../Expected/aweXpect_net8.0.txt | 297 +++++++++--------- .../Expected/aweXpect_netstandard2.0.txt | 233 +++++++------- .../Collections/EnumerableQuantifierTests.cs | 1 + 55 files changed, 688 insertions(+), 754 deletions(-) rename Source/aweXpect/{That/Collections => Options}/EnumerableQuantifier.All.cs (98%) rename Source/aweXpect/{That/Collections => Options}/EnumerableQuantifier.AtLeast.cs (98%) rename Source/aweXpect/{That/Collections => Options}/EnumerableQuantifier.AtMost.cs (98%) rename Source/aweXpect/{That/Collections => Options}/EnumerableQuantifier.Between.cs (98%) rename Source/aweXpect/{That/Collections => Options}/EnumerableQuantifier.Exactly.cs (98%) rename Source/aweXpect/{That/Collections => Options}/EnumerableQuantifier.LessThan.cs (98%) rename Source/aweXpect/{That/Collections => Options}/EnumerableQuantifier.MoreThan.cs (98%) rename Source/aweXpect/{That/Collections => Options}/EnumerableQuantifier.None.cs (98%) rename Source/aweXpect/{That/Collections => Options}/EnumerableQuantifier.cs (98%) delete mode 100644 Source/aweXpect/Results/CollectionBeContainedInResult.cs delete mode 100644 Source/aweXpect/Results/CollectionContainResult.cs rename Source/aweXpect/{That/Collections => Results}/CollectionCountResult.cs (96%) rename Source/aweXpect/Results/{ContainsValueResult.cs => ContainsKeyResult.cs} (90%) rename Source/aweXpect/Results/{ContainsValuesResult.cs => ContainsKeysResult.cs} (90%) delete mode 100644 Source/aweXpect/Results/ObjectCollectionBeContainedInResult.cs rename Source/aweXpect/Results/{ObjectCollectionContainResult.cs => ObjectProperCollectionMatchResult.cs} (57%) create mode 100644 Source/aweXpect/Results/ProperCollectionMatchResult.cs delete mode 100644 Source/aweXpect/Results/StringCollectionBeContainedInResult.cs rename Source/aweXpect/Results/{StringCollectionContainResult.cs => StringProperCollectionMatchResult.cs} (61%) diff --git a/Source/aweXpect/That/Collections/EnumerableQuantifier.All.cs b/Source/aweXpect/Options/EnumerableQuantifier.All.cs similarity index 98% rename from Source/aweXpect/That/Collections/EnumerableQuantifier.All.cs rename to Source/aweXpect/Options/EnumerableQuantifier.All.cs index 6d2cdb4e23..f0bb929069 100644 --- a/Source/aweXpect/That/Collections/EnumerableQuantifier.All.cs +++ b/Source/aweXpect/Options/EnumerableQuantifier.All.cs @@ -1,7 +1,7 @@ using aweXpect.Core; using aweXpect.Core.Constraints; -namespace aweXpect; +namespace aweXpect.Options; public abstract partial class EnumerableQuantifier { diff --git a/Source/aweXpect/That/Collections/EnumerableQuantifier.AtLeast.cs b/Source/aweXpect/Options/EnumerableQuantifier.AtLeast.cs similarity index 98% rename from Source/aweXpect/That/Collections/EnumerableQuantifier.AtLeast.cs rename to Source/aweXpect/Options/EnumerableQuantifier.AtLeast.cs index e17e46b9ef..7da50a2ee9 100644 --- a/Source/aweXpect/That/Collections/EnumerableQuantifier.AtLeast.cs +++ b/Source/aweXpect/Options/EnumerableQuantifier.AtLeast.cs @@ -1,7 +1,7 @@ using aweXpect.Core; using aweXpect.Core.Constraints; -namespace aweXpect; +namespace aweXpect.Options; public abstract partial class EnumerableQuantifier { diff --git a/Source/aweXpect/That/Collections/EnumerableQuantifier.AtMost.cs b/Source/aweXpect/Options/EnumerableQuantifier.AtMost.cs similarity index 98% rename from Source/aweXpect/That/Collections/EnumerableQuantifier.AtMost.cs rename to Source/aweXpect/Options/EnumerableQuantifier.AtMost.cs index 7736e13b57..7c0b460da8 100644 --- a/Source/aweXpect/That/Collections/EnumerableQuantifier.AtMost.cs +++ b/Source/aweXpect/Options/EnumerableQuantifier.AtMost.cs @@ -1,7 +1,7 @@ using aweXpect.Core; using aweXpect.Core.Constraints; -namespace aweXpect; +namespace aweXpect.Options; public abstract partial class EnumerableQuantifier { diff --git a/Source/aweXpect/That/Collections/EnumerableQuantifier.Between.cs b/Source/aweXpect/Options/EnumerableQuantifier.Between.cs similarity index 98% rename from Source/aweXpect/That/Collections/EnumerableQuantifier.Between.cs rename to Source/aweXpect/Options/EnumerableQuantifier.Between.cs index 9ca76dd76f..774719f705 100644 --- a/Source/aweXpect/That/Collections/EnumerableQuantifier.Between.cs +++ b/Source/aweXpect/Options/EnumerableQuantifier.Between.cs @@ -1,7 +1,7 @@ using aweXpect.Core; using aweXpect.Core.Constraints; -namespace aweXpect; +namespace aweXpect.Options; public abstract partial class EnumerableQuantifier { diff --git a/Source/aweXpect/That/Collections/EnumerableQuantifier.Exactly.cs b/Source/aweXpect/Options/EnumerableQuantifier.Exactly.cs similarity index 98% rename from Source/aweXpect/That/Collections/EnumerableQuantifier.Exactly.cs rename to Source/aweXpect/Options/EnumerableQuantifier.Exactly.cs index b25bb8af4a..0c284f37ec 100644 --- a/Source/aweXpect/That/Collections/EnumerableQuantifier.Exactly.cs +++ b/Source/aweXpect/Options/EnumerableQuantifier.Exactly.cs @@ -1,7 +1,7 @@ using aweXpect.Core; using aweXpect.Core.Constraints; -namespace aweXpect; +namespace aweXpect.Options; public abstract partial class EnumerableQuantifier { diff --git a/Source/aweXpect/That/Collections/EnumerableQuantifier.LessThan.cs b/Source/aweXpect/Options/EnumerableQuantifier.LessThan.cs similarity index 98% rename from Source/aweXpect/That/Collections/EnumerableQuantifier.LessThan.cs rename to Source/aweXpect/Options/EnumerableQuantifier.LessThan.cs index a00200ba08..4760fa542e 100644 --- a/Source/aweXpect/That/Collections/EnumerableQuantifier.LessThan.cs +++ b/Source/aweXpect/Options/EnumerableQuantifier.LessThan.cs @@ -1,7 +1,7 @@ using aweXpect.Core; using aweXpect.Core.Constraints; -namespace aweXpect; +namespace aweXpect.Options; public abstract partial class EnumerableQuantifier { diff --git a/Source/aweXpect/That/Collections/EnumerableQuantifier.MoreThan.cs b/Source/aweXpect/Options/EnumerableQuantifier.MoreThan.cs similarity index 98% rename from Source/aweXpect/That/Collections/EnumerableQuantifier.MoreThan.cs rename to Source/aweXpect/Options/EnumerableQuantifier.MoreThan.cs index d3ec1e74e3..f7089957ca 100644 --- a/Source/aweXpect/That/Collections/EnumerableQuantifier.MoreThan.cs +++ b/Source/aweXpect/Options/EnumerableQuantifier.MoreThan.cs @@ -1,7 +1,7 @@ using aweXpect.Core; using aweXpect.Core.Constraints; -namespace aweXpect; +namespace aweXpect.Options; public abstract partial class EnumerableQuantifier { diff --git a/Source/aweXpect/That/Collections/EnumerableQuantifier.None.cs b/Source/aweXpect/Options/EnumerableQuantifier.None.cs similarity index 98% rename from Source/aweXpect/That/Collections/EnumerableQuantifier.None.cs rename to Source/aweXpect/Options/EnumerableQuantifier.None.cs index 31046de4f6..37f9e5494e 100644 --- a/Source/aweXpect/That/Collections/EnumerableQuantifier.None.cs +++ b/Source/aweXpect/Options/EnumerableQuantifier.None.cs @@ -1,7 +1,7 @@ using aweXpect.Core; using aweXpect.Core.Constraints; -namespace aweXpect; +namespace aweXpect.Options; public abstract partial class EnumerableQuantifier { diff --git a/Source/aweXpect/That/Collections/EnumerableQuantifier.cs b/Source/aweXpect/Options/EnumerableQuantifier.cs similarity index 98% rename from Source/aweXpect/That/Collections/EnumerableQuantifier.cs rename to Source/aweXpect/Options/EnumerableQuantifier.cs index 377e71407e..c25df1c457 100644 --- a/Source/aweXpect/That/Collections/EnumerableQuantifier.cs +++ b/Source/aweXpect/Options/EnumerableQuantifier.cs @@ -2,7 +2,7 @@ using aweXpect.Core; using aweXpect.Core.Constraints; -namespace aweXpect; +namespace aweXpect.Options; /// /// Quantifier for evaluating collections. diff --git a/Source/aweXpect/Results/CollectionBeContainedInResult.cs b/Source/aweXpect/Results/CollectionBeContainedInResult.cs deleted file mode 100644 index 034c003cd6..0000000000 --- a/Source/aweXpect/Results/CollectionBeContainedInResult.cs +++ /dev/null @@ -1,32 +0,0 @@ -using aweXpect.Core; -using aweXpect.Options; - -namespace aweXpect.Results; - -/// -/// The result for verifying that a collection is contained in another collection. -/// -/// -/// -/// -public class CollectionBeContainedInResult( - ExpectationBuilder expectationBuilder, - TThat returnValue, - CollectionMatchOptions collectionMatchOptions) - : CollectionMatchResult(expectationBuilder, returnValue, collectionMatchOptions) -{ - private readonly CollectionMatchOptions _collectionMatchOptions = collectionMatchOptions; - - /// - /// Verifies that the subject is contained in the expected items which has at least one additional item. - /// - /// - /// This means, that the expected collection is a proper superset. - /// - public CollectionMatchResult Properly() - { - _collectionMatchOptions.SetEquivalenceRelation( - CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); - return this; - } -} diff --git a/Source/aweXpect/Results/CollectionContainResult.cs b/Source/aweXpect/Results/CollectionContainResult.cs deleted file mode 100644 index 9928d71666..0000000000 --- a/Source/aweXpect/Results/CollectionContainResult.cs +++ /dev/null @@ -1,31 +0,0 @@ -using aweXpect.Core; -using aweXpect.Options; - -namespace aweXpect.Results; - -/// -/// The result for verifying that a collection contains another collection. -/// -/// -/// -/// -public class CollectionContainResult( - ExpectationBuilder expectationBuilder, - TThat returnValue, - CollectionMatchOptions collectionMatchOptions) - : CollectionMatchResult(expectationBuilder, returnValue, collectionMatchOptions) -{ - private readonly CollectionMatchOptions _collectionMatchOptions = collectionMatchOptions; - - /// - /// Verifies that the subject contain all expected items and at least one additional item. - /// - /// - /// This means, that the expected collection is a proper subset. - /// - public CollectionMatchResult Properly() - { - _collectionMatchOptions.SetEquivalenceRelation(CollectionMatchOptions.EquivalenceRelations.ContainsProperly); - return this; - } -} diff --git a/Source/aweXpect/That/Collections/CollectionCountResult.cs b/Source/aweXpect/Results/CollectionCountResult.cs similarity index 96% rename from Source/aweXpect/That/Collections/CollectionCountResult.cs rename to Source/aweXpect/Results/CollectionCountResult.cs index 19fa9c6944..1ee5f3d421 100644 --- a/Source/aweXpect/That/Collections/CollectionCountResult.cs +++ b/Source/aweXpect/Results/CollectionCountResult.cs @@ -1,7 +1,7 @@ using System; -using aweXpect.Results; +using aweXpect.Options; -namespace aweXpect; +namespace aweXpect.Results; /// /// The result for counting items in a collection. diff --git a/Source/aweXpect/Results/ContainsValueResult.cs b/Source/aweXpect/Results/ContainsKeyResult.cs similarity index 90% rename from Source/aweXpect/Results/ContainsValueResult.cs rename to Source/aweXpect/Results/ContainsKeyResult.cs index f5019bdf59..a794da901a 100644 --- a/Source/aweXpect/Results/ContainsValueResult.cs +++ b/Source/aweXpect/Results/ContainsKeyResult.cs @@ -9,14 +9,14 @@ namespace aweXpect.Results; /// /// /// -public class ContainsValueResult +public class ContainsKeyResult : AndOrResult { private readonly ExpectationBuilder _expectationBuilder; private readonly TKey _key; private readonly Func _memberAccessor; - internal ContainsValueResult( + internal ContainsKeyResult( ExpectationBuilder expectationBuilder, TThat returnValue, TKey key, diff --git a/Source/aweXpect/Results/ContainsValuesResult.cs b/Source/aweXpect/Results/ContainsKeysResult.cs similarity index 90% rename from Source/aweXpect/Results/ContainsValuesResult.cs rename to Source/aweXpect/Results/ContainsKeysResult.cs index ba73f208df..93d9825b5a 100644 --- a/Source/aweXpect/Results/ContainsValuesResult.cs +++ b/Source/aweXpect/Results/ContainsKeysResult.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using aweXpect.Core; +using aweXpect.Options; namespace aweXpect.Results; @@ -10,14 +11,14 @@ namespace aweXpect.Results; /// /// /// -public class ContainsValuesResult +public class ContainsKeysResult : AndOrResult { private readonly ExpectationBuilder _expectationBuilder; private readonly TKey[] _keys; private readonly Func> _memberAccessor; - internal ContainsValuesResult( + internal ContainsKeysResult( ExpectationBuilder expectationBuilder, TThat returnValue, TKey[] keys, diff --git a/Source/aweXpect/Results/ObjectCollectionBeContainedInResult.cs b/Source/aweXpect/Results/ObjectCollectionBeContainedInResult.cs deleted file mode 100644 index 43cf77ac6f..0000000000 --- a/Source/aweXpect/Results/ObjectCollectionBeContainedInResult.cs +++ /dev/null @@ -1,33 +0,0 @@ -using aweXpect.Core; -using aweXpect.Options; - -namespace aweXpect.Results; - -/// -/// The result for verifying that a collection is contained in another collection. -/// -/// -/// -/// -public class ObjectCollectionBeContainedInResult( - ExpectationBuilder expectationBuilder, - TThat returnValue, - ObjectEqualityOptions options, - CollectionMatchOptions collectionMatchOptions) - : ObjectCollectionMatchResult(expectationBuilder, returnValue, options, collectionMatchOptions) -{ - private readonly CollectionMatchOptions _collectionMatchOptions = collectionMatchOptions; - - /// - /// Verifies that the subject is contained in the expected items which has at least one additional item. - /// - /// - /// This means, that the expected collection is a proper superset. - /// - public ObjectCollectionMatchResult Properly() - { - _collectionMatchOptions.SetEquivalenceRelation( - CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); - return this; - } -} diff --git a/Source/aweXpect/Results/ObjectCollectionContainResult.cs b/Source/aweXpect/Results/ObjectProperCollectionMatchResult.cs similarity index 57% rename from Source/aweXpect/Results/ObjectCollectionContainResult.cs rename to Source/aweXpect/Results/ObjectProperCollectionMatchResult.cs index 809ac96a67..1ad9288b74 100644 --- a/Source/aweXpect/Results/ObjectCollectionContainResult.cs +++ b/Source/aweXpect/Results/ObjectProperCollectionMatchResult.cs @@ -4,29 +4,31 @@ namespace aweXpect.Results; /// -/// The result for verifying that a collection contains another collection. +/// The result for verifying that a collection contains or is contained in another collection. /// /// /// /// -public class ObjectCollectionContainResult( +public class ObjectProperCollectionMatchResult( ExpectationBuilder expectationBuilder, TThat returnValue, ObjectEqualityOptions options, - CollectionMatchOptions collectionMatchOptions) + CollectionMatchOptions collectionMatchOptions, + CollectionMatchOptions.EquivalenceRelations properEquivalenceRelation) : ObjectCollectionMatchResult(expectationBuilder, returnValue, options, collectionMatchOptions) { private readonly CollectionMatchOptions _collectionMatchOptions = collectionMatchOptions; /// - /// Verifies that the subject contain all expected items and at least one additional item. + /// Verifies that the two collections differ by at least one additional item. /// /// - /// This means, that the expected collection is a proper subset. + /// This means, that the expected collection is a proper subset of the subject for Contains and a proper + /// superset for IsContainedIn. /// public ObjectCollectionMatchResult Properly() { - _collectionMatchOptions.SetEquivalenceRelation(CollectionMatchOptions.EquivalenceRelations.ContainsProperly); + _collectionMatchOptions.SetEquivalenceRelation(properEquivalenceRelation); return this; } } diff --git a/Source/aweXpect/Results/ProperCollectionMatchResult.cs b/Source/aweXpect/Results/ProperCollectionMatchResult.cs new file mode 100644 index 0000000000..80094105c5 --- /dev/null +++ b/Source/aweXpect/Results/ProperCollectionMatchResult.cs @@ -0,0 +1,33 @@ +using aweXpect.Core; +using aweXpect.Options; + +namespace aweXpect.Results; + +/// +/// The result for verifying that a collection contains or is contained in another collection. +/// +/// +/// +/// +public class ProperCollectionMatchResult( + ExpectationBuilder expectationBuilder, + TThat returnValue, + CollectionMatchOptions collectionMatchOptions, + CollectionMatchOptions.EquivalenceRelations properEquivalenceRelation) + : CollectionMatchResult(expectationBuilder, returnValue, collectionMatchOptions) +{ + private readonly CollectionMatchOptions _collectionMatchOptions = collectionMatchOptions; + + /// + /// Verifies that the two collections differ by at least one additional item. + /// + /// + /// This means, that the expected collection is a proper subset of the subject for Contains and a proper + /// superset for IsContainedIn. + /// + public CollectionMatchResult Properly() + { + _collectionMatchOptions.SetEquivalenceRelation(properEquivalenceRelation); + return this; + } +} diff --git a/Source/aweXpect/Results/StringCollectionBeContainedInResult.cs b/Source/aweXpect/Results/StringCollectionBeContainedInResult.cs deleted file mode 100644 index ab44e48b8e..0000000000 --- a/Source/aweXpect/Results/StringCollectionBeContainedInResult.cs +++ /dev/null @@ -1,33 +0,0 @@ -using aweXpect.Core; -using aweXpect.Options; - -namespace aweXpect.Results; - -/// -/// The result for verifying that a string collection is contained in another collection. -/// -/// -/// -/// -public class StringCollectionBeContainedInResult( - ExpectationBuilder expectationBuilder, - TThat returnValue, - StringEqualityOptions options, - CollectionMatchOptions collectionMatchOptions) - : StringCollectionMatchResult(expectationBuilder, returnValue, options, collectionMatchOptions) -{ - private readonly CollectionMatchOptions _collectionMatchOptions = collectionMatchOptions; - - /// - /// Verifies that the subject is contained in the expected items which has at least one additional item. - /// - /// - /// This means, that the expected collection is a proper superset. - /// - public StringCollectionMatchResult Properly() - { - _collectionMatchOptions.SetEquivalenceRelation( - CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); - return this; - } -} diff --git a/Source/aweXpect/Results/StringCollectionContainResult.cs b/Source/aweXpect/Results/StringProperCollectionMatchResult.cs similarity index 61% rename from Source/aweXpect/Results/StringCollectionContainResult.cs rename to Source/aweXpect/Results/StringProperCollectionMatchResult.cs index 97a7315a5d..1c1da97d89 100644 --- a/Source/aweXpect/Results/StringCollectionContainResult.cs +++ b/Source/aweXpect/Results/StringProperCollectionMatchResult.cs @@ -4,29 +4,31 @@ namespace aweXpect.Results; /// -/// The result for verifying that a string collection contains another collection. +/// The result for verifying that a string collection contains or is contained in another collection. /// /// /// /// -public class StringCollectionContainResult( +public class StringProperCollectionMatchResult( ExpectationBuilder expectationBuilder, TThat returnValue, StringEqualityOptions options, - CollectionMatchOptions collectionMatchOptions) + CollectionMatchOptions collectionMatchOptions, + CollectionMatchOptions.EquivalenceRelations properEquivalenceRelation) : StringCollectionMatchResult(expectationBuilder, returnValue, options, collectionMatchOptions) { private readonly CollectionMatchOptions _collectionMatchOptions = collectionMatchOptions; /// - /// Verifies that the subject contain all expected items and at least one additional item. + /// Verifies that the two collections differ by at least one additional item. /// /// - /// This means, that the expected collection is a proper subset. + /// This means, that the expected collection is a proper subset of the subject for Contains and a proper + /// superset for IsContainedIn. /// public StringCollectionMatchResult Properly() { - _collectionMatchOptions.SetEquivalenceRelation(CollectionMatchOptions.EquivalenceRelations.ContainsProperly); + _collectionMatchOptions.SetEquivalenceRelation(properEquivalenceRelation); return this; } } diff --git a/Source/aweXpect/That/Collections/CollectionHelpers.cs b/Source/aweXpect/That/Collections/CollectionHelpers.cs index 5f517a3ff7..3467f80b83 100644 --- a/Source/aweXpect/That/Collections/CollectionHelpers.cs +++ b/Source/aweXpect/That/Collections/CollectionHelpers.cs @@ -6,6 +6,7 @@ using aweXpect.Core; using aweXpect.Customization; using aweXpect.Helpers; +using aweXpect.Options; namespace aweXpect; diff --git a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.All.cs b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.All.cs index 279faab5d1..03505c654e 100644 --- a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.All.cs +++ b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.All.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; namespace aweXpect; diff --git a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Any.cs b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Any.cs index 274ea18bee..5e955834f5 100644 --- a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Any.cs +++ b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Any.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; namespace aweXpect; diff --git a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.AtLeast.cs b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.AtLeast.cs index 4d8a147ffe..f96bab5386 100644 --- a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.AtLeast.cs +++ b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.AtLeast.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; namespace aweXpect; diff --git a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.AtMost.cs b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.AtMost.cs index 4b66466245..64b9399464 100644 --- a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.AtMost.cs +++ b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.AtMost.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; namespace aweXpect; diff --git a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Between.cs b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Between.cs index e70d535a08..744d0efbb8 100644 --- a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Between.cs +++ b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Between.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; using aweXpect.Results; namespace aweXpect; diff --git a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Contains.cs b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Contains.cs index da71010194..7ce5e74ece 100644 --- a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Contains.cs +++ b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Contains.cs @@ -103,7 +103,7 @@ public static CountResult, IThat /// Verifies that the collection contains the provided collection. /// [GuaranteesNotNull] - public static ObjectCollectionContainResult, IThat?>, TItem> + public static ObjectProperCollectionMatchResult, IThat?>, TItem> Contains( this IThat?> source, IEnumerable expected, @@ -113,7 +113,7 @@ public static CountResult, IThat ObjectEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionContainResult, IThat?>, TItem>( + return new ObjectProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint( expectationBuilder, it, grammars, @@ -121,14 +121,15 @@ public static CountResult, IThat options, matchOptions, failsForNullSubject: true)), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } /// /// Verifies that the collection contains the provided collection. /// [GuaranteesNotNull] - public static StringCollectionContainResult, IThat?>> + public static StringProperCollectionMatchResult, IThat?>> Contains( this IThat?> source, IEnumerable expected, @@ -138,7 +139,7 @@ public static CountResult, IThat StringEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new StringCollectionContainResult, IThat?>>( + return new StringProperCollectionMatchResult, IThat?>>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint( expectationBuilder, it, grammars, @@ -146,14 +147,15 @@ public static CountResult, IThat expected, options, matchOptions, failsForNullSubject: true)), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } /// /// Verifies that the collection contains the provided collection of predicates. /// [GuaranteesNotNull] - public static CollectionContainResult, IThat?>, TItem> + public static ProperCollectionMatchResult, IThat?>, TItem> Contains( this IThat?> source, IEnumerable>> expected, @@ -163,21 +165,22 @@ public static CountResult, IThat expected.ThrowIfNullOrEmpty(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CollectionContainResult, IThat?>, TItem>( + return new ProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToFromPredicateConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), expected, matchOptions, failsForNullSubject: true)), source, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } /// /// Verifies that the collection contains the provided collection of expectations. /// [GuaranteesNotNull] - public static CollectionContainResult, IThat?>, TItem> + public static ProperCollectionMatchResult, IThat?>, TItem> Contains( this IThat?> source, IEnumerable>> expected, @@ -187,14 +190,15 @@ public static CountResult, IThat expected.ThrowIfNullOrEmpty(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CollectionContainResult, IThat?>, TItem>( + return new ProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToFromExpectationsConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), expected, matchOptions, failsForNullSubject: true)), source, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } /// @@ -280,7 +284,7 @@ public static CountResult, IThat /// Verifies that the collection does not contain the provided collection. /// [GuaranteesNotNull] - public static ObjectCollectionContainResult, IThat?>, TItem> + public static ObjectProperCollectionMatchResult, IThat?>, TItem> DoesNotContain( this IThat?> source, IEnumerable unexpected, @@ -290,7 +294,7 @@ public static CountResult, IThat ObjectEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionContainResult, IThat?>, TItem>( + return new ObjectProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint( expectationBuilder, it, grammars, @@ -298,14 +302,15 @@ public static CountResult, IThat options, matchOptions, failsForNullSubject: true).Invert()), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } /// /// Verifies that the collection does not contain the provided collection. /// [GuaranteesNotNull] - public static StringCollectionContainResult, IThat?>> + public static StringProperCollectionMatchResult, IThat?>> DoesNotContain( this IThat?> source, IEnumerable unexpected, @@ -315,7 +320,7 @@ public static CountResult, IThat StringEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new StringCollectionContainResult, IThat?>>( + return new StringProperCollectionMatchResult, IThat?>>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint( expectationBuilder, it, grammars, @@ -323,14 +328,15 @@ public static CountResult, IThat unexpected, options, matchOptions, failsForNullSubject: true).Invert()), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } /// /// Verifies that the collection does not contain the provided collection of predicates. /// [GuaranteesNotNull] - public static CollectionContainResult, IThat?>, TItem> + public static ProperCollectionMatchResult, IThat?>, TItem> DoesNotContain( this IThat?> source, IEnumerable>> unexpected, @@ -340,21 +346,22 @@ public static CountResult, IThat unexpected.ThrowIfNullOrEmpty(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CollectionContainResult, IThat?>, TItem>( + return new ProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToFromPredicateConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), unexpected, matchOptions, failsForNullSubject: true).Invert()), source, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } /// /// Verifies that the collection does not contain the provided collection of expectations. /// [GuaranteesNotNull] - public static CollectionContainResult, IThat?>, TItem> + public static ProperCollectionMatchResult, IThat?>, TItem> DoesNotContain( this IThat?> source, IEnumerable>> unexpected, @@ -364,14 +371,15 @@ public static CountResult, IThat unexpected.ThrowIfNullOrEmpty(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CollectionContainResult, IThat?>, TItem>( + return new ProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToFromExpectationsConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), unexpected, matchOptions, failsForNullSubject: true).Invert()), source, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } private sealed class ContainConstraint( diff --git a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Elements.cs b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Elements.cs index d34622a0aa..bff8eea925 100644 --- a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Elements.cs +++ b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Elements.cs @@ -1,6 +1,7 @@ #if NET8_0_OR_GREATER using System.Collections.Generic; using aweXpect.Core; +using aweXpect.Options; // ReSharper disable PossibleMultipleEnumeration diff --git a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Exactly.cs b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Exactly.cs index f4188bca87..18ac5e4f2a 100644 --- a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Exactly.cs +++ b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.Exactly.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; namespace aweXpect; diff --git a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.HasCount.cs b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.HasCount.cs index 2f81be3206..fd491911e6 100644 --- a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.HasCount.cs +++ b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.HasCount.cs @@ -3,6 +3,7 @@ using aweXpect.Core; using aweXpect.Core.Constraints; using aweXpect.Helpers; +using aweXpect.Options; using aweXpect.Results; namespace aweXpect; diff --git a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.IsContainedIn.cs b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.IsContainedIn.cs index f4e6e17d7d..185875ef7b 100644 --- a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.IsContainedIn.cs +++ b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.IsContainedIn.cs @@ -17,7 +17,7 @@ public static partial class ThatAsyncEnumerable /// Verifies that the collection is contained in the provided collection. /// [GuaranteesNotNull] - public static ObjectCollectionBeContainedInResult, IThat?>, TItem> + public static ObjectProperCollectionMatchResult, IThat?>, TItem> IsContainedIn( this IThat?> source, IEnumerable expected, @@ -28,7 +28,7 @@ public static partial class ThatAsyncEnumerable CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; return new - ObjectCollectionBeContainedInResult, IThat?>, TItem>( + ObjectProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), @@ -37,14 +37,15 @@ public static partial class ThatAsyncEnumerable matchOptions, failsForNullSubject: true)), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); } /// /// Verifies that the collection is contained in the provided collection. /// [GuaranteesNotNull] - public static StringCollectionBeContainedInResult, + public static StringProperCollectionMatchResult, IThat?>> IsContainedIn( this IThat?> source, @@ -55,7 +56,7 @@ public static partial class ThatAsyncEnumerable StringEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new StringCollectionBeContainedInResult, + return new StringProperCollectionMatchResult, IThat?>>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint(expectationBuilder, it, grammars, @@ -65,14 +66,15 @@ public static partial class ThatAsyncEnumerable matchOptions, failsForNullSubject: true)), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); } /// /// Verifies that the collection is contained in the provided collection of predicates. /// [GuaranteesNotNull] - public static CollectionBeContainedInResult, IThat?>, TItem> + public static ProperCollectionMatchResult, IThat?>, TItem> IsContainedIn( this IThat?> source, IEnumerable>> expected, @@ -82,21 +84,22 @@ public static partial class ThatAsyncEnumerable expected.ThrowIfNull(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CollectionBeContainedInResult, IThat?>, TItem>( + return new ProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToFromPredicateConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), expected, matchOptions, failsForNullSubject: true)), source, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); } /// /// Verifies that the collection is contained in the provided collection of expectations. /// [GuaranteesNotNull] - public static CollectionBeContainedInResult, IThat?>, TItem> + public static ProperCollectionMatchResult, IThat?>, TItem> IsContainedIn( this IThat?> source, IEnumerable>> expected, @@ -106,21 +109,22 @@ public static partial class ThatAsyncEnumerable expected.ThrowIfNull(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CollectionBeContainedInResult, IThat?>, TItem>( + return new ProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToFromExpectationsConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), expected, matchOptions, failsForNullSubject: true)), source, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); } /// /// Verifies that the collection is not contained in the provided collection. /// [GuaranteesNotNull] - public static ObjectCollectionBeContainedInResult, IThat?>, TItem> + public static ObjectProperCollectionMatchResult, IThat?>, TItem> IsNotContainedIn( this IThat?> source, IEnumerable unexpected, @@ -131,7 +135,7 @@ public static partial class ThatAsyncEnumerable CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; return new - ObjectCollectionBeContainedInResult, IThat?>, TItem>( + ObjectProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), @@ -140,14 +144,15 @@ public static partial class ThatAsyncEnumerable matchOptions, failsForNullSubject: true).Invert()), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); } /// /// Verifies that the collection is not contained in the provided collection. /// [GuaranteesNotNull] - public static StringCollectionBeContainedInResult, + public static StringProperCollectionMatchResult, IThat?>> IsNotContainedIn( this IThat?> source, @@ -158,7 +163,7 @@ public static partial class ThatAsyncEnumerable StringEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new StringCollectionBeContainedInResult, + return new StringProperCollectionMatchResult, IThat?>>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint(expectationBuilder, it, grammars, @@ -168,14 +173,15 @@ public static partial class ThatAsyncEnumerable matchOptions, failsForNullSubject: true).Invert()), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); } /// /// Verifies that the collection is not contained in the provided collection of predicates. /// [GuaranteesNotNull] - public static CollectionBeContainedInResult, IThat?>, TItem> + public static ProperCollectionMatchResult, IThat?>, TItem> IsNotContainedIn( this IThat?> source, IEnumerable>> unexpected, @@ -185,21 +191,22 @@ public static partial class ThatAsyncEnumerable unexpected.ThrowIfNull(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CollectionBeContainedInResult, IThat?>, TItem>( + return new ProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToFromPredicateConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), unexpected, matchOptions, failsForNullSubject: true).Invert()), source, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); } /// /// Verifies that the collection is not contained in the provided collection of expectations. /// [GuaranteesNotNull] - public static CollectionBeContainedInResult, IThat?>, TItem> + public static ProperCollectionMatchResult, IThat?>, TItem> IsNotContainedIn( this IThat?> source, IEnumerable>> unexpected, @@ -209,14 +216,15 @@ public static partial class ThatAsyncEnumerable unexpected.ThrowIfNull(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CollectionBeContainedInResult, IThat?>, TItem>( + return new ProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToFromExpectationsConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), unexpected, matchOptions, failsForNullSubject: true).Invert()), source, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); } } #endif diff --git a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.LessThan.cs b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.LessThan.cs index dbc89378e6..d4cf181761 100644 --- a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.LessThan.cs +++ b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.LessThan.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; namespace aweXpect; diff --git a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.MoreThan.cs b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.MoreThan.cs index bc25193921..78400ab5ee 100644 --- a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.MoreThan.cs +++ b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.MoreThan.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; namespace aweXpect; diff --git a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.None.cs b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.None.cs index a4d8b9e16e..8dfb55a59e 100644 --- a/Source/aweXpect/That/Collections/ThatAsyncEnumerable.None.cs +++ b/Source/aweXpect/That/Collections/ThatAsyncEnumerable.None.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; namespace aweXpect; diff --git a/Source/aweXpect/That/Collections/ThatDictionary.ContainsKey.cs b/Source/aweXpect/That/Collections/ThatDictionary.ContainsKey.cs index 0b05c4e04d..44b9cc7295 100644 --- a/Source/aweXpect/That/Collections/ThatDictionary.ContainsKey.cs +++ b/Source/aweXpect/That/Collections/ThatDictionary.ContainsKey.cs @@ -12,13 +12,13 @@ public static partial class ThatDictionary /// Verifies that the dictionary contains the key. /// [GuaranteesNotNull] - public static ContainsValueResult, IThat?>, TKey, TValue?> + public static ContainsKeyResult, IThat?>, TKey, TValue?> ContainsKey( this IThat?> source, TKey expected) { ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ContainsValueResult, IThat?>, TKey, TValue?>( + return new ContainsKeyResult, IThat?>, TKey, TValue?>( expectationBuilder.AddConstraint((it, grammars) => new ContainsKeyConstraint(expectationBuilder, it, grammars, expected)), source, @@ -31,14 +31,14 @@ public static partial class ThatDictionary /// Verifies that the dictionary contains the key. /// [GuaranteesNotNull] - public static ContainsValueResult, IThat?>, TKey, TValue?> + public static ContainsKeyResult, IThat?>, TKey, TValue?> ContainsKey( this IThat?> source, TKey expected) where TKey : notnull { ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ContainsValueResult, IThat?>, TKey, TValue?>( + return new ContainsKeyResult, IThat?>, TKey, TValue?>( expectationBuilder.AddConstraint((it, grammars) => new ContainsKeyConstraint(expectationBuilder, it, grammars, expected)), source, diff --git a/Source/aweXpect/That/Collections/ThatDictionary.ContainsKeys.cs b/Source/aweXpect/That/Collections/ThatDictionary.ContainsKeys.cs index fe55611a04..ed266033f3 100644 --- a/Source/aweXpect/That/Collections/ThatDictionary.ContainsKeys.cs +++ b/Source/aweXpect/That/Collections/ThatDictionary.ContainsKeys.cs @@ -13,14 +13,14 @@ public static partial class ThatDictionary /// Verifies that the dictionary contains all keys. /// [GuaranteesNotNull] - public static ContainsValuesResult, IThat?>, TKey, TValue?> + public static ContainsKeysResult, IThat?>, TKey, TValue?> ContainsKeys( this IThat?> source, params TKey[] expected) { expected.ThrowIfNullOrEmpty(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ContainsValuesResult, IThat?>, TKey, TValue?>( + return new ContainsKeysResult, IThat?>, TKey, TValue?>( expectationBuilder.AddConstraint((it, grammars) => new ContainKeysConstraint(expectationBuilder, it, grammars, expected)), source, @@ -34,7 +34,7 @@ public static partial class ThatDictionary /// Verifies that the dictionary contains all keys. /// [GuaranteesNotNull] - public static ContainsValuesResult, IThat?>, TKey, TValue?> + public static ContainsKeysResult, IThat?>, TKey, TValue?> ContainsKeys( this IThat?> source, params TKey[] expected) @@ -42,7 +42,7 @@ public static partial class ThatDictionary { expected.ThrowIfNullOrEmpty(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ContainsValuesResult, IThat?>, TKey, TValue?>( + return new ContainsKeysResult, IThat?>, TKey, TValue?>( expectationBuilder.AddConstraint((it, grammars) => new ContainKeysConstraint(expectationBuilder, it, grammars, expected)), source, diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.All.cs b/Source/aweXpect/That/Collections/ThatEnumerable.All.cs index 187d516ded..025915bb60 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.All.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.All.cs @@ -3,6 +3,7 @@ using System.Runtime.CompilerServices; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; #if NET8_0_OR_GREATER using System.Collections.Immutable; #endif diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.Any.cs b/Source/aweXpect/That/Collections/ThatEnumerable.Any.cs index 169d42a35f..e6e8052945 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.Any.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.Any.cs @@ -3,6 +3,7 @@ using System.Runtime.CompilerServices; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; #if NET8_0_OR_GREATER using System.Collections.Immutable; #endif diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.AtLeast.cs b/Source/aweXpect/That/Collections/ThatEnumerable.AtLeast.cs index 2965bdf171..585274584b 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.AtLeast.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.AtLeast.cs @@ -3,6 +3,7 @@ using System.Runtime.CompilerServices; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; #if NET8_0_OR_GREATER using System.Collections.Immutable; #endif diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.AtMost.cs b/Source/aweXpect/That/Collections/ThatEnumerable.AtMost.cs index b9051ac03d..1c5f855f28 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.AtMost.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.AtMost.cs @@ -3,6 +3,7 @@ using System.Runtime.CompilerServices; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; #if NET8_0_OR_GREATER using System.Collections.Immutable; #endif diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.Between.cs b/Source/aweXpect/That/Collections/ThatEnumerable.Between.cs index 2dd636b2b0..9d21bb53cf 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.Between.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.Between.cs @@ -3,6 +3,7 @@ using System.Runtime.CompilerServices; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; using aweXpect.Results; #if NET8_0_OR_GREATER using System.Collections.Immutable; diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.Contains.cs b/Source/aweXpect/That/Collections/ThatEnumerable.Contains.cs index 93af3f153e..1560dd1fb7 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.Contains.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.Contains.cs @@ -243,7 +243,7 @@ public static CountResult, IThat>> /// Verifies that the collection contains the provided collection. /// [GuaranteesNotNull] - public static ObjectCollectionContainResult, IThat?>, TItem> + public static ObjectProperCollectionMatchResult, IThat?>, TItem> Contains( this IThat?> source, IEnumerable expected, @@ -253,7 +253,7 @@ public static CountResult, IThat>> ObjectEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionContainResult, IThat?>, TItem>( + return new ObjectProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), @@ -261,14 +261,15 @@ public static CountResult, IThat>> options, matchOptions, failsForNullSubject: true)), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } /// /// Verifies that the collection contains the provided collection. /// [GuaranteesNotNull] - public static StringCollectionContainResult, IThat?>> + public static StringProperCollectionMatchResult, IThat?>> Contains(this IThat?> source, IEnumerable expected, [CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") @@ -277,21 +278,22 @@ public static CountResult, IThat>> StringEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new StringCollectionContainResult, IThat?>>( + return new StringProperCollectionMatchResult, IThat?>>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), expected, options, matchOptions, failsForNullSubject: true)), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } /// /// Verifies that the collection contains the provided collection. /// [GuaranteesNotNull] - public static StringCollectionContainResult> + public static StringProperCollectionMatchResult> Contains(this IThat source, IEnumerable expected, [CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") @@ -300,14 +302,15 @@ public static CountResult, IThat>> StringEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new StringCollectionContainResult>( + return new StringProperCollectionMatchResult>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), expected, options, matchOptions, failsForNullSubject: true)), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } /// @@ -315,7 +318,7 @@ public static CountResult, IThat>> /// [OverloadResolutionPriority(-1)] [GuaranteesNotNull] - public static ObjectCollectionContainResult, TItem> + public static ObjectProperCollectionMatchResult, TItem> Contains( this IThat source, IEnumerable expected, @@ -325,7 +328,7 @@ public static CountResult, IThat>> ObjectEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionContainResult, TItem>( + return new ObjectProperCollectionMatchResult, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), @@ -334,14 +337,15 @@ public static CountResult, IThat>> matchOptions, failsForNullSubject: true)), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } #if NET8_0_OR_GREATER /// /// Verifies that the collection contains the provided collection. /// - public static ObjectCollectionContainResult, IThat>, TItem> + public static ObjectProperCollectionMatchResult, IThat>, TItem> Contains( this IThat> source, IEnumerable expected, @@ -351,7 +355,7 @@ public static ObjectCollectionContainResult, IThat options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionContainResult, IThat>, TItem>( + return new ObjectProperCollectionMatchResult, IThat>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint, TItem, TItem>(expectationBuilder, it, grammars, @@ -361,7 +365,8 @@ public static ObjectCollectionContainResult, IThat, IThat /// Verifies that the collection contains the provided collection. /// - public static StringCollectionContainResult, IThat>> + public static StringProperCollectionMatchResult, IThat>> Contains(this IThat> source, IEnumerable expected, [CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") @@ -378,7 +383,7 @@ public static ObjectCollectionContainResult, IThat, IThat>>( + return new StringProperCollectionMatchResult, IThat>>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint, string?, string?>(expectationBuilder, it, grammars, @@ -388,7 +393,8 @@ public static ObjectCollectionContainResult, IThat, IThat collection of predicates. /// [GuaranteesNotNull] - public static CollectionContainResult, IThat?>, TItem> + public static ProperCollectionMatchResult, IThat?>, TItem> Contains( this IThat?> source, IEnumerable>> expected, @@ -405,21 +411,22 @@ public static ObjectCollectionContainResult, IThat, IThat?>, TItem>( + return new ProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToFromPredicateConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), expected, matchOptions, failsForNullSubject: true)), source, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } /// /// Verifies that the collection contains the provided collection of expectations. /// [GuaranteesNotNull] - public static CollectionContainResult, IThat?>, TItem> + public static ProperCollectionMatchResult, IThat?>, TItem> Contains( this IThat?> source, IEnumerable>> expected, @@ -428,14 +435,15 @@ public static ObjectCollectionContainResult, IThat, IThat?>, TItem>( + return new ProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToFromExpectationsConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), expected, matchOptions, failsForNullSubject: true)), source, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } /// @@ -655,7 +663,7 @@ public static CountResult, IThat>> /// Verifies that the collection does not contain the provided collection. /// [GuaranteesNotNull] - public static ObjectCollectionContainResult, IThat?>, TItem> + public static ObjectProperCollectionMatchResult, IThat?>, TItem> DoesNotContain( this IThat?> source, IEnumerable unexpected, @@ -666,7 +674,7 @@ public static CountResult, IThat>> ObjectEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionContainResult, IThat?>, TItem>( + return new ObjectProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), @@ -674,14 +682,15 @@ public static CountResult, IThat>> options, matchOptions, failsForNullSubject: true).Invert()), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } /// /// Verifies that the collection does not contain the provided collection. /// [GuaranteesNotNull] - public static StringCollectionContainResult, IThat?>> + public static StringProperCollectionMatchResult, IThat?>> DoesNotContain(this IThat?> source, IEnumerable unexpected, [CallerArgumentExpression("unexpected")] @@ -691,21 +700,22 @@ public static CountResult, IThat>> StringEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new StringCollectionContainResult, IThat?>>( + return new StringProperCollectionMatchResult, IThat?>>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), unexpected, options, matchOptions, failsForNullSubject: true).Invert()), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } /// /// Verifies that the collection does not contain the provided collection. /// [GuaranteesNotNull] - public static StringCollectionContainResult> + public static StringProperCollectionMatchResult> DoesNotContain(this IThat source, IEnumerable unexpected, [CallerArgumentExpression("unexpected")] @@ -715,14 +725,15 @@ public static CountResult, IThat>> StringEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new StringCollectionContainResult>( + return new StringProperCollectionMatchResult>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), unexpected, options, matchOptions, failsForNullSubject: true).Invert()), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } /// @@ -730,7 +741,7 @@ public static CountResult, IThat>> /// [OverloadResolutionPriority(-1)] [GuaranteesNotNull] - public static ObjectCollectionContainResult, TItem> + public static ObjectProperCollectionMatchResult, TItem> DoesNotContain( this IThat source, IEnumerable unexpected, @@ -741,7 +752,7 @@ public static CountResult, IThat>> ObjectEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionContainResult, TItem>( + return new ObjectProperCollectionMatchResult, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), @@ -750,14 +761,15 @@ public static CountResult, IThat>> matchOptions, failsForNullSubject: true).Invert()), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } #if NET8_0_OR_GREATER /// /// Verifies that the collection does not contain the provided collection. /// - public static ObjectCollectionContainResult, IThat>, TItem> + public static ObjectProperCollectionMatchResult, IThat>, TItem> DoesNotContain( this IThat> source, IEnumerable unexpected, @@ -768,7 +780,7 @@ public static ObjectCollectionContainResult, IThat options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionContainResult, IThat>, TItem>( + return new ObjectProperCollectionMatchResult, IThat>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint, TItem, TItem>(expectationBuilder, it, grammars, @@ -778,7 +790,8 @@ public static ObjectCollectionContainResult, IThat, IThat /// Verifies that the collection does not contain the provided collection. /// - public static StringCollectionContainResult, IThat>> + public static StringProperCollectionMatchResult, IThat>> DoesNotContain(this IThat> source, IEnumerable unexpected, [CallerArgumentExpression("unexpected")] @@ -796,7 +809,7 @@ public static ObjectCollectionContainResult, IThat, IThat>>( + return new StringProperCollectionMatchResult, IThat>>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint, string?, string?>(expectationBuilder, it, grammars, @@ -806,7 +819,8 @@ public static ObjectCollectionContainResult, IThat, IThat collection of predicates. /// [GuaranteesNotNull] - public static CollectionContainResult, IThat?>, TItem> + public static ProperCollectionMatchResult, IThat?>, TItem> DoesNotContain( this IThat?> source, IEnumerable>> unexpected, @@ -824,21 +838,22 @@ public static ObjectCollectionContainResult, IThat, IThat?>, TItem>( + return new ProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToFromPredicateConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), unexpected, matchOptions, failsForNullSubject: true).Invert()), source, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } /// /// Verifies that the collection does not contain the provided collection of expectations. /// [GuaranteesNotNull] - public static CollectionContainResult, IThat?>, TItem> + public static ProperCollectionMatchResult, IThat?>, TItem> DoesNotContain( this IThat?> source, IEnumerable>> unexpected, @@ -848,14 +863,15 @@ public static ObjectCollectionContainResult, IThat, IThat?>, TItem>( + return new ProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToFromExpectationsConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), unexpected, matchOptions, failsForNullSubject: true).Invert()), source, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.ContainsProperly); } private sealed class ContainConstraint( diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.Elements.cs b/Source/aweXpect/That/Collections/ThatEnumerable.Elements.cs index 815642e784..25e259c5e4 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.Elements.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.Elements.cs @@ -1,6 +1,7 @@ using System.Collections; using System.Collections.Generic; using aweXpect.Core; +using aweXpect.Options; // ReSharper disable PossibleMultipleEnumeration diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.Exactly.cs b/Source/aweXpect/That/Collections/ThatEnumerable.Exactly.cs index 7550574dc3..2aa9928b55 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.Exactly.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.Exactly.cs @@ -3,6 +3,7 @@ using System.Runtime.CompilerServices; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; #if NET8_0_OR_GREATER using System.Collections.Immutable; #endif diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.HasCount.cs b/Source/aweXpect/That/Collections/ThatEnumerable.HasCount.cs index f435855fd5..13842d539b 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.HasCount.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.HasCount.cs @@ -4,6 +4,7 @@ using aweXpect.Core; using aweXpect.Core.Constraints; using aweXpect.Helpers; +using aweXpect.Options; using aweXpect.Results; #if NET8_0_OR_GREATER using System.Collections.Immutable; diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.IsContainedIn.cs b/Source/aweXpect/That/Collections/ThatEnumerable.IsContainedIn.cs index ab81742f0e..aed9beb7df 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.IsContainedIn.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.IsContainedIn.cs @@ -20,7 +20,7 @@ public static partial class ThatEnumerable /// Verifies that the collection is contained in the provided collection. /// [GuaranteesNotNull] - public static ObjectCollectionBeContainedInResult, IThat?>, TItem> + public static ObjectProperCollectionMatchResult, IThat?>, TItem> IsContainedIn( this IThat?> source, IEnumerable expected, @@ -30,7 +30,7 @@ public static partial class ThatEnumerable ObjectEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionBeContainedInResult, IThat?>, TItem>( + return new ObjectProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), @@ -39,14 +39,15 @@ public static partial class ThatEnumerable matchOptions, failsForNullSubject: true)), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); } /// /// Verifies that the collection is contained in the provided collection. /// [GuaranteesNotNull] - public static StringCollectionBeContainedInResult, IThat?>> + public static StringProperCollectionMatchResult, IThat?>> IsContainedIn(this IThat?> source, IEnumerable expected, [CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") @@ -55,7 +56,7 @@ public static partial class ThatEnumerable StringEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new StringCollectionBeContainedInResult, IThat?>>( + return new StringProperCollectionMatchResult, IThat?>>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), @@ -64,7 +65,8 @@ public static partial class ThatEnumerable matchOptions, failsForNullSubject: true)), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); } /// @@ -72,7 +74,7 @@ public static partial class ThatEnumerable /// [OverloadResolutionPriority(-1)] [GuaranteesNotNull] - public static ObjectCollectionBeContainedInResult, TItem> + public static ObjectProperCollectionMatchResult, TItem> IsContainedIn( this IThat source, IEnumerable expected, @@ -82,7 +84,7 @@ public static partial class ThatEnumerable ObjectEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionBeContainedInResult, TItem>( + return new ObjectProperCollectionMatchResult, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), @@ -91,14 +93,15 @@ public static partial class ThatEnumerable matchOptions, failsForNullSubject: true)), source, options, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); } #if NET8_0_OR_GREATER /// /// Verifies that the collection is contained in the provided collection. /// - public static ObjectCollectionBeContainedInResult, IThat>, TItem> + public static ObjectProperCollectionMatchResult, IThat>, TItem> IsContainedIn( this IThat> source, IEnumerable expected, @@ -108,7 +111,7 @@ public static ObjectCollectionBeContainedInResult, IThat options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionBeContainedInResult, IThat>, TItem>( + return new ObjectProperCollectionMatchResult, IThat>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint, TItem, TItem>(expectationBuilder, it, grammars, @@ -118,7 +121,8 @@ public static ObjectCollectionBeContainedInResult, IThat, IThat /// Verifies that the collection is contained in the provided collection. /// - public static StringCollectionBeContainedInResult, IThat>> + public static StringProperCollectionMatchResult, IThat>> IsContainedIn(this IThat> source, IEnumerable expected, [CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") @@ -135,7 +139,7 @@ public static ObjectCollectionBeContainedInResult, IThat, IThat>>( + return new StringProperCollectionMatchResult, IThat>>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint, string?, string?>(expectationBuilder, it, grammars, @@ -145,7 +149,8 @@ public static ObjectCollectionBeContainedInResult, IThat, IThat collection of predicates. /// [GuaranteesNotNull] - public static CollectionBeContainedInResult, IThat?>, TItem> + public static ProperCollectionMatchResult, IThat?>, TItem> IsContainedIn( this IThat?> source, IEnumerable>> expected, @@ -162,21 +167,22 @@ public static ObjectCollectionBeContainedInResult, IThat, IThat?>, TItem>( + return new ProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToFromPredicateConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), expected, matchOptions, failsForNullSubject: true)), source, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); } /// /// Verifies that the collection is contained in the provided collection of expectations. /// [GuaranteesNotNull] - public static CollectionBeContainedInResult, IThat?>, TItem> + public static ProperCollectionMatchResult, IThat?>, TItem> IsContainedIn( this IThat?> source, IEnumerable>> expected, @@ -185,21 +191,22 @@ public static ObjectCollectionBeContainedInResult, IThat, IThat?>, TItem>( + return new ProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToFromExpectationsConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), expected, matchOptions, failsForNullSubject: true)), source, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); } /// /// Verifies that the collection is not contained in the provided collection. /// [GuaranteesNotNull] - public static ObjectCollectionBeContainedInResult, IThat?>, TItem> + public static ObjectProperCollectionMatchResult, IThat?>, TItem> IsNotContainedIn( this IThat?> source, IEnumerable unexpected, @@ -210,7 +217,7 @@ public static ObjectCollectionBeContainedInResult, IThat options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionBeContainedInResult, IThat?>, TItem>( + return new ObjectProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), @@ -219,14 +226,15 @@ public static ObjectCollectionBeContainedInResult, IThat /// Verifies that the collection is not contained in the provided collection. /// [GuaranteesNotNull] - public static StringCollectionBeContainedInResult, IThat?>> + public static StringProperCollectionMatchResult, IThat?>> IsNotContainedIn(this IThat?> source, IEnumerable unexpected, [CallerArgumentExpression("unexpected")] @@ -236,7 +244,7 @@ public static ObjectCollectionBeContainedInResult, IThat, IThat?>>( + return new StringProperCollectionMatchResult, IThat?>>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), @@ -245,7 +253,8 @@ public static ObjectCollectionBeContainedInResult, IThat @@ -253,7 +262,7 @@ public static ObjectCollectionBeContainedInResult, IThat [OverloadResolutionPriority(-1)] [GuaranteesNotNull] - public static ObjectCollectionBeContainedInResult, TItem> + public static ObjectProperCollectionMatchResult, TItem> IsNotContainedIn( this IThat source, IEnumerable unexpected, @@ -264,7 +273,7 @@ public static ObjectCollectionBeContainedInResult, IThat options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionBeContainedInResult, TItem>( + return new ObjectProperCollectionMatchResult, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), @@ -273,14 +282,15 @@ public static ObjectCollectionBeContainedInResult, IThat /// Verifies that the collection is not contained in the provided collection. /// - public static ObjectCollectionBeContainedInResult, IThat>, TItem> + public static ObjectProperCollectionMatchResult, IThat>, TItem> IsNotContainedIn( this IThat> source, IEnumerable unexpected, @@ -291,7 +301,7 @@ public static ObjectCollectionBeContainedInResult, IThat options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionBeContainedInResult, IThat>, TItem>( + return new ObjectProperCollectionMatchResult, IThat>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint, TItem, TItem>(expectationBuilder, it, grammars, @@ -301,7 +311,8 @@ public static ObjectCollectionBeContainedInResult, IThat, IThat /// Verifies that the collection is not contained in the provided collection. /// - public static StringCollectionBeContainedInResult, IThat>> + public static StringProperCollectionMatchResult, IThat>> IsNotContainedIn(this IThat> source, IEnumerable unexpected, [CallerArgumentExpression("unexpected")] @@ -319,7 +330,7 @@ public static ObjectCollectionBeContainedInResult, IThat, IThat>>( + return new StringProperCollectionMatchResult, IThat>>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint, string?, string?>(expectationBuilder, it, grammars, @@ -329,7 +340,8 @@ public static ObjectCollectionBeContainedInResult, IThat, IThat collection of predicates. /// [GuaranteesNotNull] - public static CollectionBeContainedInResult, IThat?>, TItem> + public static ProperCollectionMatchResult, IThat?>, TItem> IsNotContainedIn( this IThat?> source, IEnumerable>> expected, @@ -346,21 +358,22 @@ public static ObjectCollectionBeContainedInResult, IThat, IThat?>, TItem>( + return new ProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToFromPredicateConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), expected, matchOptions, failsForNullSubject: true).Invert()), source, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); } /// /// Verifies that the collection is not contained in the provided collection of expectations. /// [GuaranteesNotNull] - public static CollectionBeContainedInResult, IThat?>, TItem> + public static ProperCollectionMatchResult, IThat?>, TItem> IsNotContainedIn( this IThat?> source, IEnumerable>> expected, @@ -369,13 +382,14 @@ public static ObjectCollectionBeContainedInResult, IThat, IThat?>, TItem>( + return new ProperCollectionMatchResult, IThat?>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToFromExpectationsConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), expected, matchOptions, failsForNullSubject: true).Invert()), source, - matchOptions); + matchOptions, + CollectionMatchOptions.EquivalenceRelations.IsContainedInProperly); } } diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.IsEqualTo.cs b/Source/aweXpect/That/Collections/ThatEnumerable.IsEqualTo.cs index 7e35e21af9..039ef2cfd5 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.IsEqualTo.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.IsEqualTo.cs @@ -417,7 +417,7 @@ public static partial class ThatEnumerable /// /// Verifies that the collection matches the collection. /// - public static ObjectCollectionBeContainedInResult, IThat>, TItem> + public static ObjectCollectionMatchResult, IThat>, TItem> IsEqualTo( this IThat> source, IEnumerable expected, @@ -426,7 +426,7 @@ public static ObjectCollectionBeContainedInResult, IThat options = new(); CollectionMatchOptions matchOptions = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionBeContainedInResult, IThat>, TItem>( + return new ObjectCollectionMatchResult, IThat>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint, TItem, TItem>(expectationBuilder, it, grammars, @@ -444,7 +444,7 @@ public static ObjectCollectionBeContainedInResult, IThat /// Verifies that the collection matches the collection. /// - public static StringCollectionBeContainedInResult, IThat>> + public static StringCollectionMatchResult, IThat>> IsEqualTo(this IThat> source, IEnumerable expected, [CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") @@ -452,7 +452,7 @@ public static ObjectCollectionBeContainedInResult, IThat, IThat>>( + return new StringCollectionMatchResult, IThat>>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint, string?, string?>(expectationBuilder, it, grammars, @@ -923,7 +923,7 @@ public static ObjectCollectionBeContainedInResult, IThat /// Verifies that the collection does not match the collection. /// - public static ObjectCollectionBeContainedInResult, IThat>, TItem> + public static ObjectCollectionMatchResult, IThat>, TItem> IsNotEqualTo( this IThat> source, IEnumerable unexpected, @@ -933,7 +933,7 @@ public static ObjectCollectionBeContainedInResult, IThat options = new(); CollectionMatchOptions matchOptions = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionBeContainedInResult, IThat>, TItem>( + return new ObjectCollectionMatchResult, IThat>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint, TItem, TItem>(expectationBuilder, it, grammars, @@ -951,7 +951,7 @@ public static ObjectCollectionBeContainedInResult, IThat /// Verifies that the collection does not match the collection. /// - public static StringCollectionBeContainedInResult, IThat>> + public static StringCollectionMatchResult, IThat>> IsNotEqualTo(this IThat> source, IEnumerable unexpected, [CallerArgumentExpression("unexpected")] @@ -960,7 +960,7 @@ public static ObjectCollectionBeContainedInResult, IThat, IThat>>( + return new StringCollectionMatchResult, IThat>>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint, string?, string?>(expectationBuilder, it, grammars, diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.LessThan.cs b/Source/aweXpect/That/Collections/ThatEnumerable.LessThan.cs index 4f855e3c00..d800d4fc72 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.LessThan.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.LessThan.cs @@ -3,6 +3,7 @@ using System.Runtime.CompilerServices; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; #if NET8_0_OR_GREATER using System.Collections.Immutable; #endif diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.MoreThan.cs b/Source/aweXpect/That/Collections/ThatEnumerable.MoreThan.cs index 10e06c92d1..c885f63ba9 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.MoreThan.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.MoreThan.cs @@ -3,6 +3,7 @@ using System.Runtime.CompilerServices; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; #if NET8_0_OR_GREATER using System.Collections.Immutable; #endif diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.None.cs b/Source/aweXpect/That/Collections/ThatEnumerable.None.cs index ecec6312d2..fa03ccb122 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.None.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.None.cs @@ -3,6 +3,7 @@ using System.Runtime.CompilerServices; using aweXpect.Core; using aweXpect.Helpers; +using aweXpect.Options; #if NET8_0_OR_GREATER using System.Collections.Immutable; #endif diff --git a/Source/aweXpect/That/Collections/ThatReadOnlyDictionary.ContainsKey.cs b/Source/aweXpect/That/Collections/ThatReadOnlyDictionary.ContainsKey.cs index b241cd1c97..3e8b7331c9 100644 --- a/Source/aweXpect/That/Collections/ThatReadOnlyDictionary.ContainsKey.cs +++ b/Source/aweXpect/That/Collections/ThatReadOnlyDictionary.ContainsKey.cs @@ -13,14 +13,14 @@ public static partial class ThatReadOnlyDictionary /// Verifies that the dictionary contains the key. /// [GuaranteesNotNull] - public static ContainsValueResult, IThat?>, TKey + public static ContainsKeyResult, IThat?>, TKey , TValue?> ContainsKey( this IThat?> source, TKey expected) { ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ContainsValueResult, IThat?>, + return new ContainsKeyResult, IThat?>, TKey, TValue?>( expectationBuilder.AddConstraint((it, grammars) => new ContainsKeyConstraint(expectationBuilder, it, grammars, expected)), @@ -34,7 +34,7 @@ public static partial class ThatReadOnlyDictionary /// Verifies that the dictionary contains the key. /// [GuaranteesNotNull] - public static ContainsValueResult, IThat?>, TKey, + public static ContainsKeyResult, IThat?>, TKey, TValue?> ContainsKey( this IThat?> source, @@ -42,7 +42,7 @@ public static partial class ThatReadOnlyDictionary where TKey : notnull { ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ContainsValueResult, IThat?>, TKey, + return new ContainsKeyResult, IThat?>, TKey, TValue?>( expectationBuilder.AddConstraint((it, grammars) => new ContainsKeyConstraint(expectationBuilder, it, grammars, expected)), diff --git a/Source/aweXpect/That/Collections/ThatReadOnlyDictionary.ContainsKeys.cs b/Source/aweXpect/That/Collections/ThatReadOnlyDictionary.ContainsKeys.cs index b9b3a0024e..c194d9a962 100644 --- a/Source/aweXpect/That/Collections/ThatReadOnlyDictionary.ContainsKeys.cs +++ b/Source/aweXpect/That/Collections/ThatReadOnlyDictionary.ContainsKeys.cs @@ -14,7 +14,7 @@ public static partial class ThatReadOnlyDictionary /// Verifies that the dictionary contains all keys. /// [GuaranteesNotNull] - public static ContainsValuesResult, IThat?>, + public static ContainsKeysResult, IThat?>, TKey, TValue?> ContainsKeys( this IThat?> source, @@ -22,7 +22,7 @@ public static partial class ThatReadOnlyDictionary { expected.ThrowIfNullOrEmpty(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ContainsValuesResult, IThat?>, + return new ContainsKeysResult, IThat?>, TKey, TValue?>( expectationBuilder.AddConstraint((it, grammars) => new ContainKeysConstraint(expectationBuilder, it, grammars, expected)), @@ -37,7 +37,7 @@ public static partial class ThatReadOnlyDictionary /// Verifies that the dictionary contains all keys. /// [GuaranteesNotNull] - public static ContainsValuesResult, IThat?>, TKey, + public static ContainsKeysResult, IThat?>, TKey, TValue?> ContainsKeys( this IThat?> source, @@ -46,7 +46,7 @@ public static partial class ThatReadOnlyDictionary { expected.ThrowIfNullOrEmpty(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ContainsValuesResult, IThat?>, TKey + return new ContainsKeysResult, IThat?>, TKey , TValue?>( expectationBuilder.AddConstraint((it, grammars) => new ContainKeysConstraint(expectationBuilder, it, grammars, expected)), diff --git a/Tests/aweXpect.Api.Tests/Expected/aweXpect_net10.0.txt b/Tests/aweXpect.Api.Tests/Expected/aweXpect_net10.0.txt index 19439170d2..cbd1b31d4b 100644 --- a/Tests/aweXpect.Api.Tests/Expected/aweXpect_net10.0.txt +++ b/Tests/aweXpect.Api.Tests/Expected/aweXpect_net10.0.txt @@ -1,42 +1,32 @@ [assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/Testably/aweXpect.git")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"aweXpect.Internal.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010091e3b299f2a31c904fbc5c2150944568b101ba409f5ee4cd95561c0c8cf50c1960d74f682c7f462f792ab37fe315ece00775c5bdda68c06d3abb67c1d531bf8c40d85d3d36ecf19fb05cc890ca7a5f39904e04ff754a55463236c5884f41083fae1ea626eb1f9b8c5c33f7bada7e650bed6ced9f0a75413d7e919f94f804efc9")] [assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v10.0", FrameworkDisplayName=".NET 10.0")] -namespace aweXpect +namespace aweXpect.Equivalency { - public class CollectionCountResult - { - public CollectionCountResult(System.Func factory) { } - public TReturn AtLeast(int minimum) { } - public TReturn AtMost(int maximum) { } - public aweXpect.Results.BetweenResult Between(int minimum) { } - public TReturn EqualTo(int expected) { } - public TReturn LessThan(int maximum) { } - public TReturn MoreThan(int minimum) { } - } - public abstract class EnumerableQuantifier + public static class EquivalencyOptionsExtensions { - protected EnumerableQuantifier() { } - public abstract void AppendResult(System.Text.StringBuilder stringBuilder, aweXpect.Core.ExpectationGrammars grammars, int matchingCount, int notMatchingCount, int? totalCount, string? verb = null); - public abstract aweXpect.Core.Constraints.Outcome GetOutcome(int matchingCount, int notMatchingCount, int? totalCount); - public virtual aweXpect.EnumerableQuantifier.QuantifierContexts GetQuantifierContext() { } - public abstract bool IsDeterminable(int matchingCount, int notMatchingCount); - public abstract bool IsSingle(); - public static aweXpect.EnumerableQuantifier All(aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier AtLeast(int minimum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier AtMost(int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier Between(int minimum, int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier Exactly(int expected, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier LessThan(int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier MoreThan(int minimum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier None(aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - [System.Flags] - public enum QuantifierContexts - { - MatchingItems = 2, - NotMatchingItems = 4, - None = 0, - } + public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IgnoringCollectionOrder(this TEquivalencyOptions @this, bool ignoreCollectionOrder = true) + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IgnoringFields(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IgnoringMember(this TEquivalencyOptions @this, string memberToIgnore) + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IgnoringProperties(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IncludingFields(this TEquivalencyOptions @this, aweXpect.Equivalency.IncludeMembers fieldsToInclude = 2) + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IncludingProperties(this TEquivalencyOptions @this, aweXpect.Equivalency.IncludeMembers propertiesToInclude = 2) + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } } +} +namespace aweXpect +{ public static class EquivalencyExtensions { public static TSelf Equivalent(this aweXpect.Results.ObjectHasItemResult result, System.Func? options = null) @@ -89,29 +79,29 @@ namespace aweXpect [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.StringEqualityTypeCountResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, string? expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionContainResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.ObjectCountResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, TItem expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionContainResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CountResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.StringEqualityTypeCountResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, string? unexpected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionContainResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.ObjectCountResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, TItem unexpected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionContainResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CountResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] @@ -145,7 +135,7 @@ namespace aweXpect [aweXpect.Core.GuaranteesNotNull] public static aweXpect.ThatAsyncEnumerable.Elements Exactly(this aweXpect.Core.IThat?> subject, int expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.CollectionCountResult, aweXpect.Core.IThat?>>> HasCount(this aweXpect.Core.IThat?> subject) { } + public static aweXpect.Results.CollectionCountResult, aweXpect.Core.IThat?>>> HasCount(this aweXpect.Core.IThat?> subject) { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> HasCount(this aweXpect.Core.IThat?> subject, int expected) { } [aweXpect.Core.GuaranteesNotNull] @@ -161,13 +151,13 @@ namespace aweXpect [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.SingleItemResult, TItem>.Async HasSingle(this aweXpect.Core.IThat?> source) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat?>> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> IsEmpty(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.ObjectCollectionMatchWithToleranceResult, aweXpect.Core.IThat?>, System.DateTime, System.TimeSpan> IsEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } @@ -191,13 +181,13 @@ namespace aweXpect [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsInDescendingOrder(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat?>> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> IsNotEmpty(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.ObjectCollectionMatchWithToleranceResult, aweXpect.Core.IThat?>, System.DateTime, System.TimeSpan> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } @@ -258,12 +248,12 @@ namespace aweXpect } public interface IElements { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat?> Subject { get; } } public interface IElements { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat?> Subject { get; } } } @@ -432,15 +422,15 @@ namespace aweXpect [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TMember> AreAllUnique(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValueResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) + public static aweXpect.Results.ContainsKeyResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) where TKey : notnull { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValueResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) { } + public static aweXpect.Results.ContainsKeyResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValuesResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) + public static aweXpect.Results.ContainsKeysResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) where TKey : notnull { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValuesResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) { } + public static aweXpect.Results.ContainsKeysResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> ContainsValue(this aweXpect.Core.IThat?> source, TValue expected) where TKey : notnull { } @@ -582,26 +572,26 @@ namespace aweXpect public static aweXpect.Results.ObjectCountResult, object?> Contains(this aweXpect.Core.IThat source, object? expected) { } public static aweXpect.Results.StringEqualityTypeCountResult, aweXpect.Core.IThat>> Contains(this aweXpect.Core.IThat> source, string? expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionContainResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CountResult> Contains(this aweXpect.Core.IThat source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.StringCollectionContainResult, aweXpect.Core.IThat>> Contains(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat>> Contains(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionContainResult> Contains(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult> Contains(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.ObjectCountResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, TItem expected) { } public static aweXpect.Results.ObjectCountResult, aweXpect.Core.IThat>, TItem> Contains(this aweXpect.Core.IThat> source, TItem expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionContainResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CountResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionContainResult, TItem> Contains(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectCollectionContainResult, aweXpect.Core.IThat>, TItem> Contains(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, TItem> Contains(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat>, TItem> Contains(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CountResult, aweXpect.Core.IThat>> Contains(this aweXpect.Core.IThat> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.StringEqualityTypeCountResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, string? unexpected) { } @@ -609,26 +599,26 @@ namespace aweXpect public static aweXpect.Results.ObjectCountResult, object?> DoesNotContain(this aweXpect.Core.IThat source, object? unexpected) { } public static aweXpect.Results.StringEqualityTypeCountResult, aweXpect.Core.IThat>> DoesNotContain(this aweXpect.Core.IThat> source, string? unexpected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionContainResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CountResult> DoesNotContain(this aweXpect.Core.IThat source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.StringCollectionContainResult, aweXpect.Core.IThat>> DoesNotContain(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat>> DoesNotContain(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionContainResult> DoesNotContain(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult> DoesNotContain(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.ObjectCountResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, TItem unexpected) { } public static aweXpect.Results.ObjectCountResult, aweXpect.Core.IThat>, TItem> DoesNotContain(this aweXpect.Core.IThat> source, TItem unexpected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionContainResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CountResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionContainResult, TItem> DoesNotContain(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectCollectionContainResult, aweXpect.Core.IThat>, TItem> DoesNotContain(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, TItem> DoesNotContain(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat>, TItem> DoesNotContain(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CountResult, aweXpect.Core.IThat>> DoesNotContain(this aweXpect.Core.IThat> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> DoesNotEndWith(this aweXpect.Core.IThat?> source, params string[] unexpected) { } @@ -694,14 +684,14 @@ namespace aweXpect public static aweXpect.ThatEnumerable.Elements Exactly(this aweXpect.Core.IThat?> subject, int expected) { } public static aweXpect.ThatEnumerable.ElementsForStructEnumerable, TItem> Exactly(this aweXpect.Core.IThat> subject, int expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) { } + public static aweXpect.Results.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult> HasCount(this aweXpect.Core.IThat subject, int expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.CollectionCountResult, aweXpect.Core.IThat?>>> HasCount(this aweXpect.Core.IThat?> subject) { } - public static aweXpect.CollectionCountResult, aweXpect.Core.IThat>>> HasCount(this aweXpect.Core.IThat> subject) { } + public static aweXpect.Results.CollectionCountResult, aweXpect.Core.IThat?>>> HasCount(this aweXpect.Core.IThat?> subject) { } + public static aweXpect.Results.CollectionCountResult, aweXpect.Core.IThat>>> HasCount(this aweXpect.Core.IThat> subject) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) { } + public static aweXpect.Results.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> HasCount(this aweXpect.Core.IThat?> subject, int expected) { } public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat>> HasCount(this aweXpect.Core.IThat> subject, int expected) { } @@ -734,17 +724,17 @@ namespace aweXpect public static aweXpect.Results.SingleItemResult, TItem> HasSingle(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.SingleItemResult, TItem> HasSingle(this aweXpect.Core.IThat> source) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat?>> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat>> IsContainedIn(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat>> IsContainedIn(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionBeContainedInResult, TItem> IsContainedIn(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat>, TItem> IsContainedIn(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, TItem> IsContainedIn(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat>, TItem> IsContainedIn(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> IsEmpty(this aweXpect.Core.IThat?> source) { } [aweXpect.Core.GuaranteesNotNull] @@ -763,12 +753,12 @@ namespace aweXpect public static aweXpect.Results.ObjectCollectionMatchWithToleranceResult, aweXpect.Core.IThat?>, float?, float> IsEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectCollectionMatchWithToleranceResult, aweXpect.Core.IThat?>, float?, float> IsEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.StringCollectionMatchResult, aweXpect.Core.IThat?>> IsEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat>> IsEqualTo(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringCollectionMatchResult, aweXpect.Core.IThat>> IsEqualTo(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectCollectionMatchResult, TItem> IsEqualTo(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat>, TItem> IsEqualTo(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectCollectionMatchResult, aweXpect.Core.IThat>, TItem> IsEqualTo(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CollectionOrderResult> IsInAscendingOrder(this aweXpect.Core.IThat source) { } [aweXpect.Core.GuaranteesNotNull] @@ -790,17 +780,17 @@ namespace aweXpect public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsInDescendingOrder(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat>> IsInDescendingOrder(this aweXpect.Core.IThat> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat?>> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat>> IsNotContainedIn(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat>> IsNotContainedIn(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionBeContainedInResult, TItem> IsNotContainedIn(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat>, TItem> IsNotContainedIn(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, TItem> IsNotContainedIn(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat>, TItem> IsNotContainedIn(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> IsNotEmpty(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.ObjectCollectionMatchWithToleranceResult, aweXpect.Core.IThat?>, System.DateTime, System.TimeSpan> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } @@ -816,12 +806,12 @@ namespace aweXpect public static aweXpect.Results.ObjectCollectionMatchWithToleranceResult, aweXpect.Core.IThat?>, float?, float> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectCollectionMatchWithToleranceResult, aweXpect.Core.IThat?>, float?, float> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.StringCollectionMatchResult, aweXpect.Core.IThat?>> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat>> IsNotEqualTo(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringCollectionMatchResult, aweXpect.Core.IThat>> IsNotEqualTo(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectCollectionMatchResult, TItem> IsNotEqualTo(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat>, TItem> IsNotEqualTo(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectCollectionMatchResult, aweXpect.Core.IThat>, TItem> IsNotEqualTo(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CollectionOrderResult> IsNotInAscendingOrder(this aweXpect.Core.IThat source) { } [aweXpect.Core.GuaranteesNotNull] @@ -929,30 +919,30 @@ namespace aweXpect } public interface IElements { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat?> Subject { get; } } public interface IElements { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat?> Subject { get; } } public interface IElementsForEnumerable where out TEnumerable : System.Collections.IEnumerable? { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat Subject { get; } } public interface IElementsForStructEnumerable where out TEnumerable : struct, System.Collections.Generic.IEnumerable { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat Subject { get; } } public interface IElementsForStructEnumerable where out TEnumerable : struct, System.Collections.Generic.IEnumerable { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat Subject { get; } } } @@ -1513,14 +1503,14 @@ namespace aweXpect public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TMember> AreAllUnique(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") where TKey : notnull { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValueResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) { } + public static aweXpect.Results.ContainsKeyResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValueResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) + public static aweXpect.Results.ContainsKeyResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) where TKey : notnull { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValuesResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) { } + public static aweXpect.Results.ContainsKeysResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValuesResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) + public static aweXpect.Results.ContainsKeysResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) where TKey : notnull { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> ContainsValue(this aweXpect.Core.IThat?> source, TValue expected) { } @@ -1750,32 +1740,32 @@ namespace aweXpect public static aweXpect.Results.AndOrResult> IsNotLessThanOrEqualTo(this aweXpect.Core.IThat source, System.Version? unexpected) { } } } -namespace aweXpect.Equivalency +namespace aweXpect.Options { - public static class EquivalencyOptionsExtensions + public abstract class EnumerableQuantifier { - public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IgnoringCollectionOrder(this TEquivalencyOptions @this, bool ignoreCollectionOrder = true) - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IgnoringFields(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IgnoringMember(this TEquivalencyOptions @this, string memberToIgnore) - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IgnoringProperties(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IncludingFields(this TEquivalencyOptions @this, aweXpect.Equivalency.IncludeMembers fieldsToInclude = 2) - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IncludingProperties(this TEquivalencyOptions @this, aweXpect.Equivalency.IncludeMembers propertiesToInclude = 2) - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + protected EnumerableQuantifier() { } + public abstract void AppendResult(System.Text.StringBuilder stringBuilder, aweXpect.Core.ExpectationGrammars grammars, int matchingCount, int notMatchingCount, int? totalCount, string? verb = null); + public abstract aweXpect.Core.Constraints.Outcome GetOutcome(int matchingCount, int notMatchingCount, int? totalCount); + public virtual aweXpect.Options.EnumerableQuantifier.QuantifierContexts GetQuantifierContext() { } + public abstract bool IsDeterminable(int matchingCount, int notMatchingCount); + public abstract bool IsSingle(); + public static aweXpect.Options.EnumerableQuantifier All(aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier AtLeast(int minimum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier AtMost(int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier Between(int minimum, int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier Exactly(int expected, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier LessThan(int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier MoreThan(int minimum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier None(aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + [System.Flags] + public enum QuantifierContexts + { + MatchingItems = 2, + NotMatchingItems = 4, + None = 0, + } } -} -namespace aweXpect.Options -{ public class FixedCheckInterval : aweXpect.Options.ICheckInterval { public FixedCheckInterval(System.TimeSpan interval) { } @@ -1798,15 +1788,15 @@ namespace aweXpect.Options } namespace aweXpect.Results { - public class CollectionBeContainedInResult : aweXpect.Results.CollectionMatchResult - { - public CollectionBeContainedInResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.CollectionMatchResult Properly() { } - } - public class CollectionContainResult : aweXpect.Results.CollectionMatchResult + public class CollectionCountResult { - public CollectionContainResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.CollectionMatchResult Properly() { } + public CollectionCountResult(System.Func factory) { } + public TReturn AtLeast(int minimum) { } + public TReturn AtMost(int maximum) { } + public aweXpect.Results.BetweenResult Between(int minimum) { } + public TReturn EqualTo(int expected) { } + public TReturn LessThan(int maximum) { } + public TReturn MoreThan(int minimum) { } } public class CollectionMatchResult : aweXpect.Results.CollectionMatchResult> { @@ -1820,11 +1810,11 @@ namespace aweXpect.Results public TSelf IgnoringInterspersedItems() { } public TSelf InAnyOrder() { } } - public class ContainsValueResult : aweXpect.Results.AndOrResult + public class ContainsKeyResult : aweXpect.Results.AndOrResult { public aweXpect.Core.IThat WhoseValue { get; } } - public class ContainsValuesResult : aweXpect.Results.AndOrResult + public class ContainsKeysResult : aweXpect.Results.AndOrResult { public aweXpect.ThatEnumerable.Elements WhoseValues { get; } } @@ -1869,16 +1859,6 @@ namespace aweXpect.Results public IsUtf8SpanParsableResult(aweXpect.Core.ExpectationBuilder expectationBuilder, aweXpect.Core.IThat> subject, System.IFormatProvider? formatProvider) { } public aweXpect.Core.IThat Which { get; } } - public class ObjectCollectionBeContainedInResult : aweXpect.Results.ObjectCollectionMatchResult - { - public ObjectCollectionBeContainedInResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.ObjectEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.ObjectCollectionMatchResult Properly() { } - } - public class ObjectCollectionContainResult : aweXpect.Results.ObjectCollectionMatchResult - { - public ObjectCollectionContainResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.ObjectEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.ObjectCollectionMatchResult Properly() { } - } public class ObjectCollectionMatchResult : aweXpect.Results.ObjectCollectionMatchResult> { public ObjectCollectionMatchResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.ObjectEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } @@ -1906,6 +1886,16 @@ namespace aweXpect.Results public ObjectCountResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.Quantifier quantifier, aweXpect.Options.ObjectEqualityOptions options) { } public TSelf Using(System.Collections.Generic.IEqualityComparer comparer) { } } + public class ObjectProperCollectionMatchResult : aweXpect.Results.ObjectCollectionMatchResult + { + public ObjectProperCollectionMatchResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.ObjectEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions, aweXpect.Options.CollectionMatchOptions.EquivalenceRelations properEquivalenceRelation) { } + public aweXpect.Results.ObjectCollectionMatchResult Properly() { } + } + public class ProperCollectionMatchResult : aweXpect.Results.CollectionMatchResult + { + public ProperCollectionMatchResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.CollectionMatchOptions collectionMatchOptions, aweXpect.Options.CollectionMatchOptions.EquivalenceRelations properEquivalenceRelation) { } + public aweXpect.Results.CollectionMatchResult Properly() { } + } public class RepeatedCheckResult : aweXpect.Results.AndOrResult, aweXpect.Core.IOptionsProvider { public RepeatedCheckResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.RepeatedCheckOptions options) { } @@ -1951,16 +1941,6 @@ namespace aweXpect.Results public aweXpect.Results.SingleItemResult.Async Matching(System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } } } - public class StringCollectionBeContainedInResult : aweXpect.Results.StringCollectionMatchResult - { - public StringCollectionBeContainedInResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.StringEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.StringCollectionMatchResult Properly() { } - } - public class StringCollectionContainResult : aweXpect.Results.StringCollectionMatchResult - { - public StringCollectionContainResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.StringEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.StringCollectionMatchResult Properly() { } - } public class StringCollectionMatchResult : aweXpect.Results.StringCollectionMatchResult> { public StringCollectionMatchResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.StringEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } @@ -1973,4 +1953,9 @@ namespace aweXpect.Results public TSelf IgnoringInterspersedItems() { } public TSelf InAnyOrder() { } } + public class StringProperCollectionMatchResult : aweXpect.Results.StringCollectionMatchResult + { + public StringProperCollectionMatchResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.StringEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions, aweXpect.Options.CollectionMatchOptions.EquivalenceRelations properEquivalenceRelation) { } + public aweXpect.Results.StringCollectionMatchResult Properly() { } + } } \ No newline at end of file diff --git a/Tests/aweXpect.Api.Tests/Expected/aweXpect_net8.0.txt b/Tests/aweXpect.Api.Tests/Expected/aweXpect_net8.0.txt index 57b94bf01b..1a9e867339 100644 --- a/Tests/aweXpect.Api.Tests/Expected/aweXpect_net8.0.txt +++ b/Tests/aweXpect.Api.Tests/Expected/aweXpect_net8.0.txt @@ -1,42 +1,32 @@ [assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/Testably/aweXpect.git")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"aweXpect.Internal.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010091e3b299f2a31c904fbc5c2150944568b101ba409f5ee4cd95561c0c8cf50c1960d74f682c7f462f792ab37fe315ece00775c5bdda68c06d3abb67c1d531bf8c40d85d3d36ecf19fb05cc890ca7a5f39904e04ff754a55463236c5884f41083fae1ea626eb1f9b8c5c33f7bada7e650bed6ced9f0a75413d7e919f94f804efc9")] [assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")] -namespace aweXpect +namespace aweXpect.Equivalency { - public class CollectionCountResult - { - public CollectionCountResult(System.Func factory) { } - public TReturn AtLeast(int minimum) { } - public TReturn AtMost(int maximum) { } - public aweXpect.Results.BetweenResult Between(int minimum) { } - public TReturn EqualTo(int expected) { } - public TReturn LessThan(int maximum) { } - public TReturn MoreThan(int minimum) { } - } - public abstract class EnumerableQuantifier + public static class EquivalencyOptionsExtensions { - protected EnumerableQuantifier() { } - public abstract void AppendResult(System.Text.StringBuilder stringBuilder, aweXpect.Core.ExpectationGrammars grammars, int matchingCount, int notMatchingCount, int? totalCount, string? verb = null); - public abstract aweXpect.Core.Constraints.Outcome GetOutcome(int matchingCount, int notMatchingCount, int? totalCount); - public virtual aweXpect.EnumerableQuantifier.QuantifierContexts GetQuantifierContext() { } - public abstract bool IsDeterminable(int matchingCount, int notMatchingCount); - public abstract bool IsSingle(); - public static aweXpect.EnumerableQuantifier All(aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier AtLeast(int minimum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier AtMost(int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier Between(int minimum, int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier Exactly(int expected, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier LessThan(int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier MoreThan(int minimum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier None(aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - [System.Flags] - public enum QuantifierContexts - { - MatchingItems = 2, - NotMatchingItems = 4, - None = 0, - } + public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IgnoringCollectionOrder(this TEquivalencyOptions @this, bool ignoreCollectionOrder = true) + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IgnoringFields(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IgnoringMember(this TEquivalencyOptions @this, string memberToIgnore) + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IgnoringProperties(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IncludingFields(this TEquivalencyOptions @this, aweXpect.Equivalency.IncludeMembers fieldsToInclude = 2) + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IncludingProperties(this TEquivalencyOptions @this, aweXpect.Equivalency.IncludeMembers propertiesToInclude = 2) + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } } +} +namespace aweXpect +{ public static class EquivalencyExtensions { public static TSelf Equivalent(this aweXpect.Results.ObjectHasItemResult result, System.Func? options = null) @@ -89,29 +79,29 @@ namespace aweXpect [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.StringEqualityTypeCountResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, string? expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionContainResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.ObjectCountResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, TItem expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionContainResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CountResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.StringEqualityTypeCountResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, string? unexpected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionContainResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.ObjectCountResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, TItem unexpected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionContainResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CountResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] @@ -145,7 +135,7 @@ namespace aweXpect [aweXpect.Core.GuaranteesNotNull] public static aweXpect.ThatAsyncEnumerable.Elements Exactly(this aweXpect.Core.IThat?> subject, int expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.CollectionCountResult, aweXpect.Core.IThat?>>> HasCount(this aweXpect.Core.IThat?> subject) { } + public static aweXpect.Results.CollectionCountResult, aweXpect.Core.IThat?>>> HasCount(this aweXpect.Core.IThat?> subject) { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> HasCount(this aweXpect.Core.IThat?> subject, int expected) { } [aweXpect.Core.GuaranteesNotNull] @@ -161,13 +151,13 @@ namespace aweXpect [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.SingleItemResult, TItem>.Async HasSingle(this aweXpect.Core.IThat?> source) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat?>> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> IsEmpty(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.ObjectCollectionMatchWithToleranceResult, aweXpect.Core.IThat?>, System.DateTime, System.TimeSpan> IsEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } @@ -191,13 +181,13 @@ namespace aweXpect [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsInDescendingOrder(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat?>> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> IsNotEmpty(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.ObjectCollectionMatchWithToleranceResult, aweXpect.Core.IThat?>, System.DateTime, System.TimeSpan> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } @@ -258,12 +248,12 @@ namespace aweXpect } public interface IElements { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat?> Subject { get; } } public interface IElements { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat?> Subject { get; } } } @@ -432,15 +422,15 @@ namespace aweXpect [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TMember> AreAllUnique(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValueResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) + public static aweXpect.Results.ContainsKeyResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) where TKey : notnull { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValueResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) { } + public static aweXpect.Results.ContainsKeyResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValuesResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) + public static aweXpect.Results.ContainsKeysResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) where TKey : notnull { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValuesResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) { } + public static aweXpect.Results.ContainsKeysResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> ContainsValue(this aweXpect.Core.IThat?> source, TValue expected) where TKey : notnull { } @@ -582,26 +572,26 @@ namespace aweXpect public static aweXpect.Results.ObjectCountResult, object?> Contains(this aweXpect.Core.IThat source, object? expected) { } public static aweXpect.Results.StringEqualityTypeCountResult, aweXpect.Core.IThat>> Contains(this aweXpect.Core.IThat> source, string? expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionContainResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CountResult> Contains(this aweXpect.Core.IThat source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.StringCollectionContainResult, aweXpect.Core.IThat>> Contains(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat>> Contains(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionContainResult> Contains(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult> Contains(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.ObjectCountResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, TItem expected) { } public static aweXpect.Results.ObjectCountResult, aweXpect.Core.IThat>, TItem> Contains(this aweXpect.Core.IThat> source, TItem expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionContainResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CountResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionContainResult, TItem> Contains(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectCollectionContainResult, aweXpect.Core.IThat>, TItem> Contains(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, TItem> Contains(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat>, TItem> Contains(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CountResult, aweXpect.Core.IThat>> Contains(this aweXpect.Core.IThat> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.StringEqualityTypeCountResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, string? unexpected) { } @@ -609,26 +599,26 @@ namespace aweXpect public static aweXpect.Results.ObjectCountResult, object?> DoesNotContain(this aweXpect.Core.IThat source, object? unexpected) { } public static aweXpect.Results.StringEqualityTypeCountResult, aweXpect.Core.IThat>> DoesNotContain(this aweXpect.Core.IThat> source, string? unexpected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionContainResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CountResult> DoesNotContain(this aweXpect.Core.IThat source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.StringCollectionContainResult, aweXpect.Core.IThat>> DoesNotContain(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat>> DoesNotContain(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionContainResult> DoesNotContain(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult> DoesNotContain(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.ObjectCountResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, TItem unexpected) { } public static aweXpect.Results.ObjectCountResult, aweXpect.Core.IThat>, TItem> DoesNotContain(this aweXpect.Core.IThat> source, TItem unexpected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionContainResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CountResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionContainResult, TItem> DoesNotContain(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectCollectionContainResult, aweXpect.Core.IThat>, TItem> DoesNotContain(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, TItem> DoesNotContain(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat>, TItem> DoesNotContain(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CountResult, aweXpect.Core.IThat>> DoesNotContain(this aweXpect.Core.IThat> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> DoesNotEndWith(this aweXpect.Core.IThat?> source, params string[] unexpected) { } @@ -694,14 +684,14 @@ namespace aweXpect public static aweXpect.ThatEnumerable.Elements Exactly(this aweXpect.Core.IThat?> subject, int expected) { } public static aweXpect.ThatEnumerable.ElementsForStructEnumerable, TItem> Exactly(this aweXpect.Core.IThat> subject, int expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) { } + public static aweXpect.Results.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult> HasCount(this aweXpect.Core.IThat subject, int expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.CollectionCountResult, aweXpect.Core.IThat?>>> HasCount(this aweXpect.Core.IThat?> subject) { } - public static aweXpect.CollectionCountResult, aweXpect.Core.IThat>>> HasCount(this aweXpect.Core.IThat> subject) { } + public static aweXpect.Results.CollectionCountResult, aweXpect.Core.IThat?>>> HasCount(this aweXpect.Core.IThat?> subject) { } + public static aweXpect.Results.CollectionCountResult, aweXpect.Core.IThat>>> HasCount(this aweXpect.Core.IThat> subject) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) { } + public static aweXpect.Results.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> HasCount(this aweXpect.Core.IThat?> subject, int expected) { } public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat>> HasCount(this aweXpect.Core.IThat> subject, int expected) { } @@ -734,17 +724,17 @@ namespace aweXpect public static aweXpect.Results.SingleItemResult, TItem> HasSingle(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.SingleItemResult, TItem> HasSingle(this aweXpect.Core.IThat> source) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat?>> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat>> IsContainedIn(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat>> IsContainedIn(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionBeContainedInResult, TItem> IsContainedIn(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat>, TItem> IsContainedIn(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, TItem> IsContainedIn(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat>, TItem> IsContainedIn(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> IsEmpty(this aweXpect.Core.IThat?> source) { } [aweXpect.Core.GuaranteesNotNull] @@ -763,12 +753,12 @@ namespace aweXpect public static aweXpect.Results.ObjectCollectionMatchWithToleranceResult, aweXpect.Core.IThat?>, float?, float> IsEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectCollectionMatchWithToleranceResult, aweXpect.Core.IThat?>, float?, float> IsEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.StringCollectionMatchResult, aweXpect.Core.IThat?>> IsEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat>> IsEqualTo(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringCollectionMatchResult, aweXpect.Core.IThat>> IsEqualTo(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectCollectionMatchResult, TItem> IsEqualTo(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat>, TItem> IsEqualTo(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectCollectionMatchResult, aweXpect.Core.IThat>, TItem> IsEqualTo(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CollectionOrderResult> IsInAscendingOrder(this aweXpect.Core.IThat source) { } [aweXpect.Core.GuaranteesNotNull] @@ -790,17 +780,17 @@ namespace aweXpect public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsInDescendingOrder(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat>> IsInDescendingOrder(this aweXpect.Core.IThat> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat?>> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat>> IsNotContainedIn(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat>> IsNotContainedIn(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionBeContainedInResult, TItem> IsNotContainedIn(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat>, TItem> IsNotContainedIn(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, TItem> IsNotContainedIn(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat>, TItem> IsNotContainedIn(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> IsNotEmpty(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.ObjectCollectionMatchWithToleranceResult, aweXpect.Core.IThat?>, System.DateTime, System.TimeSpan> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } @@ -816,12 +806,12 @@ namespace aweXpect public static aweXpect.Results.ObjectCollectionMatchWithToleranceResult, aweXpect.Core.IThat?>, float?, float> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectCollectionMatchWithToleranceResult, aweXpect.Core.IThat?>, float?, float> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.StringCollectionMatchResult, aweXpect.Core.IThat?>> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat>> IsNotEqualTo(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringCollectionMatchResult, aweXpect.Core.IThat>> IsNotEqualTo(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectCollectionMatchResult, TItem> IsNotEqualTo(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat>, TItem> IsNotEqualTo(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectCollectionMatchResult, aweXpect.Core.IThat>, TItem> IsNotEqualTo(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CollectionOrderResult> IsNotInAscendingOrder(this aweXpect.Core.IThat source) { } [aweXpect.Core.GuaranteesNotNull] @@ -929,30 +919,30 @@ namespace aweXpect } public interface IElements { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat?> Subject { get; } } public interface IElements { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat?> Subject { get; } } public interface IElementsForEnumerable where out TEnumerable : System.Collections.IEnumerable? { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat Subject { get; } } public interface IElementsForStructEnumerable where out TEnumerable : struct, System.Collections.Generic.IEnumerable { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat Subject { get; } } public interface IElementsForStructEnumerable where out TEnumerable : struct, System.Collections.Generic.IEnumerable { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat Subject { get; } } } @@ -1513,14 +1503,14 @@ namespace aweXpect public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TMember> AreAllUnique(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") where TKey : notnull { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValueResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) { } + public static aweXpect.Results.ContainsKeyResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValueResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) + public static aweXpect.Results.ContainsKeyResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) where TKey : notnull { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValuesResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) { } + public static aweXpect.Results.ContainsKeysResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValuesResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) + public static aweXpect.Results.ContainsKeysResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) where TKey : notnull { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> ContainsValue(this aweXpect.Core.IThat?> source, TValue expected) { } @@ -1750,32 +1740,32 @@ namespace aweXpect public static aweXpect.Results.AndOrResult> IsNotLessThanOrEqualTo(this aweXpect.Core.IThat source, System.Version? unexpected) { } } } -namespace aweXpect.Equivalency +namespace aweXpect.Options { - public static class EquivalencyOptionsExtensions + public abstract class EnumerableQuantifier { - public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IgnoringCollectionOrder(this TEquivalencyOptions @this, bool ignoreCollectionOrder = true) - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IgnoringFields(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IgnoringMember(this TEquivalencyOptions @this, string memberToIgnore) - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IgnoringProperties(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IncludingFields(this TEquivalencyOptions @this, aweXpect.Equivalency.IncludeMembers fieldsToInclude = 2) - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IncludingProperties(this TEquivalencyOptions @this, aweXpect.Equivalency.IncludeMembers propertiesToInclude = 2) - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + protected EnumerableQuantifier() { } + public abstract void AppendResult(System.Text.StringBuilder stringBuilder, aweXpect.Core.ExpectationGrammars grammars, int matchingCount, int notMatchingCount, int? totalCount, string? verb = null); + public abstract aweXpect.Core.Constraints.Outcome GetOutcome(int matchingCount, int notMatchingCount, int? totalCount); + public virtual aweXpect.Options.EnumerableQuantifier.QuantifierContexts GetQuantifierContext() { } + public abstract bool IsDeterminable(int matchingCount, int notMatchingCount); + public abstract bool IsSingle(); + public static aweXpect.Options.EnumerableQuantifier All(aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier AtLeast(int minimum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier AtMost(int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier Between(int minimum, int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier Exactly(int expected, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier LessThan(int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier MoreThan(int minimum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier None(aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + [System.Flags] + public enum QuantifierContexts + { + MatchingItems = 2, + NotMatchingItems = 4, + None = 0, + } } -} -namespace aweXpect.Options -{ public class FixedCheckInterval : aweXpect.Options.ICheckInterval { public FixedCheckInterval(System.TimeSpan interval) { } @@ -1798,15 +1788,15 @@ namespace aweXpect.Options } namespace aweXpect.Results { - public class CollectionBeContainedInResult : aweXpect.Results.CollectionMatchResult - { - public CollectionBeContainedInResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.CollectionMatchResult Properly() { } - } - public class CollectionContainResult : aweXpect.Results.CollectionMatchResult + public class CollectionCountResult { - public CollectionContainResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.CollectionMatchResult Properly() { } + public CollectionCountResult(System.Func factory) { } + public TReturn AtLeast(int minimum) { } + public TReturn AtMost(int maximum) { } + public aweXpect.Results.BetweenResult Between(int minimum) { } + public TReturn EqualTo(int expected) { } + public TReturn LessThan(int maximum) { } + public TReturn MoreThan(int minimum) { } } public class CollectionMatchResult : aweXpect.Results.CollectionMatchResult> { @@ -1820,11 +1810,11 @@ namespace aweXpect.Results public TSelf IgnoringInterspersedItems() { } public TSelf InAnyOrder() { } } - public class ContainsValueResult : aweXpect.Results.AndOrResult + public class ContainsKeyResult : aweXpect.Results.AndOrResult { public aweXpect.Core.IThat WhoseValue { get; } } - public class ContainsValuesResult : aweXpect.Results.AndOrResult + public class ContainsKeysResult : aweXpect.Results.AndOrResult { public aweXpect.ThatEnumerable.Elements WhoseValues { get; } } @@ -1869,16 +1859,6 @@ namespace aweXpect.Results public IsUtf8SpanParsableResult(aweXpect.Core.ExpectationBuilder expectationBuilder, aweXpect.Core.IThat> subject, System.IFormatProvider? formatProvider) { } public aweXpect.Core.IThat Which { get; } } - public class ObjectCollectionBeContainedInResult : aweXpect.Results.ObjectCollectionMatchResult - { - public ObjectCollectionBeContainedInResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.ObjectEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.ObjectCollectionMatchResult Properly() { } - } - public class ObjectCollectionContainResult : aweXpect.Results.ObjectCollectionMatchResult - { - public ObjectCollectionContainResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.ObjectEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.ObjectCollectionMatchResult Properly() { } - } public class ObjectCollectionMatchResult : aweXpect.Results.ObjectCollectionMatchResult> { public ObjectCollectionMatchResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.ObjectEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } @@ -1906,6 +1886,16 @@ namespace aweXpect.Results public ObjectCountResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.Quantifier quantifier, aweXpect.Options.ObjectEqualityOptions options) { } public TSelf Using(System.Collections.Generic.IEqualityComparer comparer) { } } + public class ObjectProperCollectionMatchResult : aweXpect.Results.ObjectCollectionMatchResult + { + public ObjectProperCollectionMatchResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.ObjectEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions, aweXpect.Options.CollectionMatchOptions.EquivalenceRelations properEquivalenceRelation) { } + public aweXpect.Results.ObjectCollectionMatchResult Properly() { } + } + public class ProperCollectionMatchResult : aweXpect.Results.CollectionMatchResult + { + public ProperCollectionMatchResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.CollectionMatchOptions collectionMatchOptions, aweXpect.Options.CollectionMatchOptions.EquivalenceRelations properEquivalenceRelation) { } + public aweXpect.Results.CollectionMatchResult Properly() { } + } public class RepeatedCheckResult : aweXpect.Results.AndOrResult, aweXpect.Core.IOptionsProvider { public RepeatedCheckResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.RepeatedCheckOptions options) { } @@ -1951,16 +1941,6 @@ namespace aweXpect.Results public aweXpect.Results.SingleItemResult.Async Matching(System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } } } - public class StringCollectionBeContainedInResult : aweXpect.Results.StringCollectionMatchResult - { - public StringCollectionBeContainedInResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.StringEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.StringCollectionMatchResult Properly() { } - } - public class StringCollectionContainResult : aweXpect.Results.StringCollectionMatchResult - { - public StringCollectionContainResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.StringEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.StringCollectionMatchResult Properly() { } - } public class StringCollectionMatchResult : aweXpect.Results.StringCollectionMatchResult> { public StringCollectionMatchResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.StringEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } @@ -1973,4 +1953,9 @@ namespace aweXpect.Results public TSelf IgnoringInterspersedItems() { } public TSelf InAnyOrder() { } } + public class StringProperCollectionMatchResult : aweXpect.Results.StringCollectionMatchResult + { + public StringProperCollectionMatchResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.StringEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions, aweXpect.Options.CollectionMatchOptions.EquivalenceRelations properEquivalenceRelation) { } + public aweXpect.Results.StringCollectionMatchResult Properly() { } + } } \ No newline at end of file diff --git a/Tests/aweXpect.Api.Tests/Expected/aweXpect_netstandard2.0.txt b/Tests/aweXpect.Api.Tests/Expected/aweXpect_netstandard2.0.txt index 15f97d2d53..42765ff6d1 100644 --- a/Tests/aweXpect.Api.Tests/Expected/aweXpect_netstandard2.0.txt +++ b/Tests/aweXpect.Api.Tests/Expected/aweXpect_netstandard2.0.txt @@ -1,42 +1,32 @@ [assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/Testably/aweXpect.git")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"aweXpect.Internal.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010091e3b299f2a31c904fbc5c2150944568b101ba409f5ee4cd95561c0c8cf50c1960d74f682c7f462f792ab37fe315ece00775c5bdda68c06d3abb67c1d531bf8c40d85d3d36ecf19fb05cc890ca7a5f39904e04ff754a55463236c5884f41083fae1ea626eb1f9b8c5c33f7bada7e650bed6ced9f0a75413d7e919f94f804efc9")] [assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName=".NET Standard 2.0")] -namespace aweXpect +namespace aweXpect.Equivalency { - public class CollectionCountResult - { - public CollectionCountResult(System.Func factory) { } - public TReturn AtLeast(int minimum) { } - public TReturn AtMost(int maximum) { } - public aweXpect.Results.BetweenResult Between(int minimum) { } - public TReturn EqualTo(int expected) { } - public TReturn LessThan(int maximum) { } - public TReturn MoreThan(int minimum) { } - } - public abstract class EnumerableQuantifier + public static class EquivalencyOptionsExtensions { - protected EnumerableQuantifier() { } - public abstract void AppendResult(System.Text.StringBuilder stringBuilder, aweXpect.Core.ExpectationGrammars grammars, int matchingCount, int notMatchingCount, int? totalCount, string? verb = null); - public abstract aweXpect.Core.Constraints.Outcome GetOutcome(int matchingCount, int notMatchingCount, int? totalCount); - public virtual aweXpect.EnumerableQuantifier.QuantifierContexts GetQuantifierContext() { } - public abstract bool IsDeterminable(int matchingCount, int notMatchingCount); - public abstract bool IsSingle(); - public static aweXpect.EnumerableQuantifier All(aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier AtLeast(int minimum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier AtMost(int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier Between(int minimum, int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier Exactly(int expected, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier LessThan(int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier MoreThan(int minimum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - public static aweXpect.EnumerableQuantifier None(aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } - [System.Flags] - public enum QuantifierContexts - { - MatchingItems = 2, - NotMatchingItems = 4, - None = 0, - } + public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IgnoringCollectionOrder(this TEquivalencyOptions @this, bool ignoreCollectionOrder = true) + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IgnoringFields(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IgnoringMember(this TEquivalencyOptions @this, string memberToIgnore) + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IgnoringProperties(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IncludingFields(this TEquivalencyOptions @this, aweXpect.Equivalency.IncludeMembers fieldsToInclude = 2) + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + public static TEquivalencyOptions IncludingProperties(this TEquivalencyOptions @this, aweXpect.Equivalency.IncludeMembers propertiesToInclude = 2) + where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } } +} +namespace aweXpect +{ public static class EquivalencyExtensions { public static TSelf Equivalent(this aweXpect.Results.ObjectHasItemResult result, System.Func? options = null) @@ -182,15 +172,15 @@ namespace aweXpect [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TMember> AreAllUnique(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValueResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) + public static aweXpect.Results.ContainsKeyResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) where TKey : notnull { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValueResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) { } + public static aweXpect.Results.ContainsKeyResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValuesResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) + public static aweXpect.Results.ContainsKeysResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) where TKey : notnull { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValuesResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) { } + public static aweXpect.Results.ContainsKeysResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> ContainsValue(this aweXpect.Core.IThat?> source, TValue expected) where TKey : notnull { } @@ -317,45 +307,45 @@ namespace aweXpect [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.ObjectCountResult, object?> Contains(this aweXpect.Core.IThat source, object? expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionContainResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CountResult> Contains(this aweXpect.Core.IThat source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionContainResult> Contains(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult> Contains(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.ObjectCountResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, TItem expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionContainResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CountResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionContainResult, TItem> Contains(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, TItem> Contains(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.StringEqualityTypeCountResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, string? unexpected) { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.ObjectCountResult, object?> DoesNotContain(this aweXpect.Core.IThat source, object? unexpected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionContainResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CountResult> DoesNotContain(this aweXpect.Core.IThat source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionContainResult> DoesNotContain(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult> DoesNotContain(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.ObjectCountResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, TItem unexpected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionContainResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionContainResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CountResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionContainResult, TItem> DoesNotContain(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, TItem> DoesNotContain(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> DoesNotEndWith(this aweXpect.Core.IThat?> source, params string[] unexpected) { } [aweXpect.Core.GuaranteesNotNull] @@ -405,13 +395,13 @@ namespace aweXpect [aweXpect.Core.GuaranteesNotNull] public static aweXpect.ThatEnumerable.Elements Exactly(this aweXpect.Core.IThat?> subject, int expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) { } + public static aweXpect.Results.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult> HasCount(this aweXpect.Core.IThat subject, int expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.CollectionCountResult, aweXpect.Core.IThat?>>> HasCount(this aweXpect.Core.IThat?> subject) { } + public static aweXpect.Results.CollectionCountResult, aweXpect.Core.IThat?>>> HasCount(this aweXpect.Core.IThat?> subject) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) { } + public static aweXpect.Results.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> HasCount(this aweXpect.Core.IThat?> subject, int expected) { } [aweXpect.Core.GuaranteesNotNull] @@ -437,15 +427,15 @@ namespace aweXpect [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.SingleItemResult, TItem> HasSingle(this aweXpect.Core.IThat?> source) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat?>> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionBeContainedInResult, TItem> IsContainedIn(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, TItem> IsContainedIn(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> IsEmpty(this aweXpect.Core.IThat?> source) { } [aweXpect.Core.GuaranteesNotNull] @@ -485,15 +475,15 @@ namespace aweXpect [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsInDescendingOrder(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.StringCollectionBeContainedInResult, aweXpect.Core.IThat?>> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringProperCollectionMatchResult, aweXpect.Core.IThat?>> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.CollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable>> expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionBeContainedInResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, aweXpect.Core.IThat?>, TItem> IsNotContainedIn(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ObjectCollectionBeContainedInResult, TItem> IsNotContainedIn(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectProperCollectionMatchResult, TItem> IsNotContainedIn(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> IsNotEmpty(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.ObjectCollectionMatchWithToleranceResult, aweXpect.Core.IThat?>, System.DateTime, System.TimeSpan> IsNotEqualTo(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } @@ -606,30 +596,30 @@ namespace aweXpect } public interface IElements { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat?> Subject { get; } } public interface IElements { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat?> Subject { get; } } public interface IElementsForEnumerable where out TEnumerable : System.Collections.IEnumerable? { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat Subject { get; } } public interface IElementsForStructEnumerable where out TEnumerable : struct, System.Collections.Generic.IEnumerable { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat Subject { get; } } public interface IElementsForStructEnumerable where out TEnumerable : struct, System.Collections.Generic.IEnumerable { - aweXpect.EnumerableQuantifier Quantifier { get; } + aweXpect.Options.EnumerableQuantifier Quantifier { get; } aweXpect.Core.IThat Subject { get; } } } @@ -1464,14 +1454,14 @@ namespace aweXpect public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TMember> AreAllUnique(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") where TKey : notnull { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValueResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) { } + public static aweXpect.Results.ContainsKeyResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValueResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) + public static aweXpect.Results.ContainsKeyResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKey(this aweXpect.Core.IThat?> source, TKey expected) where TKey : notnull { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValuesResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) { } + public static aweXpect.Results.ContainsKeysResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) { } [aweXpect.Core.GuaranteesNotNull] - public static aweXpect.Results.ContainsValuesResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) + public static aweXpect.Results.ContainsKeysResult, aweXpect.Core.IThat?>, TKey, TValue?> ContainsKeys(this aweXpect.Core.IThat?> source, params TKey[] expected) where TKey : notnull { } [aweXpect.Core.GuaranteesNotNull] public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> ContainsValue(this aweXpect.Core.IThat?> source, TValue expected) { } @@ -1655,32 +1645,32 @@ namespace aweXpect public static aweXpect.Results.AndOrResult> IsNotLessThanOrEqualTo(this aweXpect.Core.IThat source, System.Version? unexpected) { } } } -namespace aweXpect.Equivalency +namespace aweXpect.Options { - public static class EquivalencyOptionsExtensions + public abstract class EnumerableQuantifier { - public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions Ignoring(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IgnoringCollectionOrder(this TEquivalencyOptions @this, bool ignoreCollectionOrder = true) - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IgnoringFields(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IgnoringMember(this TEquivalencyOptions @this, string memberToIgnore) - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IgnoringProperties(this TEquivalencyOptions @this, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IncludingFields(this TEquivalencyOptions @this, aweXpect.Equivalency.IncludeMembers fieldsToInclude = 2) - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } - public static TEquivalencyOptions IncludingProperties(this TEquivalencyOptions @this, aweXpect.Equivalency.IncludeMembers propertiesToInclude = 2) - where TEquivalencyOptions : aweXpect.Equivalency.EquivalencyTypeOptions { } + protected EnumerableQuantifier() { } + public abstract void AppendResult(System.Text.StringBuilder stringBuilder, aweXpect.Core.ExpectationGrammars grammars, int matchingCount, int notMatchingCount, int? totalCount, string? verb = null); + public abstract aweXpect.Core.Constraints.Outcome GetOutcome(int matchingCount, int notMatchingCount, int? totalCount); + public virtual aweXpect.Options.EnumerableQuantifier.QuantifierContexts GetQuantifierContext() { } + public abstract bool IsDeterminable(int matchingCount, int notMatchingCount); + public abstract bool IsSingle(); + public static aweXpect.Options.EnumerableQuantifier All(aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier AtLeast(int minimum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier AtMost(int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier Between(int minimum, int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier Exactly(int expected, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier LessThan(int maximum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier MoreThan(int minimum, aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + public static aweXpect.Options.EnumerableQuantifier None(aweXpect.Core.ExpectationGrammars expectationGrammars = 0) { } + [System.Flags] + public enum QuantifierContexts + { + MatchingItems = 2, + NotMatchingItems = 4, + None = 0, + } } -} -namespace aweXpect.Options -{ public class FixedCheckInterval : aweXpect.Options.ICheckInterval { public FixedCheckInterval(System.TimeSpan interval) { } @@ -1703,15 +1693,15 @@ namespace aweXpect.Options } namespace aweXpect.Results { - public class CollectionBeContainedInResult : aweXpect.Results.CollectionMatchResult - { - public CollectionBeContainedInResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.CollectionMatchResult Properly() { } - } - public class CollectionContainResult : aweXpect.Results.CollectionMatchResult + public class CollectionCountResult { - public CollectionContainResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.CollectionMatchResult Properly() { } + public CollectionCountResult(System.Func factory) { } + public TReturn AtLeast(int minimum) { } + public TReturn AtMost(int maximum) { } + public aweXpect.Results.BetweenResult Between(int minimum) { } + public TReturn EqualTo(int expected) { } + public TReturn LessThan(int maximum) { } + public TReturn MoreThan(int minimum) { } } public class CollectionMatchResult : aweXpect.Results.CollectionMatchResult> { @@ -1725,11 +1715,11 @@ namespace aweXpect.Results public TSelf IgnoringInterspersedItems() { } public TSelf InAnyOrder() { } } - public class ContainsValueResult : aweXpect.Results.AndOrResult + public class ContainsKeyResult : aweXpect.Results.AndOrResult { public aweXpect.Core.IThat WhoseValue { get; } } - public class ContainsValuesResult : aweXpect.Results.AndOrResult + public class ContainsKeysResult : aweXpect.Results.AndOrResult { public aweXpect.ThatEnumerable.Elements WhoseValues { get; } } @@ -1756,16 +1746,6 @@ namespace aweXpect.Results public aweXpect.Results.HasItemResult MatchingExactly() { } public aweXpect.Results.HasItemResult MatchingExactly(System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } } - public class ObjectCollectionBeContainedInResult : aweXpect.Results.ObjectCollectionMatchResult - { - public ObjectCollectionBeContainedInResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.ObjectEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.ObjectCollectionMatchResult Properly() { } - } - public class ObjectCollectionContainResult : aweXpect.Results.ObjectCollectionMatchResult - { - public ObjectCollectionContainResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.ObjectEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.ObjectCollectionMatchResult Properly() { } - } public class ObjectCollectionMatchResult : aweXpect.Results.ObjectCollectionMatchResult> { public ObjectCollectionMatchResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.ObjectEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } @@ -1793,6 +1773,16 @@ namespace aweXpect.Results public ObjectCountResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.Quantifier quantifier, aweXpect.Options.ObjectEqualityOptions options) { } public TSelf Using(System.Collections.Generic.IEqualityComparer comparer) { } } + public class ObjectProperCollectionMatchResult : aweXpect.Results.ObjectCollectionMatchResult + { + public ObjectProperCollectionMatchResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.ObjectEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions, aweXpect.Options.CollectionMatchOptions.EquivalenceRelations properEquivalenceRelation) { } + public aweXpect.Results.ObjectCollectionMatchResult Properly() { } + } + public class ProperCollectionMatchResult : aweXpect.Results.CollectionMatchResult + { + public ProperCollectionMatchResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.CollectionMatchOptions collectionMatchOptions, aweXpect.Options.CollectionMatchOptions.EquivalenceRelations properEquivalenceRelation) { } + public aweXpect.Results.CollectionMatchResult Properly() { } + } public class RepeatedCheckResult : aweXpect.Results.AndOrResult, aweXpect.Core.IOptionsProvider { public RepeatedCheckResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.RepeatedCheckOptions options) { } @@ -1838,16 +1828,6 @@ namespace aweXpect.Results public aweXpect.Results.SingleItemResult.Async Matching(System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } } } - public class StringCollectionBeContainedInResult : aweXpect.Results.StringCollectionMatchResult - { - public StringCollectionBeContainedInResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.StringEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.StringCollectionMatchResult Properly() { } - } - public class StringCollectionContainResult : aweXpect.Results.StringCollectionMatchResult - { - public StringCollectionContainResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.StringEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } - public aweXpect.Results.StringCollectionMatchResult Properly() { } - } public class StringCollectionMatchResult : aweXpect.Results.StringCollectionMatchResult> { public StringCollectionMatchResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.StringEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions) { } @@ -1860,4 +1840,9 @@ namespace aweXpect.Results public TSelf IgnoringInterspersedItems() { } public TSelf InAnyOrder() { } } + public class StringProperCollectionMatchResult : aweXpect.Results.StringCollectionMatchResult + { + public StringProperCollectionMatchResult(aweXpect.Core.ExpectationBuilder expectationBuilder, TThat returnValue, aweXpect.Options.StringEqualityOptions options, aweXpect.Options.CollectionMatchOptions collectionMatchOptions, aweXpect.Options.CollectionMatchOptions.EquivalenceRelations properEquivalenceRelation) { } + public aweXpect.Results.StringCollectionMatchResult Properly() { } + } } \ No newline at end of file diff --git a/Tests/aweXpect.Internal.Tests/Collections/EnumerableQuantifierTests.cs b/Tests/aweXpect.Internal.Tests/Collections/EnumerableQuantifierTests.cs index ba07cddf59..93962cb70d 100644 --- a/Tests/aweXpect.Internal.Tests/Collections/EnumerableQuantifierTests.cs +++ b/Tests/aweXpect.Internal.Tests/Collections/EnumerableQuantifierTests.cs @@ -1,6 +1,7 @@ using System.Text; using aweXpect.Core; using aweXpect.Core.Constraints; +using aweXpect.Options; namespace aweXpect.Internal.Tests.Collections;