AllReady.UnitTest.Features.Campaigns.FeaturedCampaignQueryHandlerShould.LoadTestData C# (CSharp) Method

LoadTestData() protected method

protected LoadTestData ( ) : void
return void
        protected override void LoadTestData()
        {
            var org = new Organization
            {
                Name = "Some Organization"
            };

            Context.Organizations.Add(org);

            Context.Campaigns.Add(new Campaign
            {
                Name = "This is featured",
                Featured = true,
                ManagingOrganization = org                
            });

            Context.Campaigns.Add(new Campaign
            {
                Name = "This is not featured",
                Featured = false,
                ManagingOrganization = org
            });

            Context.Campaigns.Add(new Campaign
            {
                Name = "This is also featured",
                Featured = true,
                ManagingOrganization = org
            });

            Context.SaveChanges();
        }
    }