← Back to team overview

nunit-core team mailing list archive

[Bug 1089345] Re: Specifying a tolerance with "Within" doesn't work for DateTimeOffset data types

 

** Project changed: nunitv2 => nunit-3.0

-- 
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 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/nunit-3.0/+bug/1089345/+subscriptions


References