public void ThrowExeptionWhenStoryTitleIsNull() { string boardName = "Board"; IBoard board = new Board(boardName); string storyTitle = null; string description = "Story description"; List <string> stepsToProduce = new List <string> { "Noting", "to", "produce." }; IStory story = new Story(storyTitle, description); database.Boards.Add(board); database.Stories.Add(story); List <string> parameters = new List <string> { storyTitle, boardName }; AddStoryToBoardCommand command = new AddStoryToBoardCommand(parameters); command.Execute(); Assert.IsTrue(board.WorkItems.Any(x => x.Title == storyTitle)); }
public void ThrowExeptionWhenCommandParametersAreMoreThanItShouldCorrectly() { string boardName = "Board"; IBoard board = new Board(boardName); string storyTitle = "StoryTitle"; string description = "Story description"; List <string> stepsToProduce = new List <string> { "Noting", "to", "produce." }; IStory story = new Story(storyTitle, description); database.Boards.Add(board); database.Stories.Add(story); List <string> parameters = new List <string> { storyTitle, boardName, storyTitle }; AddStoryToBoardCommand command = new AddStoryToBoardCommand(parameters); command.Execute(); }