Beispiel #1
0
 public void AddUserStoryToSprint(int sprintId, UserStory userStory)
 {
     if (userStory.State == UserStoryState.ON_SPRINT)
     {
         throw new CheckedException($"User story {userStory.Title} is already finished.", true);
     }
     else if (userStory.State != UserStoryState.BACKLOG)
     {
         throw new CheckedException($"User story {userStory.Title} is already finished.");
     }
     if (userStory.Tasks.Count == 0)
     {
         throw new CheckedException("User story does not have any tasks");
     }
     userStory.State = UserStoryState.ON_SPRINT;
     _projectDAO.AddUserStoryToSprint(sprintId, userStory);
 }