VerifyTests/Verify

Override default Counters comparers

JaktensTid opened this issue · 7 comments

Is the feature request related to a problem

Counters comparers (like DateTimeOffsetComparer) are hardcoded and there is no way to change default comparer.
In some cases I want to override it. For example DateTimeOffset has higher accuracy than timestamp with timezone in postgres. Hence counter works incorrectly for the same DateTimeOffset that was saved and loaded back from the database, because nanoseconds part is lost.

Describe the solution

Add VerifierSettings.CounterDateTimeOffsetComparer, VerifierSettings.CounterDateComparer, etc. These properties must accept IEqualityComparer interface.

Describe alternatives considered

Additional context

@JaktensTid looks good. happy to accept a PR

Hi, @SimonCropp
There is a PR: #1297

Hi, let me check today

bump

bump

Hi, new feature that you sent fills all our requirements). We can close this MR