public When_in_completed_state_the_end_timer_has_fired()
 {
     var tf = new TimerFactoryStub();
     tf.CreateNonInviteCtxRetransmitTimerInterceptor = (a) => new TxTimerBuilder().WithCallback(a).Build();
     tf.CreateNonInviteCtxEndCompletedTimerInterceptor = (a) => new TxTimerStub(a, 2000, false, AfterCallBack);
     tf.CreateNonInviteCtxTimeOutTimerInterceptor = CreateDoNothingTimerStub;
     TimerFactory = tf;
 }
Ejemplo n.º 2
0
 protected When_in_state_base()
     : base()
 {
     var tf = new TimerFactoryStub();
     tf.CreateInviteCtxRetransmitTimerInterceptor = CreateInviteCtxRetransmitTimer;
     tf.CreateInviteCtxEndCompletedTimerInterceptor = CreateInviteCtxCompletedEndTimer;
     tf.CreateInviteCtxTimeOutTimerInterceptor = CreateInviteCtxTimeOutTimer;
     TimerFactory = tf;
 }
 protected SoftPhoneSpecificationBase()
 {
     _testClientUaUri = TestConstants.EndPoint1Uri;
     _testClientUaEndPoint = TestConstants.IpEndPoint1;
     _phoneUaUri = TestConstants.EndPoint2Uri;
     _phoneUaEndPoint = TestConstants.IpEndPoint2;
     _timerFactory = new TimerFactoryStubBuilder().Build();
     _stateProvider = CreateStateProviderMock();
 }
        public When_in_trying_state_a_timeout_has_occured()
        {
            _timeOutWaitHandle = new AutoResetEvent(false);

            var tf = new TimerFactoryStub();
            tf.CreateNonInviteCtxRetransmitTimerInterceptor = (a) => new TxTimerBuilder().WithCallback(a).Build();
            tf.CreateNonInviteCtxEndCompletedTimerInterceptor = (a) => new TxTimerBuilder().WithCallback(a).Build();
            tf.CreateNonInviteCtxTimeOutTimerInterceptor = (a) => new TxTimerStub(a, 1000, false, AfterCallBack);
            TimerFactory = tf;
        }
Ejemplo n.º 5
0
 public TxSpecificationBase()
 {
     Sender = new Mock<ISipMessageSender>();
     Listener = new Mock<ISipListener>();
     TxTable = new SipServerTransactionTable();
     Request = new SipRequestBuilder().Build();
     var tf = new TimerFactoryStub();
     tf.CreateNonInviteStxEndCompletedTimerInterceptor = CreateDefaultNonInviteStxEndCompletedTimer;
     TimerFactory = tf;
 }
Ejemplo n.º 6
0
        public TimerFactoryStub Build()
        {
            var tf = new TimerFactoryStub();
            tf.CreateNonInviteCtxRetransmitTimerInterceptor = _nonInviteCtxRetransmitTimerInterceptor;
            tf.CreateNonInviteCtxEndCompletedTimerInterceptor = _nonInviteCtxEndCompletedTimerInterceptor;
            tf.CreateNonInviteCtxTimeOutTimerInterceptor = _nonInviteCtxTimeOutTimerInterceptor;

            tf.CreateNonInviteStxEndCompletedTimerInterceptor = _nonInviteStxEndCompletedTimerInterceptor;

            tf.CreateInviteStxSendTryingInterceptor = _inviteStxSendTryingTimerInterceptor;
            tf.CreateInviteStxEndCompletedTimerInterceptor = _inviteStxEndCompletedInterceptor;
            tf.CreateInviteStxRetransmitTimerInterceptor = _inviteStxRetransmitTimerInterceptor;
            tf.CreateInviteStxEndConfirmedInterceptor = _inviteStxEndConfirmedInterceptor;

            tf.CreateInviteCtxTimeOutTimerInterceptor = _inviteCtxTimeOutTimerInterceptor;
            tf.CreateInviteCtxRetransmitTimerInterceptor = _inviteCtxRetransmitTimerInterceptor;
            tf.CreateInviteCtxEndCompletedTimerInterceptor = _inviteCtxEndCompletedTimerInterceptor;
            tf.CreateRingingTimerInterceptor = _ringingTimerInterceptor;
            return tf;
        }
Ejemplo n.º 7
0
        public TimerFactoryStub Build()
        {
            var tf = new TimerFactoryStub();

            tf.CreateNonInviteCtxRetransmitTimerInterceptor   = _nonInviteCtxRetransmitTimerInterceptor;
            tf.CreateNonInviteCtxEndCompletedTimerInterceptor = _nonInviteCtxEndCompletedTimerInterceptor;
            tf.CreateNonInviteCtxTimeOutTimerInterceptor      = _nonInviteCtxTimeOutTimerInterceptor;

            tf.CreateNonInviteStxEndCompletedTimerInterceptor = _nonInviteStxEndCompletedTimerInterceptor;

            tf.CreateInviteStxSendTryingInterceptor        = _inviteStxSendTryingTimerInterceptor;
            tf.CreateInviteStxEndCompletedTimerInterceptor = _inviteStxEndCompletedInterceptor;
            tf.CreateInviteStxRetransmitTimerInterceptor   = _inviteStxRetransmitTimerInterceptor;
            tf.CreateInviteStxEndConfirmedInterceptor      = _inviteStxEndConfirmedInterceptor;

            tf.CreateInviteCtxTimeOutTimerInterceptor      = _inviteCtxTimeOutTimerInterceptor;
            tf.CreateInviteCtxRetransmitTimerInterceptor   = _inviteCtxRetransmitTimerInterceptor;
            tf.CreateInviteCtxEndCompletedTimerInterceptor = _inviteCtxEndCompletedTimerInterceptor;
            tf.CreateRingingTimerInterceptor = _ringingTimerInterceptor;
            return(tf);
        }
 public When_in_completed_state_the_end_timer_has_fired()
 {
     var tf = new TimerFactoryStub();
     tf.CreateNonInviteStxEndCompletedTimerInterceptor = (a) => new TxTimerStub(a, 2000, false, AfterCallBack);
     TimerFactory = tf;
 }