Exemplo n.º 1
0
        public void Unsubscribe_Should_Decrease_Subscribtions()
        {
            var token         = Subscribe();
            int previousCount = _event.SubscriptionColection.Count;

            _event.Unsubscribe(token);

            Assert.True(_event.SubscriptionColection.Count < previousCount);
        }
Exemplo n.º 2
0
        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);
        }