From 5ff18ebc51c333ca5b01e2e7877a20dee17cccae Mon Sep 17 00:00:00 2001 From: Ademar Gonzalez Date: Thu, 24 Sep 2026 19:33:29 -0400 Subject: [PATCH] Make TestDomainsSuspendedNotification pass in any timezone The cancelDate in the test data is UTC (2009-12-12T00:00:13Z) and DateTime.TryParse converts it to local time, so asserting a fixed local DateTime only passed on machines set to UTC. Compare the parsed value as UTC instead. Co-Authored-By: Claude Opus 5.5 --- EppLib.UnitTests/NominetExtensionLocalTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EppLib.UnitTests/NominetExtensionLocalTest.cs b/EppLib.UnitTests/NominetExtensionLocalTest.cs index e9345eb..986f1de 100644 --- a/EppLib.UnitTests/NominetExtensionLocalTest.cs +++ b/EppLib.UnitTests/NominetExtensionLocalTest.cs @@ -350,7 +350,7 @@ public void TestDomainsSuspendedNotification() Assert.AreEqual("Data Quality", notification.SuspendedReason); Assert.IsNotNull(notification.CancelDate); - Assert.AreEqual(new DateTime(2009, 12, 12, 0, 0, 13), notification.CancelDate.Value); + Assert.AreEqual(new DateTime(2009, 12, 12, 0, 0, 13, DateTimeKind.Utc), notification.CancelDate.Value.ToUniversalTime()); Assert.IsNotNull(notification.SuspendedDomains); Assert.AreEqual(2, notification.SuspendedDomains.Count); Assert.AreEqual("epp-example1.co.uk", notification.SuspendedDomains.First());