Skip to content

Fix multiple enumeration of collection in CollectionAssertions.Equal/NotEqual#438

Merged
dennisdoomen merged 2 commits intofluentassertions:masterfrom
thomaslevesque:issue437
Jul 8, 2016
Merged

Fix multiple enumeration of collection in CollectionAssertions.Equal/NotEqual#438
dennisdoomen merged 2 commits intofluentassertions:masterfrom
thomaslevesque:issue437

Conversation

@thomaslevesque
Copy link
Copy Markdown
Contributor

Fixes #437

  • Equal: The solution is to materialize the subject before checking that it has the correct count and content. It might be an issue if the subject is a very large collection, but NotEqual (and probably others) already does it anyway...
  • NotEqual: use the (already created) materialized copy of the subject to generate the assertion failure message

I only checked Equal and NotEqual, but there might be other methods with the same issue.

@dennisdoomen dennisdoomen merged commit 882d132 into fluentassertions:master Jul 8, 2016
@thomaslevesque thomaslevesque deleted the issue437 branch July 8, 2016 08:24
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

Successfully merging this pull request may close these issues.

2 participants