Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public void ChangeStoryInvalidParameters_Should()
        {
            string storyName = "StoryShould";

            List <string> parameters = new List <string>
            {
                storyName
            };

            ChangeStoryPriorityCommand command = new ChangeStoryPriorityCommand(parameters);

            command.Execute();
        }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
        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();
        }
Esempio n. 5
0
        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();
        }