public void Delete_CalledOnBoth() { _doubleCache.Remove("A"); A.CallTo(() => _local.Remove("A")).MustHaveHappened(Repeated.Exactly.Once); A.CallTo(() => _remote.Remove("A")).MustHaveHappened(Repeated.Exactly.Once); }
public async Task SubscriberDelete_ItemDelete() { _subscriber.CacheDelete += Raise.With(this, new CacheUpdateNotificationArgs { Key = "a" }); await Task.Delay(TimeSpan.FromSeconds(1)); A.CallTo(() => _decoratedCache.Remove("a")) .MustHaveHappened(Repeated.Exactly.Once); }
public async Task Remove_ExistingKey_DeletesValue() { var func = A.Fake <Func <Task <string> > >(); A.CallTo(() => func.Invoke()).Returns("B"); _cacheImplementation.Add(_key, "A"); _cacheImplementation.Remove(_key); var result = await _cacheImplementation.GetAsync(_key, func); A.CallTo(() => func.Invoke()).MustHaveHappened(Repeated.Exactly.Once); result.ShouldBe("B"); }
public void Remove(string key) { _localCache.Remove(key); _remoteCache.Remove(key); }
public IHttpActionResult Remove() { _pubSubCache.Remove(Request.RequestUri.PathAndQuery); return(ResponseMessage(new HttpResponseMessage(HttpStatusCode.NoContent))); }
public void Remove(string key) { _redisCache.Remove(key); }
public void Remove(string key) { _cache.Remove(key); }
public void Remove(string key) { _cache.Remove(key); _cachePublisher.NotifyDelete(key); }
public void Remove_DecoratedCache_Called() { _publishingCache.Remove("a"); A.CallTo(() => _decoratedCache.Remove("a")).MustHaveHappened(Repeated.Exactly.Once); }