public void ChangePriorityOfExistingStory() { ScrumTimeEntities scrumTimeEntities = new ScrumTimeEntities(); StoryService storyService = new StoryService(scrumTimeEntities); Story story = storyService.GetStoryById(2); story.Priority = 0; storyService.SaveStory(story); }
public void AddNewStory() { ScrumTimeEntities scrumTimeEntities = new ScrumTimeEntities(); StoryService storyService = new StoryService(scrumTimeEntities); Story story = new Story() { Narrative = "Test story", Points = 8, Priority = 2, ProductId = 1, UserDefinedId = "not set" }; storyService.SaveStory(story); }
public void DeleteStory() { ScrumTimeEntities scrumTimeEntities = new ScrumTimeEntities(); StoryService storyService = new StoryService(scrumTimeEntities); Story story = new Story() { Narrative = "Test story for deletion test.", Points = 8, Priority = 2, ProductId = 1, UserDefinedId = "not set" }; storyService.SaveStory(story); storyService.DeleteStory(story.StoryId); }
public static TaskCollectionViewModel BuildByIdAsc(int storyId) { ScrumTimeEntities scrumTimeEntities = new ScrumTimeEntities(); StoryService storyService = new StoryService(scrumTimeEntities); Story parentStory = storyService.GetStoryById(storyId); var results = from t in parentStory.Tasks orderby t.TaskId ascending select t; TaskCollectionViewModel taskCollectionViewModel = new TaskCollectionViewModel() { ParentStoryModel = parentStory, SortedTaskModels = results.ToList<Task>() }; return taskCollectionViewModel; }
public StoryController() { _ScrumTimeEntities = new ScrumTimeEntities(); _StoryService = new StoryService(_ScrumTimeEntities); }