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);
        }
Esempio n. 2
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);
        }
Esempio n. 3
0
        public CallState MakeCall(Phone reciverNumber)
        {
            var status = _telephoneExchange.ConnectAbonents(PhoneNumber, reciverNumber);

            return(status);
        }