fluentassertions / fluentassertions.json

NewtonSoft.Json extensions for FluentAssertions
Apache License 2.0
72 stars 26 forks source link

Improve error messages for Be validation #13

Closed ronaldkroon closed 6 years ago

ronaldkroon commented 6 years ago

The Be and BeEquivalentTo validations were very similar. Kept the BeEquivalentTo and removed the Be, because the first one has a better name; it shouldn't be the same object, but an equivalent object. [BREAKING CHANGE] The error message now specifies the path in the JSON and the type of the first found difference. Also added an overload that accepts and parses a string representation of a JSON document. Without the overload a string would implicitly be converted to a JValue and compared as such, which is rarely what you want. To use that behavior an explicit JValue must be created. [BREAKING CHANGE]

ronaldkroon commented 6 years ago

@dennisdoomen do you have time to look at this?

ronaldkroon commented 6 years ago

Agreed with @dennisdoomen to:

ronaldkroon commented 6 years ago

Changed as per agreement, please have a look, @dennisdoomen.