public static IConversation GetMergedConversation(DummyContactId contactId)
        {
            List <Contact> contacts = GetContacts(contactId);

            IEnumerable <TextMessage> messages = GetMessageSet(contactId);

            List <ChatRoomInformation> chatInfoItems = new List <ChatRoomInformation>();

            List <MessageAttachment> attachments = new List <MessageAttachment>();

            ConversationManager conversationManager = new ConversationManager(contacts, messages, chatInfoItems, attachments, null);

            MergingConversationManager megingConversationManager = new MergingConversationManager(conversationManager, null);

            return(megingConversationManager.GetConversation(0));
        }
Example #2
0
        public void ConversationWithNumberDuplicatesTest()
        {
            MockLoadingProgressCallback progressCallback = new MockLoadingProgressCallback();

            DummyContactId[]     dummyContactIds     = { DummyContactId.Davola, DummyContactId.DavolaNumberDuplicate };
            DummyPhoneNumberId[] DummyPhoneNumberIds = { DummyPhoneNumberId.DavolaCell, DummyPhoneNumberId.DavolaiPhone };

            MergingConversationManager conversationManagerMerged = CreateMergingConversationManager(dummyContactIds, DummyPhoneNumberIds, progressCallback);

            Assert.AreEqual(1, conversationManagerMerged.ConversationCount);

            IConversation conversation = conversationManagerMerged.GetConversation(0);

            Assert.AreEqual(1, conversation.AssociatedContacts.Count);
            Assert.AreEqual((long)DummyContactId.Davola, conversation.AssociatedContacts[0].ContactId);

            ConversationManagerTest.VerifySuccessfulCompletion(progressCallback);
        }
        public static IConversation GetMergedConversation(DummyContactId contactId)
        {
            List<Contact> contacts = GetContacts(contactId);

            IEnumerable<TextMessage> messages = GetMessageSet(contactId);

            List<ChatRoomInformation> chatInfoItems = new List<ChatRoomInformation>();

            List<MessageAttachment> attachments = new List<MessageAttachment>();

            ConversationManager conversationManager = new ConversationManager(contacts, messages, chatInfoItems, attachments, null);

            MergingConversationManager megingConversationManager = new MergingConversationManager(conversationManager, null);

            return megingConversationManager.GetConversation(0);
        }