BeEmpty() materializes IEnumerable<T> only once, even on failure#2530
BeEmpty() materializes IEnumerable<T> only once, even on failure#2530dennisdoomen merged 4 commits intofluentassertions:developfrom
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 qodana-support@jetbrains.com
|
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 spellcheckor.\build.ps1 --target spellcheckbefore pushing and check the good outcome