Exemplo n.º 1
0
 public void AddToNoDayTest()
 {
     try
     {
         var fd      = new FuzzyDate(2019, 9);
         var newDate = fd.AddDays(10);
         Assert.IsFalse(newDate.Day.HasValue);
     }
     catch (Exception ex)
     {
         Assert.Fail($"Expect no exception, but got {ex.Message}");
     }
 }
Exemplo n.º 2
0
 public void AddPositiveDaysTest()
 {
     try
     {
         var fd      = new FuzzyDate(2019, 9, 29);
         var newDate = fd.AddDays(10);
         Assert.AreEqual(2019, newDate.Year);
         Assert.AreEqual(10, newDate.Month);
         Assert.AreEqual(9, newDate.Day);
     }
     catch (Exception ex)
     {
         Assert.Fail($"Expect no exception, but got {ex.Message}");
     }
 }