Пример #1
0
 public void TestInvalidStartDateFutureDate()
 {
     StartEndDateTime sedt = new StartEndDateTime();
     sedt.StartDate = "21000615";
     DateTime dt = DateTime.UtcNow;
     string today = string.Format("{0:d4}{1:d2}{2:d2}", dt.Year, dt.Month, dt.Day);
     // this may fail on very rare occasions when tests run right at midnight
     Assert.AreEqual(today, sedt.ValidStartDate);
 }
Пример #2
0
 public void TestValidEndDateValidDate()
 {
     StartEndDateTime sedt = new StartEndDateTime();
     sedt.EndDate = "20130615";
     Assert.AreEqual("20130615", sedt.ValidEndDate);
 }
Пример #3
0
 public void TestInvalidStartTimeInvalidTime()
 {
     StartEndDateTime sedt = new StartEndDateTime();
     sedt.StartTime = "2405";
     Assert.AreEqual("0000", sedt.ValidStartTime);
 }
Пример #4
0
 public void TestInvalidStartDate19291231()
 {
     StartEndDateTime sedt = new StartEndDateTime();
     sedt.StartDate = "19291231";
     Assert.AreEqual("19300101", sedt.ValidStartDate);
 }
Пример #5
0
 public void TestValidTimeValidTime()
 {
     StartEndDateTime sedt = new StartEndDateTime();
     sedt.StartTime = "201235";
     Assert.AreEqual("201235", sedt.ValidStartTime);
 }