Is it possible in AutoFixture SemanticComparison to set custom comparer for specified property of a object or for specified type.
For example you need to compare objects that have property of type DateTime. You want to compare them using Likenes but you want the precision of the comparison to discard differences on milliseconds level (possibly you lost precision after retrieving DateTime from database).
You may use the EqualsWhen
member of the Likeness (Fluent) API for doing that.
Here is a quite similar example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With