BeEquivalentTo assertion is failing without telling me the exact mismatch on the property it failed on for large object #2187
Closed
Morshed11218
started this conversation in
General
Replies: 2 comments
-
v5 and v6 had a lot of breaking changes, especially around |
Beta Was this translation helpful? Give feedback.
0 replies
-
Found the issue. My expected class was overriding the ex: actualIndications.Should().BeEquivalentTo(expectedIndications, opt => opt
.ExcludingMissingMembers()
.ComparingByMembers<Ipreo.NS.Indication.Domain.Model.Indication.Indication>()
.Excluding(info => info.InvestorAccountId)
.Excluding(l => l.CreatedDateTime)
.Excluding(i => i.LastModifiedDateTime)); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm noticing that when I'm comparing two large object with different class type using
BeEquivalentTo
assertion, the failure message just says that the actual object does not match expected object. It's not telling me exactly on what property the mismatch is occurring on.I see this failure when I upgrade FluentAssertion package from 4.19.4 to 6.10.0
Assertion code:
This is the error log I'm getting:
Indication_search_by_dealId_should_return_expected_results-638174189832304262.txt
As you can see from the error log, it doesn't exactly tell me where the issue is.
Here is comparison image of the two object. Left is expected and right is actual. As you can see from the image, I have taken care of all the fields that has a mismatch (InvestorAccountId, CreatedDateTime, and LastModifiedDateTime nad ExcludingMissingMembers) but it still fails.
Beta Was this translation helpful? Give feedback.
All reactions