public void ValdateIfAnyTeamsExist(IAllTeams allTeams) { if (allTeams.AllTeamsList.Count == 0) { throw new NoTeamsInAppException(NoTeamsInApplication); } }
public void ValdateIfBoardsExistInTeam(IAllTeams allTeams, string teamToShowBoardsFor) { if (allTeams.AllTeamsList[teamToShowBoardsFor].Boards.Count() == 0) { throw new NoBoardsInTeamException(NoBoardsInTeam); } }
//Constructors public Member(string name, IAllTeams allTeams) { this.Name = name; this.allTeams = allTeams; this.ActivityHistory = new List <IActivityHistory>(); this.WorkItemsId = new List <Guid>(); }
public void ValidateTeamExistance(IAllTeams allTeams, string teamName) { if (!allTeams.AllTeamsList.ContainsKey(teamName)) { var NoSuchTeamInApplicationMessage = string.Format(NoSuchTeamInApplication, teamName); throw new TeamNotInAppException(NoSuchTeamInApplicationMessage); } }
public void ValidateIfTeamExists(IAllTeams allTeams, string teamName) { if (allTeams.AllTeamsList.ContainsKey(teamName)) { var TeamAlreadyExistsMessage = string.Format(TeamAlreadyExists, teamName); throw new TeamAlreadyInBoardException(TeamAlreadyExistsMessage); } }
public FilterFeedbacksOperation( IBusinessLogicValidator businessLogicValidator, IInputValidator inputValidator, IAllTeams allTeams) { this.businessLogicValidator = businessLogicValidator; this.inputValidator = inputValidator; this.allTeams = allTeams; }
public FilterBugsByPriorityOperation( IBusinessLogicValidator businessLogicValidator, IInputValidator inputValidator, IAllTeams allTeams) { this.businessLogicValidator = businessLogicValidator; this.inputValidator = inputValidator; this.allTeams = allTeams; }
public FilterStoriesByStatusOperation( IBusinessLogicValidator businessLogicValidator, IInputValidator inputValidator, IAllTeams allTeams) { this.businessLogicValidator = businessLogicValidator; this.inputValidator = inputValidator; this.allTeams = allTeams; }
public ListAllWorkItemsOperation( IBusinessLogicValidator businessLogicValidator, IInputValidator inputValidator, IAllTeams allTeams) { this.businessLogicValidator = businessLogicValidator; this.inputValidator = inputValidator; this.allTeams = allTeams; }
public SortStoriesByOperation( IBusinessLogicValidator businessLogicValidator, IInputValidator inputValidator, IAllTeams allTeams) { this.businessLogicValidator = businessLogicValidator; this.inputValidator = inputValidator; this.allTeams = allTeams; }
public void ValidateItemExistanceInBoard(IAllTeams allTeams, string boardNameToCheckFor, string teamToCheckForBoard, string itemNameToCheckFor) { if (!allTeams.AllTeamsList.Values.SelectMany(x => x.Boards) .First(board => board.Name == boardNameToCheckFor) .WorkItems.Any(item => item.Title == itemNameToCheckFor)) { var NoSuchItemInBoardMessage = string.Format(NoSuchItemInBoard, itemNameToCheckFor, boardNameToCheckFor, teamToCheckForBoard); throw new NoSuchItemInBoardException(NoSuchItemInBoardMessage); } }
public void ValidateBoardExistanceInTeam(IAllTeams allTeams, string boardNameToCheckFor, string teamToCheckForBoard) { if (allTeams.AllTeamsList.Values.SelectMany(x => x.Boards) .Where(board => board.Name == boardNameToCheckFor) .ToList().Count == 0) { var NoSuchBoardInTeamMessage = string.Format(NoSuchBoardInTeam, boardNameToCheckFor, teamToCheckForBoard); throw new NoSuchBoardInTeamException(NoSuchBoardInTeamMessage); } }
public void ValidateIfAnyWorkItemsExist(IAllTeams allTeams) { if (allTeams.AllTeamsList.Values .SelectMany(x => x.Boards) .SelectMany(x => x.WorkItems) .ToList().Count() == 0) { throw new NoWorkItemsInAppException(NoWorkItemsInApp); } }
public void ValidateIfMemberNotInTeam(IAllTeams allTeams, string teamToCheckForPerson, string personName) { if (allTeams.AllTeamsList[teamToCheckForPerson] .Members.Where(member => member.Name == personName) .ToList().Count == 0) { var MemberNotInTeamMessage = string.Format(MemberNotInTeam, personName, teamToCheckForPerson); throw new MemberNotInTeamException(MemberNotInTeamMessage); } }
public void ValidateBoardAlreadyInTeam(IAllTeams allTeams, string boardToAddToTeam, string teamForAddingBoardTo) { var boardMatches = allTeams.AllTeamsList[teamForAddingBoardTo].Boards .Where(boardInSelectedTeam => boardInSelectedTeam.Name == boardToAddToTeam); if (boardMatches.Count() > 0) { var BoardAlreadyExistsInTeamMessage = string.Format(BoardAlreadyExistsInTeam, boardToAddToTeam, teamForAddingBoardTo); throw new BoardAlreadyExistsInTeamException(BoardAlreadyExistsInTeamMessage); } }
public ShowBoardActivityOperation( IBusinessLogicValidator businessLogicValidator, IInputValidator inputValidator, IAllTeams allTeams, IBoardOperations boardOperations) { this.businessLogicValidator = businessLogicValidator; this.inputValidator = inputValidator; this.allTeams = allTeams; this.boardOperations = boardOperations; }
public AddCommentOperation( IInputValidator inputValidator, IAllTeams allTeams, IWorkItemOperations workItemOperations, IBusinessLogicValidator businessLogicValidator) { this.inputValidator = inputValidator; this.allTeams = allTeams; this.workItemOperations = workItemOperations; this.businessLogicValidator = businessLogicValidator; }
public ShowAllTeamMembersOperation( IBusinessLogicValidator businessLogicValidator, IInputValidator inputValidator, IAllTeams allTeams, ITeamOperations teamOperations) { this.businessLogicValidator = businessLogicValidator; this.inputValidator = inputValidator; this.allTeams = allTeams; this.teamOperations = teamOperations; }
public void ValidateIfAnyFeedbacksExist(IAllTeams allTeams) { if (allTeams.AllTeamsList.Values .SelectMany(x => x.Boards) .SelectMany(x => x.WorkItems) .Where(item => item.GetType() == typeof(Feedback)) .ToList() .Count() == 0) { throw new NoFeedbacksInAppException(NoFeedbacksInApp); } }
public AddPersonToTeamOperation( IInputValidator inputValidator, IAllTeams allTeams, IAllMembers allMembers, IBusinessLogicValidator businessLogicValidator, ITeamOperations teamOperations) { this.inputValidator = inputValidator; this.allTeams = allTeams; this.allMembers = allMembers; this.businessLogicValidator = businessLogicValidator; this.teamOperations = teamOperations; }
public CreateBoardOperation( IInputValidator inputValidator, IAllTeams allTeams, IWimFactory factory, IBusinessLogicValidator businessLogicValidator, ITeamOperations teamOperations) { this.inputValidator = inputValidator; this.allTeams = allTeams; this.factory = factory; this.businessLogicValidator = businessLogicValidator; this.teamOperations = teamOperations; }
public string ShowAllTeamsToString(IAllTeams allTeams) { StringBuilder sb = new StringBuilder(); int numberOfTeam = 1; foreach (var team in allTeams.AllTeamsList) { sb.AppendLine($"{numberOfTeam}. {team.Key}"); numberOfTeam++; } return(sb.ToString().Trim()); }
public void ValidateNoSuchBugInBoard(IAllTeams allTeams, string boardToAddFeedbackFor, string teamToAddFeedbackFor, string bugTitle) { var boardToCheckFeedbackFor = allTeams.AllTeamsList[teamToAddFeedbackFor].Boards .Where(boardInSelectedTeam => boardInSelectedTeam.Name == boardToAddFeedbackFor).First(); var doesBugExistInBoard = boardToCheckFeedbackFor.WorkItems .Where(boardInSelectedTeam => boardInSelectedTeam.GetType() == typeof(Bug)) .Any(feedbackThatExists => feedbackThatExists.Title == bugTitle); if (!doesBugExistInBoard) { var NoSuchBugInBoardMessage = string.Format(NoSuchBugInBoard, bugTitle, boardToAddFeedbackFor, teamToAddFeedbackFor); throw new NoSuchBugInBoardException(NoSuchBugInBoardMessage); } }
public CreateTeamOperation( IBusinessLogicValidator businessLogicValidator, IInputValidator inputValidator, IAllTeams allTeams, IWimFactory factory, IAllTeamsOperations allTeamsOperations, IMemberOpertaions memberOpertaions) { this.businessLogicValidator = businessLogicValidator; this.inputValidator = inputValidator; this.allTeams = allTeams; this.factory = factory; this.allTeamsOperations = allTeamsOperations; this.memberOpertaions = memberOpertaions; }
public ChangeBugSeverityOperation( IInputValidator inputValidator, IAllTeams allTeams, IBugOperations bugOperations, IBusinessLogicValidator businessLogicValidator, IMemberOpertaions memberOpertaions, IBoardOperations boardOperations) { this.inputValidator = inputValidator; this.allTeams = allTeams; this.bugOperations = bugOperations; this.businessLogicValidator = businessLogicValidator; this.memberOpertaions = memberOpertaions; this.boardOperations = boardOperations; }
public ChangeFeedbackStatusOperation( IInputValidator inputValidator, IAllTeams allTeams, IFeedbackOperations feedbackOperations, IBusinessLogicValidator businessLogicValidator, IMemberOpertaions memberOpertaions, IBoardOperations boardOperations) { this.inputValidator = inputValidator; this.allTeams = allTeams; this.feedbackOperations = feedbackOperations; this.businessLogicValidator = businessLogicValidator; this.memberOpertaions = memberOpertaions; this.boardOperations = boardOperations; }
public ChangeStoryStatusOperation( IInputValidator inputValidator, IAllTeams allTeams, IStoryOperations storyOperations, IBusinessLogicValidator businessLogicValidator, IMemberOpertaions memberOpertaions, IBoardOperations boardOperations) { this.inputValidator = inputValidator; this.allTeams = allTeams; this.storyOperations = storyOperations; this.businessLogicValidator = businessLogicValidator; this.memberOpertaions = memberOpertaions; this.boardOperations = boardOperations; }
public void ValidateBugExistanceInBoard(IAllTeams allTeams, string boardToAddBugFor, string teamToAddBugFor, string bugTitle) { var boardToCheckBugFor = allTeams.AllTeamsList[teamToAddBugFor].Boards .Where(boardInSelectedTeam => boardInSelectedTeam.Name == boardToAddBugFor).First(); var doesBugExistInBoard = boardToCheckBugFor.WorkItems .Where(boardInSelectedTeam => boardInSelectedTeam.GetType() == typeof(Bug)) .Any(bugThatExists => bugThatExists.Title == bugTitle); if (doesBugExistInBoard) { var BugAlreadyExistsMessage = string.Format(BugAlreadyExists, bugTitle, boardToAddBugFor, teamToAddBugFor); throw new BugAlreadyInBoardException(BugAlreadyExistsMessage); } }
public void ValidateStoryExistanceInBoard(IAllTeams allTeams, string boardToAddStoryFor, string teamToAddStoryFor, string storyTitle) { var boardToCheckStoryFor = allTeams.AllTeamsList[teamToAddStoryFor].Boards .Where(boardInSelectedTeam => boardInSelectedTeam.Name == boardToAddStoryFor) .First(); var doesStoryExistInBoard = boardToCheckStoryFor.WorkItems .Where(boardInSelectedTeam => boardInSelectedTeam.GetType() == typeof(Story)).Any(storyThatExists => storyThatExists.Title == storyTitle); if (doesStoryExistInBoard) { var StoryAlreadyExistsMessage = string.Format(StoryAlreadyExists, storyTitle, boardToAddStoryFor, teamToAddStoryFor); throw new StoryAlreadyInBoardException(StoryAlreadyExistsMessage); } }
public void ValidateFeedbackExistanceInBoard(IAllTeams allTeams, string boardToAddFeedbackFor, string teamToAddFeedbackFor, string feedbackTitle) { var boardToCheckFeedbackFor = allTeams.AllTeamsList[teamToAddFeedbackFor].Boards .Where(boardInSelectedTeam => boardInSelectedTeam.Name == boardToAddFeedbackFor).First(); var doesFeedbackExistInBoard = boardToCheckFeedbackFor.WorkItems .Where(boardInSelectedTeam => boardInSelectedTeam.GetType() == typeof(Feedback)) .Any(feedbackThatExists => feedbackThatExists.Title == feedbackTitle); if (doesFeedbackExistInBoard) { var FeedbackAlreadyExistsMessage = string.Format(FeedbackAlreadyExists, feedbackTitle, boardToAddFeedbackFor, teamToAddFeedbackFor); throw new FeedbackAlreadyInBoardException(FeedbackAlreadyExistsMessage); } }