Пример #1
0
        public void PublishDelete_SerializerCalled()
        {
            publisher.NotifyDelete("A");

            A.CallTo(() => _serializer.Serialize(
                         A <CacheUpdateNotificationArgs> .That.Matches(args => args.Key == "A" && args.ClientName == "C")))
            .MustHaveHappened(Repeated.Exactly.Once);
        }
Пример #2
0
 public void Remove(string key)
 {
     _cache.Remove(key);
     _cachePublisher.NotifyDelete(key);
 }
        public void Remove_Publisher_Called()
        {
            _publishingCache.Remove("a");

            A.CallTo(() => _publisher.NotifyDelete("a")).MustHaveHappened(Repeated.Exactly.Once);
        }