public async void TestSetup()
        {
            m_loggingContext = new LoggingContext(Guid.NewGuid());
            var data = TestHelper.CreateApplicationEndpoint();

            m_restfulClient = data.RestfulClient;
            m_eventChannel  = data.EventChannel;

            await data.ApplicationEndpoint.InitializeAsync(m_loggingContext).ConfigureAwait(false);

            await data.ApplicationEndpoint.InitializeApplicationAsync(m_loggingContext).ConfigureAwait(false);

            var communication = data.ApplicationEndpoint.Application.Communication;

            m_restfulClient.HandleRequestProcessed +=
                (sender, args) => TestHelper.RaiseEventsOnHttpRequest(args, DataUrls.MessagingInvitations, HttpMethod.Post, "Event_MessagingInvitationStarted.json", m_eventChannel);

            // Start a conversation with messaging modality
            IMessagingInvitation invitation = await communication
                                              .StartMessagingWithIdentityAsync("Test message", "sip:[email protected]", "https://example.com/callback", "Test user 1", "sip:[email protected]")
                                              .ConfigureAwait(false);

            TestHelper.RaiseEventsFromFile(m_eventChannel, "Event_ConversationConferenceAdded.json");
            TestHelper.RaiseEventsFromFile(m_eventChannel, "Event_ConversationConferenced.json");

            m_conversationConference = invitation.RelatedConversation.ConversationConference;
        }
示例#2
0
        public void ShouldNotExposeConversationConferenceIfNotAvailable()
        {
            // Given
            TestHelper.RaiseEventsFromFile(m_eventChannel, "Event_ConversationConferenced_NoActionLink.json");

            // When
            IConversationConference conf = m_conversation.ConversationConference;

            // Then
            Assert.IsNull(conf);
        }