We use a custom ApplicationErrorException which implements IEnumerable returning a list of parameters associated with that exception.
When the verification fails Fluent Assertions formats the exception using the default formatter, which can result in a message like:
Expected System.ApplicationException, but found {[EntityType, Book], [Key, 123]}.
Which is obviously not providing enough information.
When the verification fails Fluent Assertions formats the exception using the default formatter, which can result in a message like:
Expected System.ApplicationException, but found {[EntityType, Book], [Key, 123]}.
Which is obviously not providing enough information.