-
Notifications
You must be signed in to change notification settings - Fork 733
BeEmpty() materializes IEnumerable<T> only once, even on failure #2530
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
Conversation
Qodana for .NETIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at [email protected]
|
Src/FluentAssertions/Collections/GenericCollectionAssertions.cs
Outdated
Show resolved
Hide resolved
Pull Request Test Coverage Report for Build 7416242537Warning: This coverage report may be inaccurate.We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
💛 - Coveralls |
A note: This partly reverts #227, but I'm fine with the change here. |
Done |
- Make BeEmpty() materialize only the first item, as no further processing is needed for validation - The error message now mentions "but found at least 1 item" and outputs the said item
Aren't we missing a test for |
@louis-z Did you intentionally left this out from the release notes? IMHO this is worth to be added there? 🤔 |
Fair point. |
…entassertions#2530) * BeEmpty() materializes IEnumerable<T> only once, even on failure - Make BeEmpty() materialize only the first item, as no further processing is needed for validation - The error message now mentions "but found at least 1 item" and outputs the said item * Tweak error message & fix tests * Make similar changes for BeNullOrEmpty * Add test, as per request
…entassertions#2530) * BeEmpty() materializes IEnumerable<T> only once, even on failure - Make BeEmpty() materialize only the first item, as no further processing is needed for validation - The error message now mentions "but found at least 1 item" and outputs the said item * Tweak error message & fix tests * Make similar changes for BeNullOrEmpty * Add test, as per request
…entassertions#2530) * BeEmpty() materializes IEnumerable<T> only once, even on failure - Make BeEmpty() materialize only the first item, as no further processing is needed for validation - The error message now mentions "but found at least 1 item" and outputs the said item * Tweak error message & fix tests * Make similar changes for BeNullOrEmpty * Add test, as per request
…entassertions#2530) * BeEmpty() materializes IEnumerable<T> only once, even on failure - Make BeEmpty() materialize only the first item, as no further processing is needed for validation - The error message now mentions "but found at least 1 item" and outputs the said item * Tweak error message & fix tests * Make similar changes for BeNullOrEmpty * Add test, as per request
…entassertions#2530) * BeEmpty() materializes IEnumerable<T> only once, even on failure - Make BeEmpty() materialize only the first item, as no further processing is needed for validation - The error message now mentions "but found at least 1 item" and outputs the said item * Tweak error message & fix tests * Make similar changes for BeNullOrEmpty * Add test, as per request
…entassertions#2530) * BeEmpty() materializes IEnumerable<T> only once, even on failure - Make BeEmpty() materialize only the first item, as no further processing is needed for validation - The error message now mentions "but found at least 1 item" and outputs the said item * Tweak error message & fix tests * Make similar changes for BeNullOrEmpty * Add test, as per request
* BeEmpty() materializes IEnumerable<T> only once, even on failure - Make BeEmpty() materialize only the first item, as no further processing is needed for validation - The error message now mentions "but found at least 1 item" and outputs the said item * Tweak error message & fix tests * Make similar changes for BeNullOrEmpty * Add test, as per request
@dennisdoomen did this change also unintentionally affect Specifically my use case is a generic convention test that finds and prints all missing subscription registrations on a service bus, stopping the iteration on the first item while evaluating |
Fixes #2490
IMPORTANT
./build.sh --target spellcheck
or.\build.ps1 --target spellcheck
before pushing and check the good outcome