コード例 #1
0
        public bool CanStartAdhocMeeting(IAudioVideoInvitation invitation)
        {
            #pragma warning disable CS0618 // Type or member is obsolete
            return(invitation.Supports(AudioVideoInvitationCapability.StartAdhocMeeting));

            #pragma warning restore CS0618 // Type or member is obsolete
        }
コード例 #2
0
        public void ShouldNotExposeAcceptCapabilityIfLinkNotAvailable()
        {
            // Given
            IAudioVideoInvitation invitation = null;

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

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

            // Then
            Assert.IsNotNull(invitation);
            Assert.IsFalse(invitation.Supports(AudioVideoInvitationCapability.Accept));
        }
コード例 #3
0
        public void ShouldExposeForwardCapabilityIfLinkAvailable()
        {
            // Given
            IAudioVideoInvitation invitation = null;

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

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

            // Then
            Assert.IsNotNull(invitation);
            Assert.IsTrue(invitation.Supports(AudioVideoInvitationCapability.Forward));
        }
コード例 #4
0
        public void ShouldNotSupportStartAdhocMeetingIfLinkNotAvailable()
        {
            // Given
            IAudioVideoInvitation invitation = null;

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

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

            // When
            var supports = invitation.Supports(AudioVideoInvitationCapability.StartAdhocMeeting);

            // Then
            Assert.IsFalse(supports);
        }
コード例 #5
0
        public void ShouldNotSupportAcceptAndBridgeIfLinkIsNotAvailable()
        {
            // Given
            IAudioVideoInvitation invitation = null;

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

            m_restfulClient.OverrideResponse(new Uri(DataUrls.AudioVideoInvitationForward), HttpMethod.Post, HttpStatusCode.NoContent, null);

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

            // When
            var supports = invitation.Supports(AudioVideoInvitationCapability.AcceptAndBridge);

            // Then
            Assert.IsFalse(supports);
        }