public void Unsubscribe_Should_Decrease_Subscribtions() { var token = Subscribe(); int previousCount = @event.SubscriptionColection.Count; @event.Unsubscribe(token); Assert.True(@event.SubscriptionColection.Count < previousCount); }
public void Unsubscribe_Should_Decrease_Subscriptions() { Action <string> fireIt = aParam => Console.Write(aParam); @event.Subscribe(fireIt); var previousCount = @event.SubscriptionCollection.Count; @event.Unsubscribe(fireIt); Assert.True(@event.SubscriptionCollection.Count < previousCount); }