public void TestHumaniseTimeBetweenTwoDatesWhenResultIsOverOneYear() { var dateOne = new DateTime(2010, 5, 10); var dateTwo = new DateTime(2012, 5, 10); var result = dateOne.HumaniseTimeBetweenTwoDates(dateTwo); Assert.AreEqual("over a year", result); }
public void TestHumaniseTimeBetweenTwoDatesWhenResultIsTenMinutes() { var dateOne = new DateTime(2012, 5, 10, 17, 20, 30); var dateTwo = new DateTime(2012, 5, 10, 17, 30, 30); var result = dateOne.HumaniseTimeBetweenTwoDates(dateTwo); Assert.AreEqual("10 minutes", result); }
public void TestHumaniseTimeBetweenTwoDatesWhenResultIsOneMonth() { var dateOne = new DateTime(2012, 4, 10); var dateTwo = new DateTime(2012, 5, 10); var result = dateOne.HumaniseTimeBetweenTwoDates(dateTwo); Assert.AreEqual("about a month", result); }
public void TestHumaniseTimeBetweenTwoDatesWhenResultIsOneHour() { var dateOne = new DateTime(2012, 5, 10, 16, 30, 30); var dateTwo = new DateTime(2012, 5, 10, 17, 30, 30); var result = dateOne.HumaniseTimeBetweenTwoDates(dateTwo); Assert.AreEqual("an hour", result); }
public void TestHumaniseTimeBetweenTwoDatesWhenResultIsOneDay() { var dateOne = new DateTime(2012, 5, 9); var dateTwo = new DateTime(2012, 5, 10); var result = dateOne.HumaniseTimeBetweenTwoDates(dateTwo); Assert.AreEqual("a day", result); }
public void TestHumaniseTimeBetweenTwoDatesWhenResultIsAFewSeconds() { var dateOne = new DateTime(2012, 5, 10, 17, 30, 25); var dateTwo = new DateTime(2012, 5, 10, 17, 30, 30); var result = dateOne.HumaniseTimeBetweenTwoDates(dateTwo); Assert.AreEqual("a few seconds", result); }
public void TestHumaniseTimeBetweenTwoDatesWhenResultIsAboutFourMonths() { var dateOne = new DateTime(2012, 1, 10); var dateTwo = new DateTime(2012, 5, 10); var result = dateOne.HumaniseTimeBetweenTwoDates(dateTwo); Assert.AreEqual("about 4 months", result); }