public void SenderBlockedTest()
        {
            var sender = _phones[1]; // Odd

            _exchange.ConnectToExchange(sender);

            var reciver = _phones[0]; // Even

            _exchange.ConnectToExchange(reciver);

            Assert.That(_exchange.ConnectAbonents(sender, reciver) == CallState.Locked);
        }
예제 #2
0
        public void SuccessfulExchangeConnectDisconnectTest()
        {
            var user = _phones.First();

            Assert.That(_exchange.ConnectToExchange(user) == true);
            Assert.That(_exchange.DisconnectFromExchange(user) == true);
        }
예제 #3
0
        public bool ConnectToExchange()
        {
            _telephoneExchange.AbonentsConnected    += ExchangeCallStartEventHandler;
            _telephoneExchange.AbonentsDisconnected += ExchangeCallEndEventHandler;

            return(_telephoneExchange.ConnectToExchange(PhoneNumber));
        }
예제 #4
0
        public void SuccessfulRingTest()
        {
            var sender = _phones[0];

            _exchange.ConnectToExchange(sender);

            var reciver = _phones[1];

            _exchange.ConnectToExchange(reciver);

            Assert.That(_exchange.ConnectAbonents(sender, reciver) == CallState.Connected);
            Assert.That(_exchange.DisconnectAbonents(sender, reciver) == CallState.Disconnected);
        }