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); }
public void SuccessfulExchangeConnectDisconnectTest() { var user = _phones.First(); Assert.That(_exchange.ConnectToExchange(user) == true); Assert.That(_exchange.DisconnectFromExchange(user) == true); }
public bool ConnectToExchange() { _telephoneExchange.AbonentsConnected += ExchangeCallStartEventHandler; _telephoneExchange.AbonentsDisconnected += ExchangeCallEndEventHandler; return(_telephoneExchange.ConnectToExchange(PhoneNumber)); }
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); }