public void TestStatusSecsInvalid() { const string dateString = "2199-01-01T23:00:60"; var testDate = DatePair.Parse(dateString); Assert.AreEqual(DateStatus.Invalid, testDate.StartValue.Status); }
public void TestStatusMonthInvalid() { const string dateString = "2199-13"; var testDate = DatePair.Parse(dateString); Assert.AreEqual(DateStatus.Invalid, testDate.StartValue.Status); }
public void TestStatusDayInvalidLeap() { const string dateString = "2019-02-29"; var testDate = DatePair.Parse(dateString); Assert.AreEqual(DateStatus.Invalid, testDate.StartValue.Status); }
public void TestNullDate() { const string dateString = "2019-01-00"; var testDate = DatePair.Parse(dateString); Assert.AreEqual(DateStatus.Invalid, testDate.StartValue.Status); }
public void TestMinusDate() { const string dateString = "-"; var testDate = DatePair.Parse(dateString); Assert.AreEqual(DateStatus.Invalid, testDate.StartValue.Status); }
public void TestEmptyDate() { const string dateString = ""; var testDate = DatePair.Parse(dateString); Assert.AreEqual(DateStatus.Unused, testDate.StartValue.Status); }
public void TestWrongJune() { const string dateString = "2019-06-31"; var testDate = DatePair.Parse(dateString); Assert.AreEqual(DateStatus.Invalid, testDate.StartValue.Status); }
public void TestStatusAndPartStatusSync() { const string dateString = "X199"; var testDate = DatePair.Parse(dateString); Assert.IsTrue(testDate.StartValue.Year.Invalid); Assert.AreEqual(DateStatus.Invalid, testDate.StartValue.Status); }
public void TestStatusDayValidLeapMod1000() { const string dateString = "2000-02-29"; var testDate = DatePair.Parse(dateString); Assert.AreEqual(DateStatus.Normal, testDate.StartValue.Status); Assert.AreEqual(2000, testDate.StartValue.Year.Value); Assert.AreEqual(2, testDate.StartValue.Month.Value); Assert.AreEqual(29, testDate.StartValue.Day.Value); }