diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.All.cs b/Source/aweXpect/That/Collections/ThatEnumerable.All.cs index b0a4f0c66..eee5ea56b 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.All.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.All.cs @@ -27,8 +27,8 @@ public static Elements All( /// /// Verifies that in the collection all items… /// - public static ElementsForEnumerable All( - this IThat subject) + public static ElementsForEnumerable All( + this IThat subject) => new(subject, EnumerableQuantifier.All(subject.Get().ExpectationBuilder.ExpectationGrammars)); #if NET8_0_OR_GREATER diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.AreAllUnique.cs b/Source/aweXpect/That/Collections/ThatEnumerable.AreAllUnique.cs index d0fb26216..6909a2699 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.AreAllUnique.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.AreAllUnique.cs @@ -101,15 +101,14 @@ public static partial class ThatEnumerable /// /// Verifies that the collection only contains unique items. /// - public static ObjectEqualityResult, object?> AreAllUnique( - this IThat source) - where TEnumerable : IEnumerable + public static ObjectEqualityResult, object?> AreAllUnique( + this IThat source) { ObjectEqualityOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectEqualityResult, object?>( + return new ObjectEqualityResult, object?>( expectationBuilder.AddConstraint((it, grammars) - => new AreAllUniqueForEnumerableConstraint(expectationBuilder, it, grammars, + => new AreAllUniqueForEnumerableConstraint(expectationBuilder, it, grammars, options)), source, options ); @@ -119,19 +118,17 @@ public static partial class ThatEnumerable /// Verifies that the collection only contains items with unique members specified by the /// . /// - public static ObjectEqualityResult, TMember> AreAllUnique( - this IThat source, + public static ObjectEqualityResult, TMember> AreAllUnique( + this IThat source, Func memberAccessor, [CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") - where TEnumerable : IEnumerable { ObjectEqualityOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectEqualityResult, TMember>( + return new ObjectEqualityResult, TMember>( expectationBuilder.AddConstraint((it, grammars) - => new AreAllUniqueWithPredicateForEnumerableConstraint( + => new AreAllUniqueWithPredicateForEnumerableConstraint( expectationBuilder, it, grammars, memberAccessor, @@ -145,12 +142,12 @@ public static partial class ThatEnumerable /// /// Verifies that the collection only contains unique items. /// - public static ObjectEqualityResult, IThat?>, TItem> AreAllUnique( - this IThat?> source) + public static ObjectEqualityResult, IThat>, TItem> AreAllUnique( + this IThat> source) { ObjectEqualityOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectEqualityResult, IThat?>, TItem>( + return new ObjectEqualityResult, IThat>, TItem>( expectationBuilder.AddConstraint((it, grammars) => new AreAllUniqueForEnumerableConstraint, TItem>(expectationBuilder, it, grammars, options)), @@ -181,17 +178,17 @@ public static partial class ThatEnumerable /// Verifies that the collection only contains items with unique members specified by the /// . /// - public static ObjectEqualityResult, IThat?>, TMember> AreAllUnique< + public static ObjectEqualityResult, IThat>, TMember> AreAllUnique< TItem, TMember>( - this IThat?> source, + this IThat> source, Func memberAccessor, [CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { ObjectEqualityOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectEqualityResult, IThat?>, TMember>( + return new ObjectEqualityResult, IThat>, TMember>( expectationBuilder.AddConstraint((it, grammars) => new AreAllUniqueWithPredicateForEnumerableConstraint, TMember, TMember>( expectationBuilder, @@ -209,15 +206,15 @@ public static partial class ThatEnumerable /// Verifies that the collection only contains items with unique members specified by the /// . /// - public static StringEqualityResult, IThat?>> AreAllUnique( - this IThat?> source, + public static StringEqualityResult, IThat>> AreAllUnique( + this IThat> source, Func memberAccessor, [CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { StringEqualityOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new StringEqualityResult, IThat?>>( + return new StringEqualityResult, IThat>>( expectationBuilder.AddConstraint((it, grammars) => new AreAllUniqueWithPredicateForEnumerableConstraint, string, string>( expectationBuilder, diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.AtLeast.cs b/Source/aweXpect/That/Collections/ThatEnumerable.AtLeast.cs index 8b24fb685..45e89c666 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.AtLeast.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.AtLeast.cs @@ -29,8 +29,8 @@ public static Elements AtLeast( /// /// Verifies that in the collection at least items… /// - public static ElementsForEnumerable AtLeast( - this IThat subject, + public static ElementsForEnumerable AtLeast( + this IThat subject, int minimum) => new(subject, EnumerableQuantifier.AtLeast(minimum, subject.Get().ExpectationBuilder.ExpectationGrammars)); diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.AtMost.cs b/Source/aweXpect/That/Collections/ThatEnumerable.AtMost.cs index 5efde8a52..69bd4c75e 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.AtMost.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.AtMost.cs @@ -29,8 +29,8 @@ public static Elements AtMost( /// /// Verifies that in the collection at most items… /// - public static ElementsForEnumerable AtMost( - this IThat subject, + public static ElementsForEnumerable AtMost( + this IThat subject, int maximum) => new(subject, EnumerableQuantifier.AtMost(maximum, subject.Get().ExpectationBuilder.ExpectationGrammars)); diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.Between.cs b/Source/aweXpect/That/Collections/ThatEnumerable.Between.cs index 9d1e05d91..c2146bce0 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.Between.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.Between.cs @@ -32,10 +32,10 @@ public static BetweenResult Between( /// /// Verifies that in the collection between … /// - public static BetweenResult> Between( - this IThat subject, + public static BetweenResult> Between( + this IThat subject, int minimum) - => new(maximum => new ElementsForEnumerable(subject, + => new(maximum => new ElementsForEnumerable(subject, EnumerableQuantifier.Between(minimum, maximum, subject.Get().ExpectationBuilder.ExpectationGrammars))); #if NET8_0_OR_GREATER diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.Contains.cs b/Source/aweXpect/That/Collections/ThatEnumerable.Contains.cs index aced7d879..9aa78ffba 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.Contains.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.Contains.cs @@ -99,15 +99,15 @@ public static CountResult, IThat?>> /// /// Verifies that the collection contains the value. /// - public static ObjectCountResult, object?> + public static ObjectCountResult, object?> Contains( - this IThat source, + this IThat source, object? expected) { Quantifier quantifier = new(); ObjectEqualityOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCountResult, object?>( + return new ObjectCountResult, object?>( expectationBuilder.AddConstraint((it, grammars) => new ContainForEnumerableConstraint( expectationBuilder, @@ -125,9 +125,9 @@ public static CountResult, IThat?>> /// /// Verifies that the collection contains an item that satisfies the . /// - public static CountResult> + public static CountResult> Contains( - this IThat source, + this IThat source, Func predicate, [CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") @@ -135,7 +135,7 @@ public static CountResult, IThat?>> predicate.ThrowIfNull(); Quantifier quantifier = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CountResult>( + return new CountResult>( expectationBuilder.AddConstraint((it, grammars) => new ContainForEnumerableConstraint( expectationBuilder, it, grammars, @@ -298,16 +298,16 @@ public static CountResult, IThat>> /// /// Verifies that the collection contains the provided collection. /// - public static ObjectCollectionContainResult, TItem> + public static ObjectCollectionContainResult, TItem> Contains( - this IThat source, + this IThat source, IEnumerable expected, [CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { ObjectEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.Contains); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionContainResult, TItem>( + return new ObjectCollectionContainResult, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), @@ -448,15 +448,15 @@ public static CountResult, IThat?>> /// /// Verifies that the collection does not contain the value. /// - public static ObjectCountResult, object?> + public static ObjectCountResult, object?> DoesNotContain( - this IThat source, + this IThat source, object? unexpected) { Quantifier quantifier = new(); ObjectEqualityOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCountResult, object?>( + return new ObjectCountResult, object?>( expectationBuilder.AddConstraint((it, grammars) => new ContainForEnumerableConstraint( expectationBuilder, @@ -474,9 +474,9 @@ public static CountResult, IThat?>> /// /// Verifies that the collection contains no item that satisfies the . /// - public static CountResult> + public static CountResult> DoesNotContain( - this IThat source, + this IThat source, Func predicate, [CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") @@ -484,7 +484,7 @@ public static CountResult, IThat?>> predicate.ThrowIfNull(); Quantifier quantifier = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CountResult>( + return new CountResult>( expectationBuilder.AddConstraint((it, grammars) => new ContainForEnumerableConstraint( expectationBuilder, it, grammars, @@ -650,9 +650,9 @@ public static CountResult, IThat>> /// /// Verifies that the collection does not contain the provided collection. /// - public static ObjectCollectionContainResult, TItem> + public static ObjectCollectionContainResult, TItem> DoesNotContain( - this IThat source, + this IThat source, IEnumerable unexpected, [CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") @@ -660,7 +660,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 ObjectCollectionContainResult, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.Elements.AreEqualTo.cs b/Source/aweXpect/That/Collections/ThatEnumerable.Elements.AreEqualTo.cs index 81f7a6273..ac00c95d2 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.Elements.AreEqualTo.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.Elements.AreEqualTo.cs @@ -282,16 +282,15 @@ public static partial class ThatEnumerable /// /// …are equal to the value. /// - public static ObjectEqualityResult, object?> - AreEqualTo(this ElementsForEnumerable elements, object? expected) - where TEnumerable : IEnumerable? + public static ObjectEqualityResult, object?> + AreEqualTo(this ElementsForEnumerable elements, object? expected) { - IElementsForEnumerable iElements = elements; + IElementsForEnumerable iElements = elements; ObjectEqualityOptions options = new(); ExpectationBuilder expectationBuilder = iElements.Subject.Get().ExpectationBuilder; - return new ObjectEqualityResult, object?>( + return new ObjectEqualityResult, object?>( expectationBuilder.AddConstraint((it, grammars) - => new CollectionForEnumerableConstraint( + => new CollectionForEnumerableConstraint( expectationBuilder, it, grammars, iElements.Quantifier, diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.Elements.AreEquivalentTo.cs b/Source/aweXpect/That/Collections/ThatEnumerable.Elements.AreEquivalentTo.cs index 9d4f3d9c5..c8a0d2332 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.Elements.AreEquivalentTo.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.Elements.AreEquivalentTo.cs @@ -61,7 +61,7 @@ public partial class ElementsForEnumerable /// /// …are equivalent to the value. /// - public ObjectEqualityResult, object?> + public ObjectEqualityResult, object?> AreEquivalentTo(TExpected expected, Func, EquivalencyOptions>? options = null, [CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") @@ -77,7 +77,7 @@ public partial class ElementsForEnumerable ObjectEqualityOptions equalityOptions = new(); equalityOptions.Equivalent(equivalencyOptions); - return new ObjectEqualityResult, object?>( + return new ObjectEqualityResult, object?>( expectationBuilder.AddConstraint((it, grammars) => new CollectionForEnumerableConstraint( expectationBuilder, diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.Elements.ComplyWith.cs b/Source/aweXpect/That/Collections/ThatEnumerable.Elements.ComplyWith.cs index 0e985be76..e1ccf56ff 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.Elements.ComplyWith.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.Elements.ComplyWith.cs @@ -129,11 +129,11 @@ public partial class ElementsForEnumerable /// /// …comply with the . /// - public ObjectEqualityResult, object?> + public ObjectEqualityResult, object?> ComplyWith(Action> expectations) { ObjectEqualityOptions options = new(); - return new ObjectEqualityResult, object?>( + return new ObjectEqualityResult, object?>( _subject.Get().ExpectationBuilder.AddConstraint((expectationBuilder, it, grammars) => new ComplyWithConstraint(expectationBuilder, it, grammars, _quantifier, expectations)), _subject, diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.Elements.Satisfy.cs b/Source/aweXpect/That/Collections/ThatEnumerable.Elements.Satisfy.cs index 8a37c8e40..7da838c6b 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.Elements.Satisfy.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.Elements.Satisfy.cs @@ -79,7 +79,7 @@ public partial class ElementsForEnumerable /// /// …satisfy the . /// - public AndOrResult> + public AndOrResult> Satisfy( Func predicate, [CallerArgumentExpression("predicate")] @@ -87,7 +87,7 @@ public partial class ElementsForEnumerable { predicate.ThrowIfNull(); ExpectationBuilder expectationBuilder = _subject.Get().ExpectationBuilder; - return new AndOrResult>( + return new AndOrResult>( expectationBuilder.AddConstraint((it, grammars) => new CollectionForEnumerableConstraint( expectationBuilder, diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.EndsWith.cs b/Source/aweXpect/That/Collections/ThatEnumerable.EndsWith.cs index 802931492..4295f2636 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.EndsWith.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.EndsWith.cs @@ -106,17 +106,16 @@ public static partial class ThatEnumerable /// /// Verifies that the collection ends with the provided collection. /// - public static ObjectEqualityResult, TItem> - EndsWith( - this IThat source, + public static ObjectEqualityResult, TItem> + EndsWith( + this IThat source, IEnumerable expected) - where TEnumerable : IEnumerable { ObjectEqualityOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectEqualityResult, TItem>( + return new ObjectEqualityResult, TItem>( expectationBuilder.AddConstraint((it, grammars) - => new EndsWithForEnumerableConstraint(expectationBuilder, it, grammars, + => new EndsWithForEnumerableConstraint(expectationBuilder, it, grammars, Formatter.Format(expected), expected.ToArray(), options)), @@ -127,18 +126,17 @@ public static partial class ThatEnumerable /// /// Verifies that the collection ends with the provided collection. /// - public static ObjectEqualityResult, TItem> - EndsWith( - this IThat source, + public static ObjectEqualityResult, TItem> + EndsWith( + this IThat source, params TItem[] expected) - where TEnumerable : IEnumerable { _ = expected ?? throw new ArgumentNullException(nameof(expected)); ObjectEqualityOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectEqualityResult, TItem>( + return new ObjectEqualityResult, TItem>( expectationBuilder.AddConstraint((it, grammars) - => new EndsWithForEnumerableConstraint(expectationBuilder, it, grammars, + => new EndsWithForEnumerableConstraint(expectationBuilder, it, grammars, Formatter.Format(expected), expected, options)), @@ -328,17 +326,16 @@ public static ObjectEqualityResult, IThat /// Verifies that the collection does not end with the provided collection. /// - public static ObjectEqualityResult, TItem> - DoesNotEndWith( - this IThat source, + public static ObjectEqualityResult, TItem> + DoesNotEndWith( + this IThat source, IEnumerable unexpected) - where TEnumerable : IEnumerable { ObjectEqualityOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectEqualityResult, TItem>( + return new ObjectEqualityResult, TItem>( expectationBuilder.AddConstraint((it, grammars) - => new EndsWithForEnumerableConstraint(expectationBuilder, it, grammars, + => new EndsWithForEnumerableConstraint(expectationBuilder, it, grammars, Formatter.Format(unexpected), unexpected.ToArray(), options).Invert()), @@ -349,18 +346,17 @@ public static ObjectEqualityResult, IThat /// Verifies that the collection does not end with the provided collection. /// - public static ObjectEqualityResult, TItem> - DoesNotEndWith( - this IThat source, + public static ObjectEqualityResult, TItem> + DoesNotEndWith( + this IThat source, params TItem[] unexpected) - where TEnumerable : IEnumerable { _ = unexpected ?? throw new ArgumentNullException(nameof(unexpected)); ObjectEqualityOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectEqualityResult, TItem>( + return new ObjectEqualityResult, TItem>( expectationBuilder.AddConstraint((it, grammars) - => new EndsWithForEnumerableConstraint(expectationBuilder, it, grammars, + => new EndsWithForEnumerableConstraint(expectationBuilder, it, grammars, Formatter.Format(unexpected), unexpected, options).Invert()), diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.Exactly.cs b/Source/aweXpect/That/Collections/ThatEnumerable.Exactly.cs index e012287c1..3293b4413 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.Exactly.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.Exactly.cs @@ -31,8 +31,8 @@ public static Elements Exactly( /// /// Verifies that in the collection exactly items… /// - public static ElementsForEnumerable Exactly( - this IThat subject, + public static ElementsForEnumerable Exactly( + this IThat subject, int expected) => new(subject, EnumerableQuantifier.Exactly(expected, subject.Get().ExpectationBuilder.ExpectationGrammars)); diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.HasCount.cs b/Source/aweXpect/That/Collections/ThatEnumerable.HasCount.cs index c6a5bc2aa..5d93b47d7 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.HasCount.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.HasCount.cs @@ -71,15 +71,14 @@ public static partial class ThatEnumerable /// /// Verifies that the has an item count of… /// - public static CollectionCountResult>> HasCount( - this IThat subject) - where TEnumerable : IEnumerable + public static CollectionCountResult>> HasCount( + this IThat subject) { ExpectationBuilder expectationBuilder = subject.Get().ExpectationBuilder; - return new CollectionCountResult>>(quantifier - => new AndOrResult>( + return new CollectionCountResult>>(quantifier + => new AndOrResult>( expectationBuilder.AddConstraint((it, grammars) - => new SyncCollectionCountForEnumerableConstraint(expectationBuilder, it, grammars, + => new SyncCollectionCountForEnumerableConstraint(expectationBuilder, it, grammars, quantifier)), subject)); } @@ -87,18 +86,52 @@ public static partial class ThatEnumerable /// /// Verifies that the has exactly items. /// - public static AndOrResult> HasCount( - this IThat subject, int expected) - where TEnumerable : IEnumerable + public static AndOrResult> HasCount( + this IThat subject, int expected) { ExpectationBuilder expectationBuilder = subject.Get().ExpectationBuilder; - return new AndOrResult>( + return new AndOrResult>( expectationBuilder.AddConstraint((it, grammars) - => new SyncCollectionCountForEnumerableConstraint(expectationBuilder, it, grammars, + => new SyncCollectionCountForEnumerableConstraint(expectationBuilder, it, grammars, EnumerableQuantifier.Exactly(expected))), subject); } +#if NET8_0_OR_GREATER + /// + /// Verifies that the has an item count of… + /// + public static CollectionCountResult, IThat>>> + HasCount( + this IThat> subject) + { + ExpectationBuilder expectationBuilder = subject.Get().ExpectationBuilder; + return new CollectionCountResult, IThat>>>(quantifier + => new AndOrResult, IThat>>( + expectationBuilder.AddConstraint((it, grammars) + => new SyncCollectionCountForEnumerableConstraint>(expectationBuilder, it, + grammars, quantifier)), + subject)); + } +#endif + +#if NET8_0_OR_GREATER + /// + /// Verifies that the has exactly items. + /// + public static AndOrResult, IThat>> HasCount( + this IThat> subject, int expected) + { + ExpectationBuilder expectationBuilder = subject.Get().ExpectationBuilder; + return new AndOrResult, IThat>>( + expectationBuilder.AddConstraint((it, grammars) + => new SyncCollectionCountForEnumerableConstraint>(expectationBuilder, it, + grammars, + EnumerableQuantifier.Exactly(expected))), + subject); + } +#endif + /// /// Verifies that the does not have items. /// @@ -130,15 +163,31 @@ public static partial class ThatEnumerable /// /// Verifies that the does not have items. /// - public static AndOrResult> DoesNotHaveCount( - this IThat subject, int unexpected) - where TEnumerable : IEnumerable + public static AndOrResult> DoesNotHaveCount( + this IThat subject, int unexpected) { ExpectationBuilder expectationBuilder = subject.Get().ExpectationBuilder; - return new AndOrResult>( + return new AndOrResult>( expectationBuilder.AddConstraint((it, grammars) - => new SyncCollectionCountForEnumerableConstraint(expectationBuilder, it, grammars, + => new SyncCollectionCountForEnumerableConstraint(expectationBuilder, it, grammars, EnumerableQuantifier.Exactly(unexpected)).Invert()), subject); } + +#if NET8_0_OR_GREATER + /// + /// Verifies that the does not have items. + /// + public static AndOrResult, IThat>> DoesNotHaveCount( + this IThat> subject, int unexpected) + { + ExpectationBuilder expectationBuilder = subject.Get().ExpectationBuilder; + return new AndOrResult, IThat>>( + expectationBuilder.AddConstraint((it, grammars) + => new SyncCollectionCountForEnumerableConstraint>(expectationBuilder, it, + grammars, + EnumerableQuantifier.Exactly(unexpected)).Invert()), + subject); + } +#endif } diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.HasSingle.cs b/Source/aweXpect/That/Collections/ThatEnumerable.HasSingle.cs index 242a4feac..5efa00c8d 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.HasSingle.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.HasSingle.cs @@ -37,15 +37,14 @@ public static SingleItemResult, TItem> HasSingle( /// /// Verifies that the collection contains exactly one item. /// - public static SingleItemResult HasSingle( - this IThat source) - where TEnumerable : IEnumerable + public static SingleItemResult HasSingle( + this IThat source) { PredicateOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new SingleItemResult( + return new SingleItemResult( expectationBuilder.AddConstraint((it, grammars) - => new HasSingleForEnumerableConstraint(expectationBuilder, it, grammars, + => new HasSingleForEnumerableConstraint(expectationBuilder, it, grammars, options)), options, f => diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.IsContainedIn.cs b/Source/aweXpect/That/Collections/ThatEnumerable.IsContainedIn.cs index e9160f10a..97ec495c3 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.IsContainedIn.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.IsContainedIn.cs @@ -64,16 +64,16 @@ public static partial class ThatEnumerable /// /// Verifies that the collection is contained in the provided collection. /// - public static ObjectCollectionBeContainedInResult, TItem> + public static ObjectCollectionBeContainedInResult, TItem> IsContainedIn( - this IThat source, + this IThat source, IEnumerable expected, [CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { ObjectEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionBeContainedInResult, TItem>( + return new ObjectCollectionBeContainedInResult, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), @@ -190,9 +190,9 @@ public static ObjectCollectionBeContainedInResult, IThat /// Verifies that the collection is not contained in the provided collection. /// - public static ObjectCollectionBeContainedInResult, TItem> + public static ObjectCollectionBeContainedInResult, TItem> IsNotContainedIn( - this IThat source, + this IThat source, IEnumerable unexpected, [CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") @@ -200,7 +200,7 @@ public static ObjectCollectionBeContainedInResult, IThat options = new(); CollectionMatchOptions matchOptions = new(CollectionMatchOptions.EquivalenceRelations.IsContainedIn); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionBeContainedInResult, TItem>( + return new ObjectCollectionBeContainedInResult, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.IsEqualTo.cs b/Source/aweXpect/That/Collections/ThatEnumerable.IsEqualTo.cs index 1e878165f..eb6ec04d8 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.IsEqualTo.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.IsEqualTo.cs @@ -281,16 +281,16 @@ public static partial class ThatEnumerable /// /// Verifies that the collection matches the collection. /// - public static ObjectCollectionMatchResult, TItem> + public static ObjectCollectionMatchResult, TItem> IsEqualTo( - this IThat source, + this IThat source, IEnumerable expected, [CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { ObjectEqualityOptions options = new(); CollectionMatchOptions matchOptions = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionMatchResult, TItem>( + return new ObjectCollectionMatchResult, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), @@ -631,9 +631,9 @@ public static ObjectCollectionBeContainedInResult, IThat /// Verifies that the collection does not match the collection. /// - public static ObjectCollectionMatchResult, TItem> + public static ObjectCollectionMatchResult, TItem> IsNotEqualTo( - this IThat source, + this IThat source, IEnumerable unexpected, [CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") @@ -641,7 +641,7 @@ public static ObjectCollectionBeContainedInResult, IThat options = new(); CollectionMatchOptions matchOptions = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectCollectionMatchResult, TItem>( + return new ObjectCollectionMatchResult, TItem>( expectationBuilder.AddConstraint((it, grammars) => new IsEqualToForEnumerableConstraint(expectationBuilder, it, grammars, doNotPopulateThisValue.TrimCommonWhiteSpace(), diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.IsInAscendingOrder.cs b/Source/aweXpect/That/Collections/ThatEnumerable.IsInAscendingOrder.cs index ce2270c0a..0dc10b23a 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.IsInAscendingOrder.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.IsInAscendingOrder.cs @@ -64,15 +64,14 @@ public static CollectionOrderResult, IThat /// Verifies that the collection is in ascending order. /// - public static CollectionOrderResult> - IsInAscendingOrder(this IThat source) - where TEnumerable : IEnumerable + public static CollectionOrderResult> + IsInAscendingOrder(this IThat source) { CollectionOrderOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CollectionOrderResult>( + return new CollectionOrderResult>( expectationBuilder.AddConstraint((it, grammars) - => new IsInOrderForEnumerableConstraint( + => new IsInOrderForEnumerableConstraint( expectationBuilder, it, grammars, x => x, aweXpect.SortOrder.Ascending, @@ -85,19 +84,18 @@ public static CollectionOrderResult, IThat /// Verifies that the collection is in ascending order. /// - public static CollectionOrderResult> - IsInAscendingOrder( - this IThat source, + public static CollectionOrderResult> + IsInAscendingOrder( + this IThat source, Func memberAccessor, [CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") - where TEnumerable : IEnumerable { CollectionOrderOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CollectionOrderResult>( + return new CollectionOrderResult>( expectationBuilder.AddConstraint((it, grammars) - => new IsInOrderForEnumerableConstraint( + => new IsInOrderForEnumerableConstraint( expectationBuilder, it, grammars, memberAccessor, aweXpect.SortOrder.Ascending, @@ -119,9 +117,9 @@ public static CollectionOrderResult, IThat, IThat>>( expectationBuilder.AddConstraint((it, grammars) - => new IsInOrderForEnumerableConstraint, TItem>( + => new IsInOrderForEnumerableConstraint, TItem, TItem>( expectationBuilder, it, grammars, - x => (TItem)x!, + x => x, aweXpect.SortOrder.Ascending, options, "")), @@ -146,7 +144,7 @@ public static CollectionOrderResult, IThat, IThat>>( expectationBuilder.AddConstraint((it, grammars) - => new IsInOrderConstraint( + => new IsInOrderForEnumerableConstraint, TItem, TMember>( expectationBuilder, it, grammars, memberAccessor, aweXpect.SortOrder.Ascending, @@ -206,15 +204,14 @@ public static CollectionOrderResult, IThat /// Verifies that the collection is not in ascending order. /// - public static CollectionOrderResult> - IsNotInAscendingOrder(this IThat source) - where TEnumerable : IEnumerable + public static CollectionOrderResult> + IsNotInAscendingOrder(this IThat source) { CollectionOrderOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CollectionOrderResult>( + return new CollectionOrderResult>( expectationBuilder.AddConstraint((it, grammars) - => new IsInOrderForEnumerableConstraint( + => new IsInOrderForEnumerableConstraint( expectationBuilder, it, grammars, x => x, aweXpect.SortOrder.Ascending, @@ -227,19 +224,18 @@ public static CollectionOrderResult, IThat /// Verifies that the collection is not in ascending order. /// - public static CollectionOrderResult> - IsNotInAscendingOrder( - this IThat source, + public static CollectionOrderResult> + IsNotInAscendingOrder( + this IThat source, Func memberAccessor, [CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") - where TEnumerable : IEnumerable { CollectionOrderOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CollectionOrderResult>( + return new CollectionOrderResult>( expectationBuilder.AddConstraint((it, grammars) - => new IsInOrderForEnumerableConstraint( + => new IsInOrderForEnumerableConstraint( expectationBuilder, it, grammars, memberAccessor, aweXpect.SortOrder.Ascending, @@ -260,9 +256,9 @@ public static CollectionOrderResult, IThat, IThat>>( expectationBuilder.AddConstraint((it, grammars) - => new IsInOrderForEnumerableConstraint, TItem>( + => new IsInOrderForEnumerableConstraint, TItem, TItem>( expectationBuilder, it, grammars, - x => (TItem)x!, + x => x, aweXpect.SortOrder.Ascending, options, "").Invert()), @@ -286,9 +282,9 @@ public static CollectionOrderResult, IThat, IThat>>( expectationBuilder.AddConstraint((it, grammars) - => new IsInOrderForEnumerableConstraint, TMember>( + => new IsInOrderForEnumerableConstraint, TItem, TMember>( expectationBuilder, it, grammars, - o => memberAccessor((TItem)o!), + memberAccessor, aweXpect.SortOrder.Ascending, options, $" for {doNotPopulateThisValue.TrimCommonWhiteSpace()}").Invert()), diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.IsInDescendingOrder.cs b/Source/aweXpect/That/Collections/ThatEnumerable.IsInDescendingOrder.cs index 23c39928e..d9c02bd48 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.IsInDescendingOrder.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.IsInDescendingOrder.cs @@ -64,15 +64,14 @@ public static CollectionOrderResult, IThat /// Verifies that the collection is in descending order. /// - public static CollectionOrderResult> - IsInDescendingOrder(this IThat source) - where TEnumerable : IEnumerable + public static CollectionOrderResult> + IsInDescendingOrder(this IThat source) { CollectionOrderOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CollectionOrderResult>( + return new CollectionOrderResult>( expectationBuilder.AddConstraint((it, grammars) - => new IsInOrderForEnumerableConstraint( + => new IsInOrderForEnumerableConstraint( expectationBuilder, it, grammars, x => x, aweXpect.SortOrder.Descending, @@ -85,19 +84,18 @@ public static CollectionOrderResult, IThat /// Verifies that the collection is in descending order. /// - public static CollectionOrderResult> - IsInDescendingOrder( - this IThat source, + public static CollectionOrderResult> + IsInDescendingOrder( + this IThat source, Func memberAccessor, [CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") - where TEnumerable : IEnumerable { CollectionOrderOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CollectionOrderResult>( + return new CollectionOrderResult>( expectationBuilder.AddConstraint((it, grammars) - => new IsInOrderForEnumerableConstraint( + => new IsInOrderForEnumerableConstraint( expectationBuilder, it, grammars, memberAccessor, aweXpect.SortOrder.Descending, @@ -119,9 +117,9 @@ public static CollectionOrderResult, IThat, IThat>>( expectationBuilder.AddConstraint((it, grammars) - => new IsInOrderForEnumerableConstraint, TItem>( + => new IsInOrderForEnumerableConstraint, TItem, TItem>( expectationBuilder, it, grammars, - x => (TItem)x!, + x => x, aweXpect.SortOrder.Descending, options, "")), @@ -146,7 +144,7 @@ public static CollectionOrderResult, IThat, IThat>>( expectationBuilder.AddConstraint((it, grammars) - => new IsInOrderConstraint( + => new IsInOrderForEnumerableConstraint, TItem, TMember>( expectationBuilder, it, grammars, memberAccessor, aweXpect.SortOrder.Descending, @@ -206,15 +204,14 @@ public static CollectionOrderResult, IThat /// Verifies that the collection is not in descending order. /// - public static CollectionOrderResult> - IsNotInDescendingOrder(this IThat source) - where TEnumerable : IEnumerable + public static CollectionOrderResult> + IsNotInDescendingOrder(this IThat source) { CollectionOrderOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CollectionOrderResult>( + return new CollectionOrderResult>( expectationBuilder.AddConstraint((it, grammars) - => new IsInOrderForEnumerableConstraint( + => new IsInOrderForEnumerableConstraint( expectationBuilder, it, grammars, x => x, aweXpect.SortOrder.Descending, @@ -227,19 +224,18 @@ public static CollectionOrderResult, IThat /// Verifies that the collection is not in descending order. /// - public static CollectionOrderResult> - IsNotInDescendingOrder( - this IThat source, + public static CollectionOrderResult> + IsNotInDescendingOrder( + this IThat source, Func memberAccessor, [CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") - where TEnumerable : IEnumerable { CollectionOrderOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new CollectionOrderResult>( + return new CollectionOrderResult>( expectationBuilder.AddConstraint((it, grammars) - => new IsInOrderForEnumerableConstraint( + => new IsInOrderForEnumerableConstraint( expectationBuilder, it, grammars, memberAccessor, aweXpect.SortOrder.Descending, @@ -260,9 +256,9 @@ public static CollectionOrderResult, IThat, IThat>>( expectationBuilder.AddConstraint((it, grammars) - => new IsInOrderForEnumerableConstraint, TItem>( + => new IsInOrderForEnumerableConstraint, TItem, TItem>( expectationBuilder, it, grammars, - x => (TItem)x!, + x => x, aweXpect.SortOrder.Descending, options, "").Invert()), @@ -286,9 +282,9 @@ public static CollectionOrderResult, IThat, IThat>>( expectationBuilder.AddConstraint((it, grammars) - => new IsInOrderForEnumerableConstraint, TMember>( + => new IsInOrderForEnumerableConstraint, TItem, TMember>( expectationBuilder, it, grammars, - o => memberAccessor((TItem)o!), + memberAccessor, aweXpect.SortOrder.Descending, options, $" for {doNotPopulateThisValue.TrimCommonWhiteSpace()}").Invert()), diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.LessThan.cs b/Source/aweXpect/That/Collections/ThatEnumerable.LessThan.cs index 765ce38f2..6f54a1f16 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.LessThan.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.LessThan.cs @@ -29,8 +29,8 @@ public static Elements LessThan( /// /// Verifies that in the collection less than items… /// - public static ElementsForEnumerable LessThan( - this IThat subject, + public static ElementsForEnumerable LessThan( + this IThat subject, int maximum) => new(subject, EnumerableQuantifier.LessThan(maximum, subject.Get().ExpectationBuilder.ExpectationGrammars)); diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.MoreThan.cs b/Source/aweXpect/That/Collections/ThatEnumerable.MoreThan.cs index a134e31d6..7374ff1b1 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.MoreThan.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.MoreThan.cs @@ -29,8 +29,8 @@ public static Elements MoreThan( /// /// Verifies that in the collection more than items… /// - public static ElementsForEnumerable MoreThan( - this IThat subject, + public static ElementsForEnumerable MoreThan( + this IThat subject, int minimum) => new(subject, EnumerableQuantifier.MoreThan(minimum, subject.Get().ExpectationBuilder.ExpectationGrammars)); diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.None.cs b/Source/aweXpect/That/Collections/ThatEnumerable.None.cs index 84854b0f9..6c80126fd 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.None.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.None.cs @@ -29,8 +29,8 @@ public static Elements None( /// /// Verifies that in the collection no items… /// - public static ElementsForEnumerable None( - this IThat subject) + public static ElementsForEnumerable None( + this IThat subject) => new(subject, EnumerableQuantifier.None(subject.Get().ExpectationBuilder.ExpectationGrammars | ExpectationGrammars.Plural)); diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.StartsWith.cs b/Source/aweXpect/That/Collections/ThatEnumerable.StartsWith.cs index 0b751a92d..b11fef715 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.StartsWith.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.StartsWith.cs @@ -106,17 +106,16 @@ public static partial class ThatEnumerable /// /// Verifies that the collection starts with the provided collection. /// - public static ObjectEqualityResult, TItem> - StartsWith( - this IThat source, + public static ObjectEqualityResult, TItem> + StartsWith( + this IThat source, IEnumerable expected) - where TEnumerable : IEnumerable { ObjectEqualityOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectEqualityResult, TItem>( + return new ObjectEqualityResult, TItem>( expectationBuilder.AddConstraint((it, grammars) - => new StartsWithForEnumerableConstraint(expectationBuilder, it, grammars, + => new StartsWithForEnumerableConstraint(expectationBuilder, it, grammars, Formatter.Format(expected), expected.ToArray(), options)), @@ -127,18 +126,17 @@ public static partial class ThatEnumerable /// /// Verifies that the collection starts with the provided collection. /// - public static ObjectEqualityResult, TItem> - StartsWith( - this IThat source, + public static ObjectEqualityResult, TItem> + StartsWith( + this IThat source, params TItem[] expected) - where TEnumerable : IEnumerable { _ = expected ?? throw new ArgumentNullException(nameof(expected)); ObjectEqualityOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectEqualityResult, TItem>( + return new ObjectEqualityResult, TItem>( expectationBuilder.AddConstraint((it, grammars) - => new StartsWithForEnumerableConstraint(expectationBuilder, it, grammars, + => new StartsWithForEnumerableConstraint(expectationBuilder, it, grammars, Formatter.Format(expected), expected, options)), @@ -328,17 +326,16 @@ public static ObjectEqualityResult, IThat /// Verifies that the collection does not start with the provided collection. /// - public static ObjectEqualityResult, TItem> - DoesNotStartWith( - this IThat source, + public static ObjectEqualityResult, TItem> + DoesNotStartWith( + this IThat source, IEnumerable unexpected) - where TEnumerable : IEnumerable { ObjectEqualityOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectEqualityResult, TItem>( + return new ObjectEqualityResult, TItem>( expectationBuilder.AddConstraint((it, grammars) - => new StartsWithForEnumerableConstraint(expectationBuilder, it, grammars, + => new StartsWithForEnumerableConstraint(expectationBuilder, it, grammars, Formatter.Format(unexpected), unexpected.ToArray(), options).Invert()), @@ -349,18 +346,17 @@ public static ObjectEqualityResult, IThat /// Verifies that the collection does not start with the provided collection. /// - public static ObjectEqualityResult, TItem> - DoesNotStartWith( - this IThat source, + public static ObjectEqualityResult, TItem> + DoesNotStartWith( + this IThat source, params TItem[] unexpected) - where TEnumerable : IEnumerable { _ = unexpected ?? throw new ArgumentNullException(nameof(unexpected)); ObjectEqualityOptions options = new(); ExpectationBuilder expectationBuilder = source.Get().ExpectationBuilder; - return new ObjectEqualityResult, TItem>( + return new ObjectEqualityResult, TItem>( expectationBuilder.AddConstraint((it, grammars) - => new StartsWithForEnumerableConstraint(expectationBuilder, it, grammars, + => new StartsWithForEnumerableConstraint(expectationBuilder, it, grammars, Formatter.Format(unexpected), unexpected, options).Invert()), diff --git a/Source/aweXpect/That/Collections/ThatEnumerable.cs b/Source/aweXpect/That/Collections/ThatEnumerable.cs index 33461d528..0162692b0 100644 --- a/Source/aweXpect/That/Collections/ThatEnumerable.cs +++ b/Source/aweXpect/That/Collections/ThatEnumerable.cs @@ -807,11 +807,11 @@ protected override void AppendNegatedResult(StringBuilder stringBuilder, string? => stringBuilder.Append(It).Append(" was"); } - private sealed class IsInOrderForEnumerableConstraint( + private sealed class IsInOrderForEnumerableConstraint( ExpectationBuilder expectationBuilder, string it, ExpectationGrammars grammars, - Func memberAccessor, + Func memberAccessor, SortOrder sortOrder, CollectionOrderOptions options, string memberExpression) @@ -838,7 +838,12 @@ public ConstraintResult IsMetBy(TEnumerable actual, IEvaluationContext context) IComparer comparer = options.GetComparer(); foreach (object? item in materialized) { - TMember current = memberAccessor(item); + if (item is not TItem typedItem) + { + continue; + } + + TMember current = memberAccessor(typedItem); if (index++ == 0) { previous = current; diff --git a/Tests/aweXpect.Api.Tests/Expected/aweXpect_net8.0.txt b/Tests/aweXpect.Api.Tests/Expected/aweXpect_net8.0.txt index 1d44f8be5..d6f1ce621 100644 --- a/Tests/aweXpect.Api.Tests/Expected/aweXpect_net8.0.txt +++ b/Tests/aweXpect.Api.Tests/Expected/aweXpect_net8.0.txt @@ -334,23 +334,22 @@ namespace aweXpect public static class ThatEnumerable { public static aweXpect.ThatEnumerable.Elements All(this aweXpect.Core.IThat?> subject) { } - public static aweXpect.ThatEnumerable.ElementsForEnumerable All(this aweXpect.Core.IThat subject) { } + public static aweXpect.ThatEnumerable.ElementsForEnumerable All(this aweXpect.Core.IThat subject) { } public static aweXpect.ThatEnumerable.ElementsForStructEnumerable> All(this aweXpect.Core.IThat> subject) { } public static aweXpect.ThatEnumerable.Elements All(this aweXpect.Core.IThat?> subject) { } public static aweXpect.ThatEnumerable.ElementsForStructEnumerable, TItem> All(this aweXpect.Core.IThat> subject) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> AreAllUnique(this aweXpect.Core.IThat?> source) { } + public static aweXpect.Results.ObjectEqualityResult, object?> AreAllUnique(this aweXpect.Core.IThat source) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> AreAllUnique(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> AreAllUnique(this aweXpect.Core.IThat?> source) { } - public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> AreAllUnique(this aweXpect.Core.IThat?> source) { } - public static aweXpect.Results.ObjectEqualityResult, object?> AreAllUnique(this aweXpect.Core.IThat source) - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat>, TItem> AreAllUnique(this aweXpect.Core.IThat> source) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> AreAllUnique(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> AreAllUnique(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectEqualityResult, TMember> AreAllUnique(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat>> AreAllUnique(this aweXpect.Core.IThat> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } 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 = "") { } - 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 = "") { } - public static aweXpect.Results.ObjectEqualityResult, TMember> AreAllUnique(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") - where TEnumerable : System.Collections.IEnumerable { } + 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 = "") { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> AreEqualTo(this aweXpect.ThatEnumerable.Elements elements, string? expected) { } + public static aweXpect.Results.ObjectEqualityResult, object?> AreEqualTo(this aweXpect.ThatEnumerable.ElementsForEnumerable elements, object? expected) { } public static aweXpect.Results.ToleranceEqualityResult, aweXpect.Core.IThat?>, System.DateTime, System.TimeSpan> AreEqualTo(this aweXpect.ThatEnumerable.Elements elements, System.DateTime expected) { } public static aweXpect.Results.ToleranceEqualityResult, aweXpect.Core.IThat?>, System.DateTime?, System.TimeSpan> AreEqualTo(this aweXpect.ThatEnumerable.Elements elements, System.DateTime? expected) { } public static aweXpect.Results.ToleranceEqualityResult, aweXpect.Core.IThat?>, decimal, decimal> AreEqualTo(this aweXpect.ThatEnumerable.Elements elements, decimal expected) { } @@ -359,54 +358,52 @@ namespace aweXpect public static aweXpect.Results.ToleranceEqualityResult, aweXpect.Core.IThat?>, double?, double> AreEqualTo(this aweXpect.ThatEnumerable.Elements elements, double? expected) { } public static aweXpect.Results.ToleranceEqualityResult, aweXpect.Core.IThat?>, float, float> AreEqualTo(this aweXpect.ThatEnumerable.Elements elements, float expected) { } public static aweXpect.Results.ToleranceEqualityResult, aweXpect.Core.IThat?>, float?, float> AreEqualTo(this aweXpect.ThatEnumerable.Elements elements, float? expected) { } - public static aweXpect.Results.ObjectEqualityResult, object?> AreEqualTo(this aweXpect.ThatEnumerable.ElementsForEnumerable elements, object? expected) - where TEnumerable : System.Collections.IEnumerable? { } public static aweXpect.Results.StringEqualityResult> AreEqualTo(this aweXpect.ThatEnumerable.ElementsForStructEnumerable elements, string? expected) where TEnumerable : struct, System.Collections.Generic.IEnumerable { } public static aweXpect.Results.ObjectEqualityResult?, aweXpect.Core.IThat?>, TItem> AreEqualTo(this aweXpect.ThatEnumerable.Elements elements, TItem expected) { } public static aweXpect.Results.ObjectEqualityResult, object?> AreEqualTo(this aweXpect.ThatEnumerable.ElementsForStructEnumerable elements, object? expected) where TEnumerable : struct, System.Collections.Generic.IEnumerable { } public static aweXpect.ThatEnumerable.Elements AtLeast(this aweXpect.Core.IThat?> subject, int minimum) { } - public static aweXpect.ThatEnumerable.ElementsForEnumerable AtLeast(this aweXpect.Core.IThat subject, int minimum) { } + public static aweXpect.ThatEnumerable.ElementsForEnumerable AtLeast(this aweXpect.Core.IThat subject, int minimum) { } public static aweXpect.ThatEnumerable.ElementsForStructEnumerable> AtLeast(this aweXpect.Core.IThat> subject, int minimum) { } public static aweXpect.ThatEnumerable.Elements AtLeast(this aweXpect.Core.IThat?> subject, int minimum) { } public static aweXpect.ThatEnumerable.ElementsForStructEnumerable, TItem> AtLeast(this aweXpect.Core.IThat> subject, int minimum) { } public static aweXpect.ThatEnumerable.Elements AtMost(this aweXpect.Core.IThat?> subject, int maximum) { } - public static aweXpect.ThatEnumerable.ElementsForEnumerable AtMost(this aweXpect.Core.IThat subject, int maximum) { } + public static aweXpect.ThatEnumerable.ElementsForEnumerable AtMost(this aweXpect.Core.IThat subject, int maximum) { } public static aweXpect.ThatEnumerable.ElementsForStructEnumerable> AtMost(this aweXpect.Core.IThat> subject, int maximum) { } public static aweXpect.ThatEnumerable.Elements AtMost(this aweXpect.Core.IThat?> subject, int maximum) { } public static aweXpect.ThatEnumerable.ElementsForStructEnumerable, TItem> AtMost(this aweXpect.Core.IThat> subject, int maximum) { } public static aweXpect.Results.BetweenResult Between(this aweXpect.Core.IThat?> subject, int minimum) { } - public static aweXpect.Results.BetweenResult> Between(this aweXpect.Core.IThat subject, int minimum) { } + public static aweXpect.Results.BetweenResult> Between(this aweXpect.Core.IThat subject, int minimum) { } public static aweXpect.Results.BetweenResult>> Between(this aweXpect.Core.IThat> subject, int minimum) { } public static aweXpect.Results.BetweenResult> Between(this aweXpect.Core.IThat?> subject, int minimum) { } public static aweXpect.Results.BetweenResult, TItem>> Between(this aweXpect.Core.IThat> subject, int minimum) { } public static aweXpect.Results.StringEqualityTypeCountResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, string? expected) { } - public static aweXpect.Results.ObjectCountResult, object?> Contains(this aweXpect.Core.IThat source, object? expected) { } + 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) { } 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.CountResult> Contains(this aweXpect.Core.IThat source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } + 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.StringCollectionContainResult> Contains(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } 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) { } 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.CountResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } - 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, 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.CountResult, aweXpect.Core.IThat>> Contains(this aweXpect.Core.IThat> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.StringEqualityTypeCountResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, string? unexpected) { } - public static aweXpect.Results.ObjectCountResult, object?> DoesNotContain(this aweXpect.Core.IThat source, object? unexpected) { } + 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) { } 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.CountResult> DoesNotContain(this aweXpect.Core.IThat source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } + 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.StringCollectionContainResult> DoesNotContain(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } 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) { } 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.CountResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } - 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, 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.CountResult, aweXpect.Core.IThat>> DoesNotContain(this aweXpect.Core.IThat> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> DoesNotEndWith(this aweXpect.Core.IThat?> source, params string[] unexpected) { } @@ -414,62 +411,55 @@ namespace aweXpect public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat>> DoesNotEndWith(this aweXpect.Core.IThat> source, params string[] unexpected) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> DoesNotEndWith(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> DoesNotEndWith(this aweXpect.Core.IThat?> source, params TItem[] unexpected) { } + public static aweXpect.Results.ObjectEqualityResult, TItem> DoesNotEndWith(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected) { } + public static aweXpect.Results.ObjectEqualityResult, TItem> DoesNotEndWith(this aweXpect.Core.IThat source, params TItem[] unexpected) { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat>, TItem> DoesNotEndWith(this aweXpect.Core.IThat> source, params TItem[] unexpected) { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> DoesNotEndWith(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat>, TItem> DoesNotEndWith(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectEqualityResult, TItem> DoesNotEndWith(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected) - where TEnumerable : System.Collections.IEnumerable { } - public static aweXpect.Results.ObjectEqualityResult, TItem> DoesNotEndWith(this aweXpect.Core.IThat source, params TItem[] unexpected) - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.AndOrResult> DoesNotHaveCount(this aweXpect.Core.IThat subject, int unexpected) { } public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> DoesNotHaveCount(this aweXpect.Core.IThat?> subject, int unexpected) { } - public static aweXpect.Results.AndOrResult> DoesNotHaveCount(this aweXpect.Core.IThat subject, int unexpected) - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat>> DoesNotHaveCount(this aweXpect.Core.IThat> subject, int unexpected) { } public static aweXpect.Results.AndOrResult> DoesNotHaveCount(this aweXpect.Core.IThat subject, int unexpected) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> DoesNotStartWith(this aweXpect.Core.IThat?> source, params string[] unexpected) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat>> DoesNotStartWith(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat>> DoesNotStartWith(this aweXpect.Core.IThat> source, params string[] unexpected) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> DoesNotStartWith(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> DoesNotStartWith(this aweXpect.Core.IThat?> source, params TItem[] unexpected) { } + public static aweXpect.Results.ObjectEqualityResult, TItem> DoesNotStartWith(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected) { } + public static aweXpect.Results.ObjectEqualityResult, TItem> DoesNotStartWith(this aweXpect.Core.IThat source, params TItem[] unexpected) { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat>, TItem> DoesNotStartWith(this aweXpect.Core.IThat> source, params TItem[] unexpected) { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> DoesNotStartWith(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat>, TItem> DoesNotStartWith(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectEqualityResult, TItem> DoesNotStartWith(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected) - where TEnumerable : System.Collections.IEnumerable { } - public static aweXpect.Results.ObjectEqualityResult, TItem> DoesNotStartWith(this aweXpect.Core.IThat source, params TItem[] unexpected) - where TEnumerable : System.Collections.IEnumerable { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> EndsWith(this aweXpect.Core.IThat?> source, params string[] expected) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat>> EndsWith(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat>> EndsWith(this aweXpect.Core.IThat> source, params string[] expected) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> EndsWith(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> EndsWith(this aweXpect.Core.IThat?> source, params TItem[] expected) { } + public static aweXpect.Results.ObjectEqualityResult, TItem> EndsWith(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected) { } + public static aweXpect.Results.ObjectEqualityResult, TItem> EndsWith(this aweXpect.Core.IThat source, params TItem[] expected) { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat>, TItem> EndsWith(this aweXpect.Core.IThat> source, params TItem[] expected) { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> EndsWith(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat>, TItem> EndsWith(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectEqualityResult, TItem> EndsWith(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected) - where TEnumerable : System.Collections.IEnumerable { } - public static aweXpect.Results.ObjectEqualityResult, TItem> EndsWith(this aweXpect.Core.IThat source, params TItem[] expected) - where TEnumerable : System.Collections.IEnumerable { } public static aweXpect.ThatEnumerable.Elements Exactly(this aweXpect.Core.IThat?> subject, int expected) { } - public static aweXpect.ThatEnumerable.ElementsForEnumerable Exactly(this aweXpect.Core.IThat subject, int expected) { } + public static aweXpect.ThatEnumerable.ElementsForEnumerable Exactly(this aweXpect.Core.IThat subject, int expected) { } public static aweXpect.ThatEnumerable.ElementsForStructEnumerable> Exactly(this aweXpect.Core.IThat> subject, int expected) { } 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) { } + public static aweXpect.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) { } + public static aweXpect.Results.AndOrResult> HasCount(this aweXpect.Core.IThat subject, int expected) { } public static aweXpect.CollectionCountResult, aweXpect.Core.IThat?>>> HasCount(this aweXpect.Core.IThat?> subject) { } - public static aweXpect.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.CollectionCountResult, aweXpect.Core.IThat>>> HasCount(this aweXpect.Core.IThat> subject) { } public static aweXpect.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) { } public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> HasCount(this aweXpect.Core.IThat?> subject, int expected) { } - public static aweXpect.Results.AndOrResult> HasCount(this aweXpect.Core.IThat subject, int expected) - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat>> HasCount(this aweXpect.Core.IThat> subject, int expected) { } public static aweXpect.Results.AndOrResult> HasCount(this aweXpect.Core.IThat subject, int expected) { } + public static aweXpect.Results.SingleItemResult HasSingle(this aweXpect.Core.IThat source) { } public static aweXpect.Results.SingleItemResult, TItem> HasSingle(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.SingleItemResult, TItem> HasSingle(this aweXpect.Core.IThat> source) { } - public static aweXpect.Results.SingleItemResult HasSingle(this aweXpect.Core.IThat source) - where TEnumerable : System.Collections.IEnumerable { } 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.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.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, 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.AndOrResult, aweXpect.Core.IThat?>> IsEmpty(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.AndOrResult> IsEmpty(this aweXpect.Core.IThat source) @@ -485,28 +475,24 @@ namespace aweXpect 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.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.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.CollectionOrderResult> IsInAscendingOrder(this aweXpect.Core.IThat source) { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsInAscendingOrder(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat>> IsInAscendingOrder(this aweXpect.Core.IThat> source) { } - public static aweXpect.Results.CollectionOrderResult> IsInAscendingOrder(this aweXpect.Core.IThat source) - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.CollectionOrderResult> IsInAscendingOrder(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsInAscendingOrder(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat>> IsInAscendingOrder(this aweXpect.Core.IThat> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.CollectionOrderResult> IsInAscendingOrder(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.CollectionOrderResult> IsInDescendingOrder(this aweXpect.Core.IThat source) { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsInDescendingOrder(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat>> IsInDescendingOrder(this aweXpect.Core.IThat> source) { } - public static aweXpect.Results.CollectionOrderResult> IsInDescendingOrder(this aweXpect.Core.IThat source) - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.CollectionOrderResult> 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 = "") { } 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> IsInDescendingOrder(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") - where TEnumerable : System.Collections.IEnumerable { } 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.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.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, 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.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 = "") { } @@ -520,36 +506,32 @@ namespace aweXpect 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.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.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.CollectionOrderResult> IsNotInAscendingOrder(this aweXpect.Core.IThat source) { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsNotInAscendingOrder(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat>> IsNotInAscendingOrder(this aweXpect.Core.IThat> source) { } - public static aweXpect.Results.CollectionOrderResult> IsNotInAscendingOrder(this aweXpect.Core.IThat source) - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.CollectionOrderResult> IsNotInAscendingOrder(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsNotInAscendingOrder(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat>> IsNotInAscendingOrder(this aweXpect.Core.IThat> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.CollectionOrderResult> IsNotInAscendingOrder(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.CollectionOrderResult> IsNotInDescendingOrder(this aweXpect.Core.IThat source) { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsNotInDescendingOrder(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat>> IsNotInDescendingOrder(this aweXpect.Core.IThat> source) { } - public static aweXpect.Results.CollectionOrderResult> IsNotInDescendingOrder(this aweXpect.Core.IThat source) - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.CollectionOrderResult> IsNotInDescendingOrder(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsNotInDescendingOrder(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat>> IsNotInDescendingOrder(this aweXpect.Core.IThat> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.CollectionOrderResult> IsNotInDescendingOrder(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") - where TEnumerable : System.Collections.IEnumerable { } public static aweXpect.ThatEnumerable.Elements LessThan(this aweXpect.Core.IThat?> subject, int maximum) { } - public static aweXpect.ThatEnumerable.ElementsForEnumerable LessThan(this aweXpect.Core.IThat subject, int maximum) { } + public static aweXpect.ThatEnumerable.ElementsForEnumerable LessThan(this aweXpect.Core.IThat subject, int maximum) { } public static aweXpect.ThatEnumerable.ElementsForStructEnumerable> LessThan(this aweXpect.Core.IThat> subject, int maximum) { } public static aweXpect.ThatEnumerable.Elements LessThan(this aweXpect.Core.IThat?> subject, int maximum) { } public static aweXpect.ThatEnumerable.ElementsForStructEnumerable, TItem> LessThan(this aweXpect.Core.IThat> subject, int maximum) { } public static aweXpect.ThatEnumerable.Elements MoreThan(this aweXpect.Core.IThat?> subject, int minimum) { } - public static aweXpect.ThatEnumerable.ElementsForEnumerable MoreThan(this aweXpect.Core.IThat subject, int minimum) { } + public static aweXpect.ThatEnumerable.ElementsForEnumerable MoreThan(this aweXpect.Core.IThat subject, int minimum) { } public static aweXpect.ThatEnumerable.ElementsForStructEnumerable> MoreThan(this aweXpect.Core.IThat> subject, int minimum) { } public static aweXpect.ThatEnumerable.Elements MoreThan(this aweXpect.Core.IThat?> subject, int minimum) { } public static aweXpect.ThatEnumerable.ElementsForStructEnumerable, TItem> MoreThan(this aweXpect.Core.IThat> subject, int minimum) { } public static aweXpect.ThatEnumerable.Elements None(this aweXpect.Core.IThat?> subject) { } - public static aweXpect.ThatEnumerable.ElementsForEnumerable None(this aweXpect.Core.IThat subject) { } + public static aweXpect.ThatEnumerable.ElementsForEnumerable None(this aweXpect.Core.IThat subject) { } public static aweXpect.ThatEnumerable.ElementsForStructEnumerable> None(this aweXpect.Core.IThat> subject) { } public static aweXpect.ThatEnumerable.Elements None(this aweXpect.Core.IThat?> subject) { } public static aweXpect.ThatEnumerable.ElementsForStructEnumerable, TItem> None(this aweXpect.Core.IThat> subject) { } @@ -558,13 +540,11 @@ namespace aweXpect public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat>> StartsWith(this aweXpect.Core.IThat> source, params string[] expected) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> StartsWith(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> StartsWith(this aweXpect.Core.IThat?> source, params TItem[] expected) { } + public static aweXpect.Results.ObjectEqualityResult, TItem> StartsWith(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected) { } + public static aweXpect.Results.ObjectEqualityResult, TItem> StartsWith(this aweXpect.Core.IThat source, params TItem[] expected) { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat>, TItem> StartsWith(this aweXpect.Core.IThat> source, params TItem[] expected) { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> StartsWith(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat>, TItem> StartsWith(this aweXpect.Core.IThat> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectEqualityResult, TItem> StartsWith(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected) - where TEnumerable : System.Collections.IEnumerable { } - public static aweXpect.Results.ObjectEqualityResult, TItem> StartsWith(this aweXpect.Core.IThat source, params TItem[] expected) - where TEnumerable : System.Collections.IEnumerable { } public class Elements : aweXpect.ThatEnumerable.IElements { public aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> Satisfy(System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } @@ -584,11 +564,11 @@ namespace aweXpect { public aweXpect.Results.ObjectEqualityResult, object?> Are(System.Type type) { } public aweXpect.Results.ObjectEqualityResult, object?> Are() { } - public aweXpect.Results.ObjectEqualityResult, object?> AreEquivalentTo(TExpected expected, System.Func, aweXpect.Equivalency.EquivalencyOptions>? options = null, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public aweXpect.Results.ObjectEqualityResult, object?> AreEquivalentTo(TExpected expected, System.Func, aweXpect.Equivalency.EquivalencyOptions>? options = null, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public aweXpect.Results.ObjectEqualityResult, object?> AreExactly(System.Type type) { } public aweXpect.Results.ObjectEqualityResult, object?> AreExactly() { } - public aweXpect.Results.ObjectEqualityResult, object?> ComplyWith(System.Action> expectations) { } - public aweXpect.Results.AndOrResult> Satisfy(System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } + public aweXpect.Results.ObjectEqualityResult, object?> ComplyWith(System.Action> expectations) { } + public aweXpect.Results.AndOrResult> Satisfy(System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } } public class ElementsForStructEnumerable : aweXpect.ThatEnumerable.IElementsForStructEnumerable where TEnumerable : struct, System.Collections.Generic.IEnumerable diff --git a/Tests/aweXpect.Api.Tests/Expected/aweXpect_netstandard2.0.txt b/Tests/aweXpect.Api.Tests/Expected/aweXpect_netstandard2.0.txt index 906fd9c4c..500db24be 100644 --- a/Tests/aweXpect.Api.Tests/Expected/aweXpect_netstandard2.0.txt +++ b/Tests/aweXpect.Api.Tests/Expected/aweXpect_netstandard2.0.txt @@ -185,17 +185,16 @@ namespace aweXpect public static class ThatEnumerable { public static aweXpect.ThatEnumerable.Elements All(this aweXpect.Core.IThat?> subject) { } - public static aweXpect.ThatEnumerable.ElementsForEnumerable All(this aweXpect.Core.IThat subject) { } + public static aweXpect.ThatEnumerable.ElementsForEnumerable All(this aweXpect.Core.IThat subject) { } public static aweXpect.ThatEnumerable.Elements All(this aweXpect.Core.IThat?> subject) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> AreAllUnique(this aweXpect.Core.IThat?> source) { } + public static aweXpect.Results.ObjectEqualityResult, object?> AreAllUnique(this aweXpect.Core.IThat source) { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> AreAllUnique(this aweXpect.Core.IThat?> source) { } - public static aweXpect.Results.ObjectEqualityResult, object?> AreAllUnique(this aweXpect.Core.IThat source) - where TEnumerable : System.Collections.IEnumerable { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> AreAllUnique(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.ObjectEqualityResult, TMember> AreAllUnique(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } 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 = "") { } - public static aweXpect.Results.ObjectEqualityResult, TMember> AreAllUnique(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") - where TEnumerable : System.Collections.IEnumerable { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> AreEqualTo(this aweXpect.ThatEnumerable.Elements elements, string? expected) { } + public static aweXpect.Results.ObjectEqualityResult, object?> AreEqualTo(this aweXpect.ThatEnumerable.ElementsForEnumerable elements, object? expected) { } public static aweXpect.Results.ToleranceEqualityResult, aweXpect.Core.IThat?>, System.DateTime, System.TimeSpan> AreEqualTo(this aweXpect.ThatEnumerable.Elements elements, System.DateTime expected) { } public static aweXpect.Results.ToleranceEqualityResult, aweXpect.Core.IThat?>, System.DateTime?, System.TimeSpan> AreEqualTo(this aweXpect.ThatEnumerable.Elements elements, System.DateTime? expected) { } public static aweXpect.Results.ToleranceEqualityResult, aweXpect.Core.IThat?>, decimal, decimal> AreEqualTo(this aweXpect.ThatEnumerable.Elements elements, decimal expected) { } @@ -204,85 +203,73 @@ namespace aweXpect public static aweXpect.Results.ToleranceEqualityResult, aweXpect.Core.IThat?>, double?, double> AreEqualTo(this aweXpect.ThatEnumerable.Elements elements, double? expected) { } public static aweXpect.Results.ToleranceEqualityResult, aweXpect.Core.IThat?>, float, float> AreEqualTo(this aweXpect.ThatEnumerable.Elements elements, float expected) { } public static aweXpect.Results.ToleranceEqualityResult, aweXpect.Core.IThat?>, float?, float> AreEqualTo(this aweXpect.ThatEnumerable.Elements elements, float? expected) { } - public static aweXpect.Results.ObjectEqualityResult, object?> AreEqualTo(this aweXpect.ThatEnumerable.ElementsForEnumerable elements, object? expected) - where TEnumerable : System.Collections.IEnumerable? { } public static aweXpect.Results.StringEqualityResult> AreEqualTo(this aweXpect.ThatEnumerable.ElementsForStructEnumerable elements, string? expected) where TEnumerable : struct, System.Collections.Generic.IEnumerable { } public static aweXpect.Results.ObjectEqualityResult?, aweXpect.Core.IThat?>, TItem> AreEqualTo(this aweXpect.ThatEnumerable.Elements elements, TItem expected) { } public static aweXpect.Results.ObjectEqualityResult, object?> AreEqualTo(this aweXpect.ThatEnumerable.ElementsForStructEnumerable elements, object? expected) where TEnumerable : struct, System.Collections.Generic.IEnumerable { } public static aweXpect.ThatEnumerable.Elements AtLeast(this aweXpect.Core.IThat?> subject, int minimum) { } - public static aweXpect.ThatEnumerable.ElementsForEnumerable AtLeast(this aweXpect.Core.IThat subject, int minimum) { } + public static aweXpect.ThatEnumerable.ElementsForEnumerable AtLeast(this aweXpect.Core.IThat subject, int minimum) { } public static aweXpect.ThatEnumerable.Elements AtLeast(this aweXpect.Core.IThat?> subject, int minimum) { } public static aweXpect.ThatEnumerable.Elements AtMost(this aweXpect.Core.IThat?> subject, int maximum) { } - public static aweXpect.ThatEnumerable.ElementsForEnumerable AtMost(this aweXpect.Core.IThat subject, int maximum) { } + public static aweXpect.ThatEnumerable.ElementsForEnumerable AtMost(this aweXpect.Core.IThat subject, int maximum) { } public static aweXpect.ThatEnumerable.Elements AtMost(this aweXpect.Core.IThat?> subject, int maximum) { } public static aweXpect.Results.BetweenResult Between(this aweXpect.Core.IThat?> subject, int minimum) { } - public static aweXpect.Results.BetweenResult> Between(this aweXpect.Core.IThat subject, int minimum) { } + public static aweXpect.Results.BetweenResult> Between(this aweXpect.Core.IThat subject, int minimum) { } public static aweXpect.Results.BetweenResult> Between(this aweXpect.Core.IThat?> subject, int minimum) { } public static aweXpect.Results.StringEqualityTypeCountResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, string? expected) { } - public static aweXpect.Results.ObjectCountResult, object?> Contains(this aweXpect.Core.IThat source, object? expected) { } + public static aweXpect.Results.ObjectCountResult, object?> Contains(this aweXpect.Core.IThat source, object? expected) { } 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.CountResult> Contains(this aweXpect.Core.IThat source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } + 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> Contains(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectCountResult, aweXpect.Core.IThat?>, TItem> Contains(this aweXpect.Core.IThat?> source, TItem expected) { } 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.CountResult, aweXpect.Core.IThat?>> Contains(this aweXpect.Core.IThat?> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } - 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, TItem> Contains(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.StringEqualityTypeCountResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, string? unexpected) { } - public static aweXpect.Results.ObjectCountResult, object?> DoesNotContain(this aweXpect.Core.IThat source, object? unexpected) { } + public static aweXpect.Results.ObjectCountResult, object?> DoesNotContain(this aweXpect.Core.IThat source, object? unexpected) { } 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.CountResult> DoesNotContain(this aweXpect.Core.IThat source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } + 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> DoesNotContain(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectCountResult, aweXpect.Core.IThat?>, TItem> DoesNotContain(this aweXpect.Core.IThat?> source, TItem unexpected) { } 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.CountResult, aweXpect.Core.IThat?>> DoesNotContain(this aweXpect.Core.IThat?> source, System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } - 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, TItem> DoesNotContain(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> DoesNotEndWith(this aweXpect.Core.IThat?> source, params string[] unexpected) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> DoesNotEndWith(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> DoesNotEndWith(this aweXpect.Core.IThat?> source, params TItem[] unexpected) { } + public static aweXpect.Results.ObjectEqualityResult, TItem> DoesNotEndWith(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected) { } + public static aweXpect.Results.ObjectEqualityResult, TItem> DoesNotEndWith(this aweXpect.Core.IThat source, params TItem[] unexpected) { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> DoesNotEndWith(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectEqualityResult, TItem> DoesNotEndWith(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected) - where TEnumerable : System.Collections.IEnumerable { } - public static aweXpect.Results.ObjectEqualityResult, TItem> DoesNotEndWith(this aweXpect.Core.IThat source, params TItem[] unexpected) - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.AndOrResult> DoesNotHaveCount(this aweXpect.Core.IThat subject, int unexpected) { } public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> DoesNotHaveCount(this aweXpect.Core.IThat?> subject, int unexpected) { } - public static aweXpect.Results.AndOrResult> DoesNotHaveCount(this aweXpect.Core.IThat subject, int unexpected) - where TEnumerable : System.Collections.IEnumerable { } public static aweXpect.Results.AndOrResult> DoesNotHaveCount(this aweXpect.Core.IThat subject, int unexpected) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> DoesNotStartWith(this aweXpect.Core.IThat?> source, params string[] unexpected) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> DoesNotStartWith(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> DoesNotStartWith(this aweXpect.Core.IThat?> source, params TItem[] unexpected) { } + public static aweXpect.Results.ObjectEqualityResult, TItem> DoesNotStartWith(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected) { } + public static aweXpect.Results.ObjectEqualityResult, TItem> DoesNotStartWith(this aweXpect.Core.IThat source, params TItem[] unexpected) { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> DoesNotStartWith(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectEqualityResult, TItem> DoesNotStartWith(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected) - where TEnumerable : System.Collections.IEnumerable { } - public static aweXpect.Results.ObjectEqualityResult, TItem> DoesNotStartWith(this aweXpect.Core.IThat source, params TItem[] unexpected) - where TEnumerable : System.Collections.IEnumerable { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> EndsWith(this aweXpect.Core.IThat?> source, params string[] expected) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> EndsWith(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> EndsWith(this aweXpect.Core.IThat?> source, params TItem[] expected) { } + public static aweXpect.Results.ObjectEqualityResult, TItem> EndsWith(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected) { } + public static aweXpect.Results.ObjectEqualityResult, TItem> EndsWith(this aweXpect.Core.IThat source, params TItem[] expected) { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> EndsWith(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectEqualityResult, TItem> EndsWith(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected) - where TEnumerable : System.Collections.IEnumerable { } - public static aweXpect.Results.ObjectEqualityResult, TItem> EndsWith(this aweXpect.Core.IThat source, params TItem[] expected) - where TEnumerable : System.Collections.IEnumerable { } public static aweXpect.ThatEnumerable.Elements Exactly(this aweXpect.Core.IThat?> subject, int expected) { } - public static aweXpect.ThatEnumerable.ElementsForEnumerable Exactly(this aweXpect.Core.IThat subject, int expected) { } + public static aweXpect.ThatEnumerable.ElementsForEnumerable Exactly(this aweXpect.Core.IThat subject, int expected) { } public static aweXpect.ThatEnumerable.Elements Exactly(this aweXpect.Core.IThat?> subject, int expected) { } + public static aweXpect.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) { } + public static aweXpect.Results.AndOrResult> HasCount(this aweXpect.Core.IThat subject, int expected) { } public static aweXpect.CollectionCountResult, aweXpect.Core.IThat?>>> HasCount(this aweXpect.Core.IThat?> subject) { } - public static aweXpect.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) - where TEnumerable : System.Collections.IEnumerable { } public static aweXpect.CollectionCountResult>> HasCount(this aweXpect.Core.IThat subject) { } public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> HasCount(this aweXpect.Core.IThat?> subject, int expected) { } - public static aweXpect.Results.AndOrResult> HasCount(this aweXpect.Core.IThat subject, int expected) - where TEnumerable : System.Collections.IEnumerable { } public static aweXpect.Results.AndOrResult> HasCount(this aweXpect.Core.IThat subject, int expected) { } + public static aweXpect.Results.SingleItemResult HasSingle(this aweXpect.Core.IThat source) { } public static aweXpect.Results.SingleItemResult, TItem> HasSingle(this aweXpect.Core.IThat?> source) { } - public static aweXpect.Results.SingleItemResult HasSingle(this aweXpect.Core.IThat source) - where TEnumerable : System.Collections.IEnumerable { } 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.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.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, TItem> IsContainedIn(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> IsEmpty(this aweXpect.Core.IThat?> source) { } public static aweXpect.Results.AndOrResult> IsEmpty(this aweXpect.Core.IThat source) where TEnumerable : System.Collections.IEnumerable { } @@ -296,22 +283,18 @@ 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.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.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.ObjectCollectionMatchResult, TItem> IsEqualTo(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.CollectionOrderResult> IsInAscendingOrder(this aweXpect.Core.IThat source) { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsInAscendingOrder(this aweXpect.Core.IThat?> source) { } - public static aweXpect.Results.CollectionOrderResult> IsInAscendingOrder(this aweXpect.Core.IThat source) - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.CollectionOrderResult> IsInAscendingOrder(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsInAscendingOrder(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.CollectionOrderResult> IsInAscendingOrder(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.CollectionOrderResult> IsInDescendingOrder(this aweXpect.Core.IThat source) { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsInDescendingOrder(this aweXpect.Core.IThat?> source) { } - public static aweXpect.Results.CollectionOrderResult> IsInDescendingOrder(this aweXpect.Core.IThat source) - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.CollectionOrderResult> 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 = "") { } - public static aweXpect.Results.CollectionOrderResult> IsInDescendingOrder(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") - where TEnumerable : System.Collections.IEnumerable { } 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.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.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, TItem> IsNotContainedIn(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } 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 = "") { } 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 = "") { } @@ -323,36 +306,30 @@ 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.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.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.ObjectCollectionMatchResult, TItem> IsNotEqualTo(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable unexpected, [System.Runtime.CompilerServices.CallerArgumentExpression("unexpected")] string doNotPopulateThisValue = "") { } + public static aweXpect.Results.CollectionOrderResult> IsNotInAscendingOrder(this aweXpect.Core.IThat source) { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsNotInAscendingOrder(this aweXpect.Core.IThat?> source) { } - public static aweXpect.Results.CollectionOrderResult> IsNotInAscendingOrder(this aweXpect.Core.IThat source) - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.CollectionOrderResult> IsNotInAscendingOrder(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsNotInAscendingOrder(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.CollectionOrderResult> IsNotInAscendingOrder(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.CollectionOrderResult> IsNotInDescendingOrder(this aweXpect.Core.IThat source) { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsNotInDescendingOrder(this aweXpect.Core.IThat?> source) { } - public static aweXpect.Results.CollectionOrderResult> IsNotInDescendingOrder(this aweXpect.Core.IThat source) - where TEnumerable : System.Collections.IEnumerable { } + public static aweXpect.Results.CollectionOrderResult> IsNotInDescendingOrder(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.CollectionOrderResult, aweXpect.Core.IThat?>> IsNotInDescendingOrder(this aweXpect.Core.IThat?> source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.CollectionOrderResult> IsNotInDescendingOrder(this aweXpect.Core.IThat source, System.Func memberAccessor, [System.Runtime.CompilerServices.CallerArgumentExpression("memberAccessor")] string doNotPopulateThisValue = "") - where TEnumerable : System.Collections.IEnumerable { } public static aweXpect.ThatEnumerable.Elements LessThan(this aweXpect.Core.IThat?> subject, int maximum) { } - public static aweXpect.ThatEnumerable.ElementsForEnumerable LessThan(this aweXpect.Core.IThat subject, int maximum) { } + public static aweXpect.ThatEnumerable.ElementsForEnumerable LessThan(this aweXpect.Core.IThat subject, int maximum) { } public static aweXpect.ThatEnumerable.Elements LessThan(this aweXpect.Core.IThat?> subject, int maximum) { } public static aweXpect.ThatEnumerable.Elements MoreThan(this aweXpect.Core.IThat?> subject, int minimum) { } - public static aweXpect.ThatEnumerable.ElementsForEnumerable MoreThan(this aweXpect.Core.IThat subject, int minimum) { } + public static aweXpect.ThatEnumerable.ElementsForEnumerable MoreThan(this aweXpect.Core.IThat subject, int minimum) { } public static aweXpect.ThatEnumerable.Elements MoreThan(this aweXpect.Core.IThat?> subject, int minimum) { } public static aweXpect.ThatEnumerable.Elements None(this aweXpect.Core.IThat?> subject) { } - public static aweXpect.ThatEnumerable.ElementsForEnumerable None(this aweXpect.Core.IThat subject) { } + public static aweXpect.ThatEnumerable.ElementsForEnumerable None(this aweXpect.Core.IThat subject) { } public static aweXpect.ThatEnumerable.Elements None(this aweXpect.Core.IThat?> subject) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> StartsWith(this aweXpect.Core.IThat?> source, params string[] expected) { } public static aweXpect.Results.StringEqualityResult, aweXpect.Core.IThat?>> StartsWith(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> StartsWith(this aweXpect.Core.IThat?> source, params TItem[] expected) { } + public static aweXpect.Results.ObjectEqualityResult, TItem> StartsWith(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected) { } + public static aweXpect.Results.ObjectEqualityResult, TItem> StartsWith(this aweXpect.Core.IThat source, params TItem[] expected) { } public static aweXpect.Results.ObjectEqualityResult, aweXpect.Core.IThat?>, TItem> StartsWith(this aweXpect.Core.IThat?> source, System.Collections.Generic.IEnumerable expected, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } - public static aweXpect.Results.ObjectEqualityResult, TItem> StartsWith(this aweXpect.Core.IThat source, System.Collections.Generic.IEnumerable expected) - where TEnumerable : System.Collections.IEnumerable { } - public static aweXpect.Results.ObjectEqualityResult, TItem> StartsWith(this aweXpect.Core.IThat source, params TItem[] expected) - where TEnumerable : System.Collections.IEnumerable { } public class Elements : aweXpect.ThatEnumerable.IElements { public aweXpect.Results.AndOrResult, aweXpect.Core.IThat?>> Satisfy(System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } @@ -372,11 +349,11 @@ namespace aweXpect { public aweXpect.Results.ObjectEqualityResult, object?> Are(System.Type type) { } public aweXpect.Results.ObjectEqualityResult, object?> Are() { } - public aweXpect.Results.ObjectEqualityResult, object?> AreEquivalentTo(TExpected expected, System.Func, aweXpect.Equivalency.EquivalencyOptions>? options = null, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } + public aweXpect.Results.ObjectEqualityResult, object?> AreEquivalentTo(TExpected expected, System.Func, aweXpect.Equivalency.EquivalencyOptions>? options = null, [System.Runtime.CompilerServices.CallerArgumentExpression("expected")] string doNotPopulateThisValue = "") { } public aweXpect.Results.ObjectEqualityResult, object?> AreExactly(System.Type type) { } public aweXpect.Results.ObjectEqualityResult, object?> AreExactly() { } - public aweXpect.Results.ObjectEqualityResult, object?> ComplyWith(System.Action> expectations) { } - public aweXpect.Results.AndOrResult> Satisfy(System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } + public aweXpect.Results.ObjectEqualityResult, object?> ComplyWith(System.Action> expectations) { } + public aweXpect.Results.AndOrResult> Satisfy(System.Func predicate, [System.Runtime.CompilerServices.CallerArgumentExpression("predicate")] string doNotPopulateThisValue = "") { } } public class ElementsForStructEnumerable : aweXpect.ThatEnumerable.IElementsForStructEnumerable where TEnumerable : struct, System.Collections.Generic.IEnumerable diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.All.AreEquivalentTo.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.All.AreEquivalentTo.EnumerableTests.cs index 924a24139..b25c57375 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.All.AreEquivalentTo.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.All.AreEquivalentTo.EnumerableTests.cs @@ -142,7 +142,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).All().AreEquivalentTo(constantValue); + => await That(subject)!.All().AreEquivalentTo(constantValue); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.All.ComplyWith.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.All.ComplyWith.EnumerableTests.cs index 38de2fecf..d83ad8198 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.All.ComplyWith.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.All.ComplyWith.EnumerableTests.cs @@ -107,7 +107,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).All().ComplyWith(x => x.IsEqualTo(0)); + => await That(subject)!.All().ComplyWith(x => x.IsEqualTo(0)); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.All.Satisfy.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.All.Satisfy.EnumerableTests.cs index 676566312..7bb335548 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.All.Satisfy.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.All.Satisfy.EnumerableTests.cs @@ -158,7 +158,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).All().Satisfy(x => (int?)x == 0); + => await That(subject)!.All().Satisfy(x => (int?)x == 0); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.AreAllUnique.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.AreAllUnique.EnumerableTests.cs index 779f9878e..24931fdeb 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.AreAllUnique.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.AreAllUnique.EnumerableTests.cs @@ -80,7 +80,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).AreAllUnique(); + => await That(subject)!.AreAllUnique(); await That(Act).Throws() .WithMessage(""" @@ -238,7 +238,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).AreAllUnique(x => (x as MyClass)?.Value); + => await That(subject)!.AreAllUnique(x => (x as MyClass)?.Value); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.AtLeast.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.AtLeast.EnumerableTests.cs index 5a0620987..ff3f3ad7b 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.AtLeast.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.AtLeast.EnumerableTests.cs @@ -104,7 +104,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).AtLeast(1).AreEqualTo(0); + => await That(subject)!.AtLeast(1).AreEqualTo(0); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.AtMost.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.AtMost.EnumerableTests.cs index cd7a7c5df..a4f45e5a7 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.AtMost.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.AtMost.EnumerableTests.cs @@ -178,7 +178,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).AtMost(1).AreEqualTo(0); + => await That(subject)!.AtMost(1).AreEqualTo(0); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.Between.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.Between.EnumerableTests.cs index f650bd6f4..b53b90a76 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.Between.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.Between.EnumerableTests.cs @@ -152,7 +152,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).Between(0).And(1).AreEqualTo(0); + => await That(subject)!.Between(0).And(1).AreEqualTo(0); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.Contains.CollectionEnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.Contains.CollectionEnumerableTests.cs index 1bf58daf1..ba0615b91 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.Contains.CollectionEnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.Contains.CollectionEnumerableTests.cs @@ -167,7 +167,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).Contains(Array.Empty()); + => await That(subject)!.Contains(Array.Empty()); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotContain.CollectionEnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotContain.CollectionEnumerableTests.cs index cf86f3e13..31f33a346 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotContain.CollectionEnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotContain.CollectionEnumerableTests.cs @@ -66,7 +66,7 @@ public async Task WhenSubjectIsNull_ShouldSucceed() IEnumerable? subject = null; async Task Act() - => await That(subject).DoesNotContain(Array.Empty()); + => await That(subject)!.DoesNotContain(Array.Empty()); await That(Act).DoesNotThrow(); } diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotEndWith.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotEndWith.EnumerableTests.cs index 82cf3bd07..761609ce6 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotEndWith.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotEndWith.EnumerableTests.cs @@ -115,7 +115,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).DoesNotEndWith(0); + => await That(subject)!.DoesNotEndWith(0); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotEndWith.Tests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotEndWith.Tests.cs index 8b769a015..71b324ed6 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotEndWith.Tests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotEndWith.Tests.cs @@ -118,7 +118,7 @@ async Task Act() await That(Act).Throws() .WithMessage(""" Expected that subject - does not end with ["bar", "baz"], + does not end with unexpected, but it did end with [ "bar", "baz" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotHaveCount.ImmutableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotHaveCount.ImmutableTests.cs index 2a6fc28c5..5fd3bb32d 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotHaveCount.ImmutableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotHaveCount.ImmutableTests.cs @@ -112,7 +112,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).DoesNotHaveCount(2); + => await That(subject)!.DoesNotHaveCount(2); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotStartWith.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotStartWith.EnumerableTests.cs index 49299ff3d..0f1467fe0 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotStartWith.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotStartWith.EnumerableTests.cs @@ -103,7 +103,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).DoesNotStartWith(0); + => await That(subject)!.DoesNotStartWith(0); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotStartWith.ImmutableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotStartWith.ImmutableTests.cs index e6e22d52f..0b6746d05 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotStartWith.ImmutableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotStartWith.ImmutableTests.cs @@ -43,7 +43,7 @@ async Task Act() await That(Act).Throws() .WithMessage(""" Expected that subject - does not start with [MyClass { StringValue = "", Value = 1 }, MyClass { StringValue = "", Value = 1 }, MyClass { StringValue = "", Value = 2 }] equivalent, + does not start with unexpected equivalent, but it did start with [ MyClass { StringValue = "", diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotStartWith.Tests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotStartWith.Tests.cs index 2c97a3080..06f586ef3 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotStartWith.Tests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.DoesNotStartWith.Tests.cs @@ -64,7 +64,7 @@ async Task Act() await That(Act).Throws() .WithMessage(""" Expected that subject - does not start with [MyClass { StringValue = "", Value = 1 }, MyClass { StringValue = "", Value = 1 }, MyClass { StringValue = "", Value = 2 }] equivalent, + does not start with unexpected equivalent, but it did start with [ MyClass { StringValue = "", @@ -142,7 +142,7 @@ async Task Act() await That(Act).Throws() .WithMessage(""" Expected that subject - does not start with ["foo", "bar"], + does not start with unexpected, but it did start with [ "foo", "bar" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.EndsWith.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.EndsWith.EnumerableTests.cs index 5025dbf57..d060bdf4b 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.EndsWith.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.EndsWith.EnumerableTests.cs @@ -109,7 +109,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).EndsWith(0); + => await That(subject)!.EndsWith(0); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.EndsWith.ImmutableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.EndsWith.ImmutableTests.cs index f2d298ea4..156daf56c 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.EndsWith.ImmutableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.EndsWith.ImmutableTests.cs @@ -51,7 +51,7 @@ async Task Act() await That(Act).Throws() .WithMessage(""" Expected that subject - ends with [1, 3], + ends with expected, but it contained 2 at index 3 instead of 1 Collection: diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.EndsWith.Tests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.EndsWith.Tests.cs index 25cdcc3f0..8d2891157 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.EndsWith.Tests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.EndsWith.Tests.cs @@ -61,7 +61,7 @@ async Task Act() await That(Act).Throws() .WithMessage(""" Expected that subject - ends with [1, 3], + ends with expected, but it contained 2 at index 3 instead of 1 Collection: diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.Exactly.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.Exactly.EnumerableTests.cs index 5ca0acabf..dd257f351 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.Exactly.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.Exactly.EnumerableTests.cs @@ -153,7 +153,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).Exactly(1).AreEqualTo(0); + => await That(subject)!.Exactly(1).AreEqualTo(0); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.HasCount.ImmutableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.HasCount.ImmutableTests.cs index e94c8187e..7a748ed5e 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.HasCount.ImmutableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.HasCount.ImmutableTests.cs @@ -180,7 +180,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).HasCount(2); + => await That(subject)!.HasCount(2); await That(Act).Throws() .WithMessage(""" @@ -257,7 +257,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).HasCount().EqualTo(2); + => await That(subject)!.HasCount().EqualTo(2); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.HasSingle.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.HasSingle.EnumerableTests.cs index c8362f182..0cdf1e68e 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.HasSingle.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.HasSingle.EnumerableTests.cs @@ -106,7 +106,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).HasSingle(); + => await That(subject)!.HasSingle(); await That(Act).Throws() .WithMessage(""" @@ -228,7 +228,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).HasSingle().Matching(_ => false); + => await That(subject)!.HasSingle().Matching(_ => false); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsContainedIn.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsContainedIn.EnumerableTests.cs index 2b9571ffe..02cd51abd 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsContainedIn.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsContainedIn.EnumerableTests.cs @@ -149,7 +149,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).IsContainedIn(Array.Empty()); + => await That(subject)!.IsContainedIn(Array.Empty()); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsEqualTo.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsEqualTo.EnumerableTests.cs index 9c089c93f..4d358d74a 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsEqualTo.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsEqualTo.EnumerableTests.cs @@ -214,7 +214,7 @@ public async Task WhenSubjectAndExpectedIsNull_ShouldSucceed() IEnumerable? expected = null; async Task Act() - => await That(subject).IsEqualTo(expected!); + => await That(subject)!.IsEqualTo(expected!); await That(Act).DoesNotThrow(); } @@ -225,7 +225,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).IsEqualTo(Array.Empty()); + => await That(subject)!.IsEqualTo(Array.Empty()); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsInAscendingOrder.ImmutableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsInAscendingOrder.ImmutableTests.cs index 2d9a77e0e..c5185f92d 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsInAscendingOrder.ImmutableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsInAscendingOrder.ImmutableTests.cs @@ -239,7 +239,7 @@ public async Task WhenItemsAreSortedCorrectly_ShouldSucceed() ImmutableArray subject = [..ToEnumerable(["a", "b", "c",], x => new MyStringClass(x)),]; async Task Act() - => await That(subject).IsInAscendingOrder(x => x is MyStringClass c ? c.Value : ""); + => await That(subject).IsInAscendingOrder(x => x.Value); await That(Act).DoesNotThrow(); } diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsNotContainedIn.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsNotContainedIn.EnumerableTests.cs index 1454a6e6f..292435dac 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsNotContainedIn.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsNotContainedIn.EnumerableTests.cs @@ -81,7 +81,7 @@ public async Task WhenSubjectIsNull_ShouldSucceed() IEnumerable? subject = null; async Task Act() - => await That(subject).IsNotContainedIn(Array.Empty()); + => await That(subject)!.IsNotContainedIn(Array.Empty()); await That(Act).DoesNotThrow(); } diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsNotEqualTo.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsNotEqualTo.EnumerableTests.cs index bf2567a8f..175937ec8 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsNotEqualTo.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.IsNotEqualTo.EnumerableTests.cs @@ -78,7 +78,7 @@ public async Task WhenSubjectAndExpectedIsNull_ShouldFail() IEnumerable? unexpected = null; async Task Act() - => await That(subject).IsNotEqualTo(unexpected!); + => await That(subject)!.IsNotEqualTo(unexpected!); await That(Act).Throws() .WithMessage(""" @@ -94,7 +94,7 @@ public async Task WhenSubjectIsNull_ShouldSucceed() IEnumerable? subject = null; async Task Act() - => await That(subject).IsNotEqualTo(Array.Empty()); + => await That(subject)!.IsNotEqualTo(Array.Empty()); await That(Act).DoesNotThrow(); } diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.LessThan.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.LessThan.EnumerableTests.cs index 7c91cb111..f1c0995d6 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.LessThan.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.LessThan.EnumerableTests.cs @@ -178,7 +178,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).LessThan(1).AreEqualTo(0); + => await That(subject)!.LessThan(1).AreEqualTo(0); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.MoreThan.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.MoreThan.EnumerableTests.cs index f692c7637..f4160038c 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.MoreThan.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.MoreThan.EnumerableTests.cs @@ -107,7 +107,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).MoreThan(1).AreEqualTo(0); + => await That(subject)!.MoreThan(1).AreEqualTo(0); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.None.AreEqualTo.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.None.AreEqualTo.EnumerableTests.cs index 0afbaceed..bd599f006 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.None.AreEqualTo.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.None.AreEqualTo.EnumerableTests.cs @@ -152,7 +152,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).None().AreEqualTo(0); + => await That(subject)!.None().AreEqualTo(0); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.StartsWith.EnumerableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.StartsWith.EnumerableTests.cs index ac27bccc9..e5f1441e2 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.StartsWith.EnumerableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.StartsWith.EnumerableTests.cs @@ -110,7 +110,7 @@ public async Task WhenSubjectIsNull_ShouldFail() IEnumerable? subject = null; async Task Act() - => await That(subject).StartsWith(0); + => await That(subject)!.StartsWith(0); await That(Act).Throws() .WithMessage(""" diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.StartsWith.ImmutableTests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.StartsWith.ImmutableTests.cs index 2bf7f9b9c..a44bac60f 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.StartsWith.ImmutableTests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.StartsWith.ImmutableTests.cs @@ -47,7 +47,7 @@ async Task Act() await That(Act).Throws() .WithMessage(""" Expected that subject - starts with [1, 3], + starts with expected, but it contained 2 at index 1 instead of 3 Collection: @@ -67,7 +67,7 @@ async Task Act() await That(Act).Throws() .WithMessage(""" Expected that subject - starts with [1, 2, 3, 4], + starts with expected, but it contained only 3 items and misses 1 items: [ 4 ] diff --git a/Tests/aweXpect.Tests/Collections/ThatEnumerable.StartsWith.Tests.cs b/Tests/aweXpect.Tests/Collections/ThatEnumerable.StartsWith.Tests.cs index 1b7f67cf8..04ff964ca 100644 --- a/Tests/aweXpect.Tests/Collections/ThatEnumerable.StartsWith.Tests.cs +++ b/Tests/aweXpect.Tests/Collections/ThatEnumerable.StartsWith.Tests.cs @@ -68,7 +68,7 @@ async Task Act() await That(Act).Throws() .WithMessage(""" Expected that subject - starts with [1, 3], + starts with expected, but it contained 2 at index 1 instead of 3 Collection: @@ -93,7 +93,7 @@ async Task Act() await That(Act).Throws() .WithMessage(""" Expected that subject - starts with [1, 2, 3, 4], + starts with expected, but it contained only 3 items and misses 1 items: [ 4 ]