Пример #1
0
        public void When_getting_project_by_campaign_then_result_contains_only_projects_with_given_campaign_ID()
        {
            var campaign = new CampaignRepoTests().CreateCampaign();

            CreateProject(campaign.Id);

            var projectsByCampaign = repo.GetByCampaign(campaign.Id);

            Assert.Contains(projectsByCampaign, item => item.CampaignId == campaign.Id);
            Assert.DoesNotContain(projectsByCampaign, item => item.CampaignId != campaign.Id);
        }