Beispiel #1
0
        public void GetDataShouldNotRecordTime()
        {
            //when
            _cache.GetData <object>("key1");

            //then
            AssertNoAccessTime(_cache.Statistics, CacheStatisticsKeys.LastWrite);
        }
Beispiel #2
0
        public void GetDataShouldRecordTime()
        {
            //when
            DateTimeOffset expectedTime = DateTimeOffset.Now;

            _cache.GetData <object>("key1");

            //then
            Thread.Sleep(60);
            AssertAccessTime(_cache.Statistics, CacheStatisticsKeys.LastUse, expectedTime);
        }