Beispiel #1
0
 public void ConvertToPersianDateTest()
 {
     Assert.AreEqual("1390/6/22", dateTimeHelper.ConvertToPersianDate(Convert.ToDateTime("2011/09/13")));
     Assert.AreEqual(string.Empty, dateTimeHelper.ConvertToPersianDate(null));
     Assert.AreEqual("1390/1/1", dateTimeHelper.ConvertToPersianDate(Convert.ToDateTime("2011/03/21")));
     Assert.AreEqual("1389/12/29", dateTimeHelper.ConvertToPersianDate(Convert.ToDateTime("2011/03/20")));
     Assert.AreEqual("1387/12/30", dateTimeHelper.ConvertToPersianDate(Convert.ToDateTime("2009/03/20")));
     Assert.AreEqual("1388/1/1", dateTimeHelper.ConvertToPersianDate(Convert.ToDateTime("2009/03/21")));
 }