Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[suggestion] New diagnostic: Use EmptyConstraint for better assertion messages in case of failure #752

Open
Bartleby2718 opened this issue Jun 2, 2024 · 0 comments

Comments

@Bartleby2718
Copy link
Contributor

Continuing to file small tickets so that each ticket can be picked up by different people in parallel, if need be.

var numbers = new[] { 1, 2, 3 };
Assert.That(numbers.Any());
Assert.That(!numbers.Any());

could be converted to

Assert.That(numbers, Is.Not.Empty);
Assert.That(numbers, Is.Empty);

respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant