public void ValidChangeStoryPriority_Should() { //Default Priority: High string storyName = "StoryNameShould"; string description = "MegaBadStory"; List <string> stepsToProduce = new List <string> { "steps" }; var story = new Story(storyName, description); database.Stories.Add(story); string newPriority = "Low"; List <string> parameters = new List <string> { storyName, newPriority.ToString() }; ChangeStoryPriorityCommand command = new ChangeStoryPriorityCommand(parameters); command.Execute(); Assert.AreEqual(story.Priority, Priority.Low); }
public void ChangeStoryInvalidParameters_Should() { string storyName = "StoryShould"; List <string> parameters = new List <string> { storyName }; ChangeStoryPriorityCommand command = new ChangeStoryPriorityCommand(parameters); command.Execute(); }
public void ThrowExeptionWhenCommandParametersAreLessThanItShould() { string storyName = "StoryNameShould"; string description = "MegaBadStory"; List <string> stepsToProduce = new List <string> { "steps" }; var story = new Story(storyName, description); database.Stories.Add(story); List <string> parameters = new List <string> { storyName }; ChangeStoryPriorityCommand command = new ChangeStoryPriorityCommand(parameters); command.Execute(); }
public void InputStoryNameIsNULL_Should() { string storyName = null; string description = "MegaBadStory"; List <string> stepsToProduce = new List <string> { "steps" }; var story = new Story(storyName, description); database.Stories.Add(story); Priority priority = Priority.High; List <string> parameters = new List <string> { storyName, priority.ToString() }; ChangeStoryPriorityCommand command = new ChangeStoryPriorityCommand(parameters); command.Execute(); }
public void InValidChangeStoryPriority_Should() { string storyName = "StoryNameShould"; string description = "MegaBadStory"; List <string> stepsToProduce = new List <string> { "steps" }; var story = new Story(storyName, description); database.Stories.Add(story); string newPriority = "Invalid Priority"; List <string> parameters = new List <string> { storyName, newPriority }; ChangeStoryPriorityCommand command = new ChangeStoryPriorityCommand(parameters); command.Execute(); }