diff --git a/DuckDB.NET.Test/ModuleInit.cs b/DuckDB.NET.Test/ModuleInit.cs index cd81fe7..e1d5e71 100644 --- a/DuckDB.NET.Test/ModuleInit.cs +++ b/DuckDB.NET.Test/ModuleInit.cs @@ -1,6 +1,7 @@ using DuckDB.NET.Test.Helpers; using FluentAssertions; using System; +using System.Collections.Generic; using System.Runtime.CompilerServices; #nullable enable @@ -12,8 +13,19 @@ public static void Init() { NativeLibraryHelper.TryLoad(); - AssertionOptions.AssertEquivalencyUsing(options => options.ComparingByMembers().Including(info => - info.Name == nameof(DateTimeOffset.Offset) || - info.Name == nameof(DateTimeOffset.TimeOfDay))); + AssertionOptions.AssertEquivalencyUsing(options => options.Using(new DateTimeOffsetTimeComparer())); + } + + class DateTimeOffsetTimeComparer : IEqualityComparer + { + public bool Equals(DateTimeOffset x, DateTimeOffset y) + { + return x.Offset==y.Offset && x.TimeOfDay==y.TimeOfDay; + } + + public int GetHashCode(DateTimeOffset obj) + { + return obj.GetHashCode(); + } } }