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

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 self-assigned this Sep 18, 2018
@dennisdoomen
Copy link
Member

@dennisdoomen dennisdoomen commented Sep 18, 2018

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

@krajek
Copy link
Contributor

@krajek krajek commented Sep 23, 2018

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

@dennisdoomen
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.

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

No branches or pull requests

3 participants