← Back to team overview

nunit-core team mailing list archive

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

 

Public bug reported:

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

** Affects: nunitv2
     Importance: Undecided
         Status: New

-- 
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:
  New

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


Follow ups

References