public void get_async_throws_if_key_is_null() { var sut = new StateServiceBuilder() .Build(); Assert.Throws<ArgumentNullException>(() => sut.GetAsync<string>(null)); }
public void get_async_throws_if_key_is_null() { var sut = new StateServiceBuilder() .Build(); Assert.Throws <ArgumentNullException>(() => sut.GetAsync <string>(null)); }
public void get_async_forwards_the_call_onto_the_blob_cache() { var blobCache = new BlobCacheMock(); blobCache .When(x => x.Get(It.IsAny<string>())) .Return(Observable.Return(new byte[0])); var sut = new StateServiceBuilder() .WithBlobCache(blobCache) .Build(); sut.GetAsync<string>("some key"); // we don't verify the specific key because Akavache does some key manipulation internally blobCache .Verify(x => x.Get(It.IsAny<string>())) .WasCalledExactlyOnce(); }
public void get_async_forwards_the_call_onto_the_blob_cache() { var blobCache = new BlobCacheMock(); blobCache .When(x => x.Get(It.IsAny <string>())) .Return(Observable.Return(new byte[0])); var sut = new StateServiceBuilder() .WithBlobCache(blobCache) .Build(); sut.GetAsync <string>("some key"); // we don't verify the specific key because Akavache does some key manipulation internally blobCache .Verify(x => x.Get(It.IsAny <string>())) .WasCalledExactlyOnce(); }