Skip to content

Conversation

@jnyrup
Copy link
Member

@jnyrup jnyrup commented Jul 24, 2019

Reformatting a failure message that has already been formatted can throw a FormatException.
This PR avoids reformatting formatted failure messages in SatisfyRespectively.

In order to get the inner failure messages after "Expected collection to satisfy all inspectors..."
I introduced WithPreFormattedFailure(string).

I'm not sure if formattedFailureMessage needs to be cleared just as expectation is with ClearExpectation().

This fixes #1092

@jnyrup
Copy link
Member Author

jnyrup commented Jul 25, 2019

I found another way to do it, which I believe to be better, simpler and more idiomatic.

@jnyrup jnyrup requested a review from dennisdoomen July 25, 2019 13:06
@jnyrup jnyrup merged commit c74139a into fluentassertions:master Jul 25, 2019
@jnyrup jnyrup deleted the Issue1092 branch July 25, 2019 17:13
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.

GenericCollectionAssertions.SatisfyRespectively: message formatting fails when nested message contains braces

2 participants