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

Improve error messages for Be validation #13

Merged

Conversation

ronaldkroon
Copy link
Contributor

@ronaldkroon ronaldkroon commented Nov 2, 2017

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 ronaldkroon changed the title [WIP] Improve Be validation Improve error messages for Be validation Nov 6, 2017
@ronaldkroon
Copy link
Contributor Author

@dennisdoomen do you have time to look at this?

@ronaldkroon
Copy link
Contributor Author

Agreed with @dennisdoomen to:

  • rename Be to BeEquivalent
  • add overload that takes a string and parses that to JSON

@ronaldkroon
Copy link
Contributor Author

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

Copy link
Member

@dennisdoomen dennisdoomen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just needs a clean-up of the commits.

@dennisdoomen dennisdoomen merged commit a14c875 into fluentassertions:release-5.0 Jan 9, 2018
dennisdoomen added a commit that referenced this pull request Jan 13, 2018
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.

None yet

2 participants