public async Task ResetCollection_ContactNotInCollection_DoNotDisableOtherPlans() { var contact = CreateContact(); var plans = CreatePlansWithCampaign(); await Model.ResetCollectionAsync(contact, plans, 1); MockPlans.Verify(x => x.RemoveFromCampaignAsync(It.IsAny <int>(), It.IsAny <int>()), Times.Never); }
public async Task ResetCollection_InCollectionByOtherPlan_DisableThisPlan() { var contact = CreateContact(2); var plans = CreatePlansWithCampaign(); await Model.ResetCollectionAsync(contact, plans, 1); MockPlans.Verify(x => x.RemoveFromCampaignAsync(1, It.IsAny <int>()), Times.Once); MockPlans.Verify(x => x.RemoveFromCampaignAsync(2, It.IsAny <int>()), Times.Never); }
public async Task ResetCollection_InCollectionAlreadyDisabled_DoesNotRemoveFromCampaign() { var contact = CreateContact(2); var plans = CreatePlansWithCampaign(); plans[0].ListCampaigns.Clear(); await Model.ResetCollectionAsync(contact, plans, 1); MockPlans.Verify(x => x.RemoveFromCampaignAsync(It.IsAny <int>(), It.IsAny <int>()), Times.Never); }