Exemple #1
0
 public void CombineStringsToDateTimeTest()
 {
     Assert.IsNull(StringConversion.CombineStringsToDateTime("20161224", null, "17:24", "", ":", false));
     Assert.AreEqual(new DateTime(2016, 12, 24, 17, 24, 00, 0),
                     StringConversion.CombineStringsToDateTime("20161224", "yyyyMMdd", "17:24", "", ":", false));
     Assert.AreEqual(DateTime.FromOADate(.220),
                     StringConversion.CombineStringsToDateTime(".220", "yyyyMMdd", "", "", ":", true));
     Assert.AreEqual(DateTime.FromOADate(0).Add(new TimeSpan(17, 24, 00)),
                     StringConversion.CombineStringsToDateTime("", "yyyyMMdd", "17:24", "", ":", true));
 }