public async Task GetAsync_WhenKeyIsNull_ThrowArgumentNullException()
        {
            var provider = new Mock <ICouchbaseCacheBucketProvider>();

            var cache = new CouchbaseCache(provider.Object, new CouchbaseCacheOptions());

            await Assert.ThrowsAsync <ArgumentNullException>(async() => await cache.GetAsync(null));
        }
Beispiel #2
0
        public async Task GetAsynct_Generic_WhenKeyIsNull_ThrowArgumentNullException()
        {
            var provider = new Mock <ICouchbaseCacheBucketProvider>();

            var cache = new CouchbaseCache(provider.Object, new CouchbaseCacheOptions());

            await Assert.ThrowsAsync <ArgumentNullException>(async() => await cache.GetAsync <Poco>(null, new DistributedCacheEntryOptions()));
        }