Esempio n. 1
0
        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");
        }
Esempio n. 2
0
        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");
        }
Esempio n. 3
0
        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");
        }
Esempio n. 4
0
        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");
        }
Esempio n. 5
0
        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");
        }
Esempio n. 6
0
        public void TwentyTwentyMinutes()
        {
            string format = FormatTimeSpan.HumaneFormat(new TimeSpan(0, 22, 0));

            Assert.That(format, Is.EqualTo("22 Minutes Ago"), "Format string should match");
        }
Esempio n. 7
0
        public void FiveMinutes()
        {
            string format = FormatTimeSpan.HumaneFormat(new TimeSpan(0, 5, 0));

            Assert.That(format, Is.EqualTo("5 Minutes Ago"), "Format string should match");
        }
Esempio n. 8
0
        public void JustNow()
        {
            string format = FormatTimeSpan.HumaneFormat(new TimeSpan(0, 0, 1));

            Assert.That(format, Is.EqualTo("Just Now"), "Format string should match");
        }