public void ThreeYears() { string format = FormatTimeSpan.HumaneFormat(new TimeSpan(365 * 4, 0, 0, 0)); Assert.That(format, Is.EqualTo("3 Years Ago"), "Format string should match"); }
public void FourWeeks() { string format = FormatTimeSpan.HumaneFormat(new TimeSpan(28, 0, 0, 0)); Assert.That(format, Is.EqualTo("4 Weeks Ago"), "Format string should match"); }
public void OneYear() { string format = FormatTimeSpan.HumaneFormat(new TimeSpan(365, 0, 0, 0)); Assert.That(format, Is.EqualTo("1 Year Ago"), "Format string should match"); }
public void TwoDays() { string format = FormatTimeSpan.HumaneFormat(new TimeSpan(2, 0, 0, 0)); Assert.That(format, Is.EqualTo("2 Days Ago"), "Format string should match"); }
public void OneDay() { string format = FormatTimeSpan.HumaneFormat(new TimeSpan(1, 0, 0, 0)); Assert.That(format, Is.EqualTo("1 Day Ago"), "Format string should match"); }
public void TwentyTwentyMinutes() { string format = FormatTimeSpan.HumaneFormat(new TimeSpan(0, 22, 0)); Assert.That(format, Is.EqualTo("22 Minutes Ago"), "Format string should match"); }
public void FiveMinutes() { string format = FormatTimeSpan.HumaneFormat(new TimeSpan(0, 5, 0)); Assert.That(format, Is.EqualTo("5 Minutes Ago"), "Format string should match"); }
public void JustNow() { string format = FormatTimeSpan.HumaneFormat(new TimeSpan(0, 0, 1)); Assert.That(format, Is.EqualTo("Just Now"), "Format string should match"); }