Пример #1
0
        public async Task AddAsync_Set_ExpiryTimeAtDocumentLevel_ItemDoesntExistInCache()
        {
            // Arrange
            var cacheValue = "Test";

            await stringCache.AddAsync(new CacheItem <string>(CacheKey, cacheValue, TimeSpan.FromSeconds(5)));

            // Act
            await Task.Delay(TimeSpan.FromSeconds(7));


            // Assert
            Assert.False(await stringCache.ExistsAsync(CacheKey));
        }