Commit 39a9ed5
authored
* fix(tests): disambiguate Count overload broken by IsEqualTo wrappers (#5751)
Chained_Collection_Assertions_WithStrings called
.Count(c => c.IsEqualTo(3)) on string[]. Before #5751 this failed to
bind to the per-item filter overload (int-vs-string mismatch on
IsEqualTo) and resolved to the inline-count assertion form, returning
a chainable assertion. After #5751 added IsEqualTo<TValue, TOther>
with implicit-conversion fallback, both overloads compile and
resolution picks the per-item filter, which returns
CollectionCountSource<,> -- a count source without .And -- breaking
.And.Contains("Bob") with CS1061.
Mirror the int test (Chained_Collection_Assertions) and use
.Count().IsEqualTo(3) so the resulting assertion is the chainable
CollectionCountEqualsAssertion regardless of TItem.
* fix(tests): tighten Count overload comment
1 parent 3a4312f commit 39a9ed5
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
| 266 | + | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| |||
0 commit comments