public void RebroadcastServerManager_FeedsChanged_Removes_Old_Feeds()
        {
            _Manager.Initialise();

            FeedHelper.RemoveFeed(_Feeds, _Listeners, 1);
            _FeedManager.Raise(r => r.FeedsChanged += null, EventArgs.Empty);

            Assert.AreEqual(0, _Manager.RebroadcastServers.Count);
        }
        public void RebroadcastServerManager_ConfigurationChanged_Disposes_Of_Server_If_Listener_Goes_Away()
        {
            _Manager.Initialise();

            FeedHelper.RemoveFeed(_Feeds, _Listeners, 1);
            _ConfigurationStorage.Raise(r => r.ConfigurationChanged += null, EventArgs.Empty);

            Assert.AreEqual(0, _Manager.RebroadcastServers.Count);
            _Server.Verify(r => r.Dispose(), Times.Once());
            _Connector.Verify(r => r.Dispose(), Times.Once());
        }
        public void RebroadcastServerManager_Dispose_Prevents_FeedManager_Changes_From_Creating_New_Servers()
        {
            FeedHelper.RemoveFeed(_Feeds, _Listeners, 1);
            _Manager.Initialise();
            _Manager.Dispose();

            FeedHelper.AddFeeds(_Feeds, _Listeners, 1);
            _FeedManager.Raise(r => r.FeedsChanged += null, EventArgs.Empty);

            Assert.AreEqual(0, _Manager.RebroadcastServers.Count);
            _Server.Verify(r => r.Initialise(), Times.Never());
        }