コード例 #1
0
        public void CacheTime_AsTimeSpan_AllZero_ReturnsZero()
        {
            CacheTime time = new CacheTime {
                Days = 0, Hours = 0, Minutes = 0, Seconds = 0
            };

            Assert.AreEqual(TimeSpan.Zero, time.AsTimeSpan());
        }
コード例 #2
0
        public void CacheTime_AsTimeSpan_MaxValue_ReturnsZero()
        {
            CacheTime time = new CacheTime {
                Days = int.MaxValue, Hours = 2, Minutes = 3, Seconds = 1
            };

            Assert.AreEqual(TimeSpan.Zero, time.AsTimeSpan());
        }
コード例 #3
0
        public void CacheTime_AsTimeSpan_ValidTime_ReturnsTimeSpan()
        {
            CacheTime time = new CacheTime {
                Minutes = 1
            };

            Assert.AreEqual(TimeSpan.FromMinutes(1), time.AsTimeSpan());
        }