예제 #1
0
        public async Task AcceptAndBridgeAsyncShouldMakeHttpRequest()
        {
            // Given
            IAudioVideoInvitation invitation = null;

            m_applicationEndpoint.HandleIncomingAudioVideoCall += (sender, args) => invitation = args.NewInvite;

            TestHelper.RaiseEventsFromFile(m_mockEventChannel, "Event_IncomingAudioCall.json");

            // When
            await invitation.AcceptAndBridgeAsync(new SipUri("sip:[email protected]"), m_loggingContext).ConfigureAwait(false);

            // Then
            Assert.IsTrue(m_restfulClient.RequestsProcessed("POST " + DataUrls.AudioVideoInvitationAcceptAndBridge));
        }
예제 #2
0
        public async Task AcceptAndBridgeAsyncShouldThrowIfBothMeetingUrlAndToNull()
        {
            // Given
            IAudioVideoInvitation invitation = null;

            m_applicationEndpoint.HandleIncomingAudioVideoCall += (sender, args) => invitation = args.NewInvite;

            TestHelper.RaiseEventsFromFile(m_mockEventChannel, "Event_IncomingAudioCall.json");

            // When
            await invitation.AcceptAndBridgeAsync(m_loggingContext, null, null).ConfigureAwait(false);

            // Then
            // Exception is thrown
        }
예제 #3
0
        public async Task AcceptAndBridgeAsyncShouldThrowIfCapabilityNotAvailable()
        {
            // Given
            IAudioVideoInvitation invitation = null;

            m_applicationEndpoint.HandleIncomingAudioVideoCall += (sender, args) => invitation = args.NewInvite;

            TestHelper.RaiseEventsFromFile(m_mockEventChannel, "Event_IncomingAudioCall_NoActionLinks.json");

            // When
            await invitation.AcceptAndBridgeAsync(new SipUri("sip:[email protected]"), m_loggingContext).ConfigureAwait(false);

            // Then
            // Exception is thrown
        }
예제 #4
0
        public async Task AcceptAndBridgeAsyncShouldMakeHttpRequest()
        {
            // Given
            IAudioVideoInvitation invitation = null;

            m_applicationEndpoint.HandleIncomingAudioVideoCall += (sender, args) => { invitation = args.NewInvite; };

            TestHelper.RaiseEventsFromFile(m_mockEventChannel, "Event_IncomingAudioCall.json");

            // When
            await invitation.AcceptAndBridgeAsync(m_loggingContext, "sip:[email protected];gruu;opaque=app:conf:focus:id:LB6557GF", "sip:[email protected]").ConfigureAwait(false);

            // Then
            Assert.IsTrue(m_restfulClient.RequestsProcessed("POST " + DataUrls.AudioVideoInvitationAcceptAndBridge));
        }