Changed behavior of BeEquivalentTo after update to version 6.12.2 #2810
-
|
After updating to version 6.12.2. some of my tests failed. In my comparison I have a entity with explicit implementation of a interface (ITenant with Guid TenantId) and a backing field. This is populated by Ef Core infrastructure, I do not touch this in application logic. After update nuget, comparing a entity implementing this interface to another instance gives comparison error due to mismatch on TenantId. The manually created instance for comparison has TenantId = Guid.Empty. Of course one could argue that I should initialize it etc... but how could i exclude this member in my comparison? I tried some strategies without success: Note that I do not think the observed behavior is wrong. Just asking how I could exclude this member. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Yes, 6.12.2 was specifically meant to fix the explicit implementation property support, so I'm sorry it now surfaces another issue for you. The best would be to use the second workaround, but I think the name will be something along the lines of |
Beta Was this translation helpful? Give feedback.
-
|
This exclude did the trick: |
Beta Was this translation helpful? Give feedback.
This exclude did the trick: