public void Unsubscribe_Returns_True_If_Subscriber_Is_Subscribed() { var messageChannel = new MessageChannel(); var subscriber = messageChannel.Subscribe <string>(); Assert.True(messageChannel.Unsubscribe(subscriber)); }
public void Unsubscribe_Returns_False_If_Subscribers_MessageType_IsNull() { var mockSubscriber = new Mock <ISubscriber>(); var messageChannel = new MessageChannel(); Assert.False(messageChannel.Unsubscribe(mockSubscriber.Object)); }
public void Unsubscribe_Returns_False_If_Subscriber_Is_Not_Subscribed() { var mockSubscriber = new Mock <ISubscriber>(); mockSubscriber.SetupGet(x => x.MessageType).Returns(typeof(string)); var messageChannel = new MessageChannel(); Assert.False(messageChannel.Unsubscribe(mockSubscriber.Object)); }
public void Unsubscribe_Returns_False_If_Subscriber_Is_Null() { var messageChannel = new MessageChannel(); Assert.False(messageChannel.Unsubscribe(null)); }
public void Dispose() { _c.Unsubscribe(_obs); }