Ejemplo n.º 1
0
        public void AgeNowTest()
        {
            // Override how SystemTime calculates the current DateTime
            SystemTime.NowFunction = () => new DateTime(2010, 6, 11, 10, 15, 16, 178);

            var expected = 3;
            var actual   = DateTimeExtensions.AgeNow(new DateTime(2007, 4, 24));

            Assert.AreEqual(expected, actual);
        }