Пример #1
0
 public void ChangePriorityOfExistingStory()
 {
     ScrumTimeEntities scrumTimeEntities = new ScrumTimeEntities();
     StoryService storyService = new StoryService(scrumTimeEntities);
     Story story = storyService.GetStoryById(2);
     story.Priority = 0;
     storyService.SaveStory(story);
 }
Пример #2
0
 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);
 }
Пример #3
0
        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;
        }
Пример #5
0
 public StoryController()
 {
     _ScrumTimeEntities = new ScrumTimeEntities();
     _StoryService = new StoryService(_ScrumTimeEntities);
 }