Пример #1
0
        public void Topics_PastSubscriptions_NowEmpty_ReturnsTopics()
        {
            _inMemorySubscriberStore.AddSubscriber("topic", "sub");
            _inMemorySubscriberStore.RemoveSubscriber("topic", "sub");

            Assert.That(_inMemorySubscriberStore.Topics, Is.EquivalentTo(new[] { "topic" }));
        }
Пример #2
0
 /// <summary>
 /// Unregisters the given <paramref name="subscriberAddress"/> as a subscriber of the given topic
 /// </summary>
 public async Task UnregisterSubscriber(string topic, string subscriberAddress)
 {
     if (topic == null)
     {
         throw new ArgumentNullException(nameof(topic), "Please remember to specify a topic when unsubscribing");
     }
     if (subscriberAddress == null)
     {
         throw new ArgumentNullException(nameof(subscriberAddress), "Please remember to specify a queue name as the subscriber address when unsubscribing");
     }
     _subscriberStore.RemoveSubscriber(topic, subscriberAddress);
 }