Esempio n. 1
0
        protected void AssertCampaigns(Campaign[] expectedCampaigns, Template[] expectedTemplates)
        {
            // Get each individually.

            for (var index = 0; index < expectedCampaigns.Length; ++index)
            {
                AssertCampaign(expectedCampaigns[index], _repository.GetCampaign(expectedCampaigns[index].Id));
                AssertTemplate(expectedTemplates[index], _repository.GetTemplate(expectedCampaigns[index].Id));
            }

            // Get all.

            var campaigns = _repository.GetCampaigns(null, new Range());

            Assert.AreEqual(expectedCampaigns.Length, campaigns.RangeItems.Count);
            for (var index = 0; index < expectedCampaigns.Length; ++index)
            {
                AssertCampaign(expectedCampaigns[index], campaigns.RangeItems[index]);
            }
        }
Esempio n. 2
0
 RangeResult <Campaign> ICampaignsQuery.GetCampaigns(CampaignCategory?category, Range range)
 {
     return(_repository.GetCampaigns(category, range));
 }