[Test] public void AddToBadUnits() { Duration d = new Duration(5,(Duration.Unit)2000); d.AddTo(new DateTime(2000, 1, 1)); }
[Test] public void AddToMonths() { Duration d = new Duration(5,Duration.Unit.Months); Assert.AreEqual(new DateTime(2000,6,1),d.AddTo(new DateTime(2000,1,1))); }
[Test] public void AddToWeeks() { Duration d = new Duration(3,Duration.Unit.Weeks); Assert.AreEqual(new DateTime(2000,1,22),d.AddTo(new DateTime(2000,1,1))); }
[Test] public void AddToDays() { Duration d = new Duration(5,Duration.Unit.Days); Assert.AreEqual(new DateTime(2000,1,6),d.AddTo(new DateTime(2000,1,1))); }