You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the most enticing promises of the FluentAssertions library is having descriptive error messages when the assertions fail.
.ContainSubtree() falls short in this respect. Here is an example message:
Message: Expected JSON document to contain subtree
{ "backendMetadata": { "cosmosDbPartitionKey": "B" }} ,
but some elements were missing.
It doesn't really tell me what's wrong.
At the very least, it should print out the input json (if it has a reasonable size).
It would be better (but more work) for the message to pinpoint the error ("some elements were missing" -- which ones?)
In the above case, the input is not really missing any elements, it's the innermost value that has a different value.
One of the most enticing promises of the FluentAssertions library is having descriptive error messages when the assertions fail.
.ContainSubtree()
falls short in this respect. Here is an example message:It doesn't really tell me what's wrong.
At the very least, it should print out the input json (if it has a reasonable size).
It would be better (but more work) for the message to pinpoint the error ("some elements were missing" -- which ones?)
In the above case, the input is not really missing any elements, it's the innermost value that has a different value.
Here's a quick repro:
#6
The text was updated successfully, but these errors were encountered: