-
Notifications
You must be signed in to change notification settings - Fork 8
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
[DMS-279] New ODS/API 7.2 error message format for key unification #198
Conversation
responseJson.Should().BeEquivalentTo(expectedBodyJson, options => options | ||
.WithoutStrictOrdering() | ||
.IgnoringCyclicReferences() | ||
.RespectingRuntimeTypes() |
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.
Testing I found that it always gave the evaluation of the expected result as a false positive, I found that adding .RespectingRuntimeTypes()
solves the problem.
.Select(x => $"'{x}'") | ||
.ToArray() | ||
); | ||
var targetSegment = targetPath.Segments[1].ToString().Replace(".", ""); |
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 don't know that this will always be the proper way to get the property name you're looking for. It looks like you're assuming a path like {$.schoolReference.schoolId}
and extracting schoolId
. Instead of hard coding the segment at index 1, it might be safer to take the segment at the last index. Also instead of .Replace
I would suggest either TrimStart
or [1..]
No description provided.