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)); }
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 }
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 }
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)); }