Skip to content

Conversation

@jnyrup
Copy link
Member

@jnyrup jnyrup commented Jan 16, 2021

As pointed out be @julealgon the failure message could be cryptic, so here's an improvement.

Any suggestions to if the failure message be could be improved further?

The failure message of When_a_method_throws_with_a_non_matching_parameter_name_it_should_fail_with_a_descriptive_message

develop

Expected throwException to be 
"someParameter" with a length of 13 because we want to test the failure message, but 
"someOtherParameter" has a length of 18, differs near "Oth" (index 4).

PR

Expected exception with parameter name "someParameter" because we want to test the failure message, but found "someOtherParameter".

@jnyrup jnyrup changed the title Move extension methods on ExceptionAssertions to ExceptionAssertionsExtensions Improve exception message for WithParameterName Jan 16, 2021
@jnyrup jnyrup merged commit d3dd85a into fluentassertions:develop Jan 17, 2021
@jnyrup jnyrup deleted the WithParameter branch January 17, 2021 07:32
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