public void remove_async_throws_if_key_is_null()
        {
            var sut = new StateServiceBuilder()
                      .Build();

            Assert.Throws <ArgumentNullException>(() => sut.RemoveAsync <string>(null));
        }
        public void remove_async_forwards_the_call_onto_the_blob_cache()
        {
            var blobCache = new BlobCacheMock(MockBehavior.Loose);

            blobCache
            .When(x => x.Invalidate(It.IsAny <string>()))
            .Return(Observable.Return(Unit.Default));

            var sut = new StateServiceBuilder()
                      .WithBlobCache(blobCache)
                      .Build();

            sut.RemoveAsync <string>("some key");

            // we don't verify the specific key because Akavache does some key manipulation internally
            blobCache
            .Verify(x => x.Invalidate(It.IsAny <string>()))
            .WasCalledExactlyOnce();
        }
        public void remove_async_forwards_the_call_onto_the_blob_cache()
        {
            var blobCache = new BlobCacheMock(MockBehavior.Loose);

            blobCache
                .When(x => x.Invalidate(It.IsAny<string>()))
                .Return(Observable.Return(Unit.Default));

            var sut = new StateServiceBuilder()
                .WithBlobCache(blobCache)
                .Build();

            sut.RemoveAsync<string>("some key");

            // we don't verify the specific key because Akavache does some key manipulation internally
            blobCache
                .Verify(x => x.Invalidate(It.IsAny<string>()))
                .WasCalledExactlyOnce();
        }
        public void remove_async_throws_if_key_is_null()
        {
            var sut = new StateServiceBuilder()
                .Build();

            Assert.Throws<ArgumentNullException>(() => sut.RemoveAsync<string>(null));
        }