Improve BeEquivalentTo error messages#34
Merged
dennisdoomen merged 2 commits intofluentassertions:masterfrom Feb 11, 2020
Merged
Conversation
Contributor
ronaldkroon
commented
Feb 10, 2020
- Changed sentence to avoid confusion of actual document after "Expected"
- Mention actual type and length differences in message
Changed sentence to avoid confusion of _actual_ document after "Expected"
|
|
||
| internal class Difference | ||
| { | ||
| public Difference(DifferenceKind kind, JPath path, object actual, object expected) : this(kind, path) |
Member
There was a problem hiding this comment.
Shouldn't actual and expected be of type string?
Contributor
Author
There was a problem hiding this comment.
I'm also passing ints. This way I don't have to call ToString.
| var actual = (actualJson != null) ? JToken.Parse(actualJson) : null; | ||
| var expected = (expectedJson != null) ? JToken.Parse(expectedJson) : null; | ||
| [Theory, MemberData(nameof(FailingBeEquivalentCases))] | ||
| public void When_objects_differ_BeEquivalentTo_should_fail(string actualJson, string expectedJson, |
Member
There was a problem hiding this comment.
Rather then referring to the name of the method, I suggest to rewrite it as When_json_fragements_are_not_equivalent_it_should_throw
Mention actual type and length differences in message
cf885c9 to
f7dfdf9
Compare
dennisdoomen
approved these changes
Feb 11, 2020
Member
|
Released as 5.4.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.