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

BeEquivalentTo with WithStrictOrdering produces messy failure message #918

Closed
shuebner opened this issue Sep 18, 2018 · 3 comments
Closed

BeEquivalentTo with WithStrictOrdering produces messy failure message #918

shuebner opened this issue Sep 18, 2018 · 3 comments
Assignees
Labels
bug

Comments

@shuebner
Copy link

@shuebner shuebner commented Sep 18, 2018

Description

Comparing collections with option "WithStrictOrdering" produces messy failure messages.

Complete minimal example reproducing the issue

new[] { 1, 2, 3 }.Should().BeEquivalentTo(new[] { 1, 3, 2 }, opts => opts.WithStrictOrdering());

Expected behavior:

Clear failure message about the difference between the lists.

Actual behavior:

Confusing and malformatted message with wrong statements:

Expected item[1] to be a collection with 3 item(s)Expected item[1] to be 3, but found 2.
Expected item[2] to be a collection with 3 item(s)Expected item[2] to be 2, but found 3.

Versions

FluentAssertions 5.4.2.0
.NET Framework 4.6.1

@dennisdoomen dennisdoomen added the bug label Sep 18, 2018
@dennisdoomen dennisdoomen self-assigned this Sep 18, 2018
@dennisdoomen

This comment has been minimized.

Copy link
Member

@dennisdoomen dennisdoomen commented Sep 18, 2018

Ah, I actually found that one as part of #911. Working on that.

@krajek

This comment has been minimized.

Copy link
Contributor

@krajek krajek commented Sep 23, 2018

I also found it as part of #920. It is already fixed there.

@dennisdoomen

This comment has been minimized.

Copy link
Member

@dennisdoomen dennisdoomen commented Sep 25, 2018

I also found it as part of #920. It is already fixed there.

That would surprise me. I'm still fixing it by changing the way assertion scopes get chained.

dennisdoomen added a commit to dennisdoomen/fluentassertions that referenced this issue Sep 25, 2018
dennisdoomen added a commit to dennisdoomen/fluentassertions that referenced this issue Sep 25, 2018
dennisdoomen added a commit to dennisdoomen/fluentassertions that referenced this issue Sep 25, 2018
@krajek krajek mentioned this issue Sep 26, 2018
3 of 3 tasks complete
dennisdoomen added a commit to dennisdoomen/fluentassertions that referenced this issue Sep 26, 2018
dennisdoomen added a commit that referenced this issue Sep 27, 2018
Fixes #918
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.