예제 #1
0
            public async Task ThrowsArgumentOutOfRangeExceptionIfSizeIsLessThanZero()
            {
                var blobCache    = new InMemoryBlobCache();
                var artworkCache = new ArtworkCache(blobCache);

                await Helpers.ThrowsAsync <ArgumentOutOfRangeException>(() => artworkCache.Retrieve("somekey", -1, 0));

                await Helpers.ThrowsAsync <ArgumentOutOfRangeException>(() => artworkCache.Retrieve("somekey", 0, -1));
            }
예제 #2
0
            public async Task ThrowsArgumentNullExceptionIfKeyIsNull()
            {
                var blobCache = new InMemoryBlobCache();
                var artworkCache = new ArtworkCache(blobCache);

                await Helpers.ThrowsAsync<ArgumentNullException>(() => artworkCache.Retrieve(null, 100, 100));
            }
예제 #3
0
            public async Task ThrowsArgumentNullExceptionIfKeyIsNull()
            {
                var blobCache    = new InMemoryBlobCache();
                var artworkCache = new ArtworkCache(blobCache);

                await Helpers.ThrowsAsync <ArgumentNullException>(() => artworkCache.Retrieve(null, 100, 100));
            }
예제 #4
0
            public async Task ThrowsArgumentOutOfRangeExceptionIfSizeIsLessThanZero()
            {
                var blobCache = new InMemoryBlobCache();
                var artworkCache = new ArtworkCache(blobCache);

                await Helpers.ThrowsAsync<ArgumentOutOfRangeException>(() => artworkCache.Retrieve("somekey", -1, 0));
                await Helpers.ThrowsAsync<ArgumentOutOfRangeException>(() => artworkCache.Retrieve("somekey", 0, -1));
            }