Skip to content

Has.All.../Has.None... - show non-matching items in error message #2854

Description

@Dreamescaper

Currently NUnit only logs actual collection in error message. That's fine if we have 3 items, but not really great for 200, especially due to that only several first items are displayed.
Would be really great to log non-matching items as well, something like:

Expected: all items instance of <System.Char>
Actual: < 'a', \"b\", 'c' >
Non-Matching: < \"b\" > 

That would require to traverse through all collection though, even if the first checked item does not match, but I suppose that's OK, considering that it might happen only for failing test.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions