示例#1
0
        public void testCallMulticallLogicRetrieve2nd()
        {
            Assert.AreEqual(0, _manager.Count);

            IStateMachine smOut = makeOutgoingCall();
            IStateMachine smInc = makeIncomingCall(2); // 1st call reserve sessionId 1 (nullproxy)

            // accept incoming
            _manager.onUserAnswer(smInc.Session);
            smOut.State.onHoldConfirm();

            Assert.AreEqual(EStateId.ACTIVE, smInc.StateId);
            Assert.AreEqual(EStateId.HOLDING, smOut.StateId);

            // Retrieve
            _manager.onUserHoldRetrieve(smOut.Session);
            smInc.State.onHoldConfirm();

            Assert.AreEqual(EStateId.HOLDING, smInc.StateId);
            Assert.AreEqual(EStateId.ACTIVE, smOut.StateId);

            smOut.State.endCall();
            Assert.AreEqual(EStateId.IDLE, smOut.StateId);
            smInc.State.endCall();
            Assert.AreEqual(EStateId.IDLE, smInc.StateId);

            Assert.AreEqual(0, _manager.Count);
        }