public void MergedConversationWithExactDuplicatesTest() { MockLoadingProgressCallback progressCallback = new MockLoadingProgressCallback(); DummyContactId[] dummyContactIds = { DummyContactId.Davola, DummyContactId.Davola }; DummyPhoneNumberId[] DummyPhoneNumberIds = { DummyPhoneNumberId.DavolaCell, DummyPhoneNumberId.DavolaiPhone }; MergingConversationManager mergingConversationManager = CreateMergingConversationManager(dummyContactIds, DummyPhoneNumberIds, progressCallback); Assert.AreEqual(1, mergingConversationManager.ConversationCount); ConversationManagerTest.VerifySuccessfulCompletion(progressCallback); }
public void EmptyMergedConversationTest() { MockLoadingProgressCallback progressCallback = new MockLoadingProgressCallback(); DummyContactId[] dummyContactIds = { DummyContactId.NeverTexter }; DummyPhoneNumberId[] DummyPhoneNumberIds = { }; MergingConversationManager mergingConversationManager = CreateMergingConversationManager(dummyContactIds, DummyPhoneNumberIds, progressCallback); Assert.AreEqual(1, mergingConversationManager.ConversationCount); int expectedProgressMax = (DummyConversationDataGenerator.GetPhoneNumberCount(dummyContactIds) * 2) + DummyConversationDataGenerator.GetMessageCount(DummyPhoneNumberIds); Assert.AreEqual(expectedProgressMax, progressCallback.Maximum); ConversationManagerTest.VerifySuccessfulCompletion(progressCallback); }
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); }