NUnit currently has special code for comparing two DateTimes within a tolerance, but not for DateTimeOffset.
** Changed in: nunitv2 Status: New => Triaged ** Changed in: nunitv2 Importance: Undecided => Medium ** Changed in: nunitv2 Milestone: None => 2.6.3 -- You received this bug notification because you are a member of NUnit Developers, which is subscribed to NUnit V2. https://bugs.launchpad.net/bugs/1089345 Title: Specifying a tolerance with "Within" doesn't work for DateTimeOffset data types Status in NUnit V2 Test Framework: Triaged Bug description: I would expect the following test to pass: [Test] public void DtoTest() { var a = DateTimeOffset.Parse("2012-01-01T12:00Z"); var b = DateTimeOffset.Parse("2012-01-01T12:01Z"); Assert.That(a, Is.EqualTo(b).Within(TimeSpan.FromMinutes(2))); } NUnit.framework version 2.6.2.12296 To manage notifications about this bug go to: https://bugs.launchpad.net/nunitv2/+bug/1089345/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~nunit-core Post to : nunit-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~nunit-core More help : https://help.launchpad.net/ListHelp