-
Notifications
You must be signed in to change notification settings - Fork 26
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 BeEquivalentTo error messages #34
Improve BeEquivalentTo error messages #34
Conversation
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't actual
and expected
be of type string
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also passing int
s. 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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Released as 5.4.0 |