public void ThrowExeptionWhenCommandParametersAreLessThanItShould() { string boardName = "Board"; IBoard board = new Board(boardName); string feedbackTitle = "feedbackTitle"; string description = "Feedback description"; int rating = 4; IFeedback feedback = new Feedback(feedbackTitle, description, rating); database.Boards.Add(board); database.Feedbacks.Add(feedback); List <string> parameters = new List <string> { feedbackTitle }; AddFeedbackToBoardCommand command = new AddFeedbackToBoardCommand(parameters); command.Execute(); }
public void AddsFeedbackToBoardCommand_Should() { string boardName = "Board"; IBoard board = new Board(boardName); string feedbackTitle = "feedbackTitle"; string description = "Feedback description"; int rating = 4; IFeedback feedback = new Feedback(feedbackTitle, description, rating); database.Boards.Add(board); database.Feedbacks.Add(feedback); List <string> parameters = new List <string> { feedbackTitle, boardName }; AddFeedbackToBoardCommand command = new AddFeedbackToBoardCommand(parameters); command.Execute(); Assert.IsTrue(board.WorkItems.Any(x => x.Title == feedbackTitle)); }