public void Known_Date_Gives_Localized_DateTime_ShortDateString_On_ToString() { var someDateTime = new DateTime(1992, 4, 6); var date = new UncertainDate(someDateTime, someDateTime); Assert.That(date.ToString(), Is.EqualTo(someDateTime.ToShortDateString())); }
public void Only_Year_Known_Gives_Year_On_ToString() { var date = new UncertainDate(1998); Assert.That(date.ToString(), Is.EqualTo("1998")); }
public void Only_Year_And_Month_Known_Gives_Localized_Monthname_Plus_Year_On_ToString() { var date = new UncertainDate(1998, 1); Assert.That(date.ToString(), Is.EqualTo("January 1998")); }
public void Completely_Uncertain_Date_Gives_Question_Mark_On_ToString() { var date = new UncertainDate(); Assert.That(date.ToString(), Is.EqualTo("?")); }