Skip to content

I wish that BeEmpty() would list the items when not empty #224

@JayBazuzi

Description

@JayBazuzi
// "Expected collection to be empty, but found 3."
new[] {1, 2, 3}.Should().BeEmpty();

I wish the message included the list of items. Instead, I use:

// "Expected collection {1, 2, 3} to be equivalent to {empty}, but it contains too many items."
new[] {1, 2, 3}.Should().BeEquivalentTo(Enumerable.Empty<int>());

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions