public void StopTest()
        {
            IOutboundChannel target = CreateIOutboundChannel(); // TODO: Eseguire l'inizializzazione a un valore appropriato

            target.Stop();
            Assert.Inconclusive("Impossibile verificare un metodo che non restituisce valori.");
        }
Beispiel #2
0
        void IChannelManagement.DeleteChannel(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                throw new ArgumentNullException("id");
            }
            IOutboundChannel chan = null;

            foreach (IOutboundChannel ch in _target.OutboundChannels)
            {
                if (ch.ID == id)
                {
                    chan = ch;
                    break;
                }
            }

            if (chan != null)
            {
                if (chan.SubscribedClients > 0)
                {
                    throw new InvalidOperationException(
                              "Unable to delete channels to which there are still subscribed clients");
                }
                chan.Stop();
                _target.OutboundChannels.Remove(chan);
            }
            else
            {
                throw new LogbusException(string.Format("Channel {0} not found", id));
            }
        }