public EditTaskQueryHandlerShould() { task = new AllReadyTask { Id = 1, Name = "Taskname", Description = "Description", StartDateTime = DateTimeOffset.Now, EndDateTime = DateTimeOffset.Now, NumberOfVolunteersRequired = 5, RequiredSkills = new List<TaskSkill> { new TaskSkill { SkillId = 2, Skill = new Skill(), TaskId = 1 } }, Event = new Event { Id = 3, Name = "EventName", CampaignId = 4, Campaign = new Campaign { StartDateTime = DateTimeOffset.Now, EndDateTime = DateTimeOffset.Now, Name = "CampaignName", ManagingOrganizationId = 5, TimeZoneId = "Central Standard Time" } } }; Context.Tasks.Add(task); Context.SaveChanges(); message = new EditTaskQuery { TaskId = task.Id }; sut = new EditTaskQueryHandler(Context); }
public EditTaskQueryHandlerShould() { task = new AllReadyTask { Id = 1, Name = "Taskname", Description = "Description", StartDateTime = DateTimeOffset.Now, EndDateTime = DateTimeOffset.Now, NumberOfVolunteersRequired = 5, RequiredSkills = new List <TaskSkill> { new TaskSkill { SkillId = 2, Skill = new Skill(), TaskId = 1 } }, Event = new Event { Id = 3, Name = "EventName", CampaignId = 4, Campaign = new Campaign { StartDateTime = DateTimeOffset.Now, EndDateTime = DateTimeOffset.Now, Name = "CampaignName", ManagingOrganizationId = 5, TimeZoneId = "Central Standard Time" }, TimeZoneId = "Central Standard Time" } }; Context.Tasks.Add(task); Context.SaveChanges(); message = new EditTaskQuery { TaskId = task.Id }; sut = new EditTaskQueryHandler(Context); }