public void ChangeBugInvalidParameters_Should() { string bugName = "BugNameShould"; List <string> parameters = new List <string> { bugName }; ChangeBugSeverityCommand command = new ChangeBugSeverityCommand(parameters); command.Execute(); }
public void ThrowExeptionWhenCommandParametersAreLessThanItShould() { string bugName = "BugNameShould"; string description = "MegaBadBug"; List <string> stepsToProduce = new List <string> { "steps" }; var bug = new Bug(bugName, description, stepsToProduce); database.Bugs.Add(bug); List <string> parameters = new List <string> { bugName }; ChangeBugSeverityCommand command = new ChangeBugSeverityCommand(parameters); command.Execute(); }
public void InputBugNameIsNULL_Should() { string bugName = null; string description = "MegaBadBug"; Priority priority = Priority.High; List <string> stepsToProduce = new List <string> { "steps" }; var bug = new Bug(bugName, description, stepsToProduce); database.Bugs.Add(bug); List <string> parameters = new List <string> { bugName, priority.ToString() }; ChangeBugSeverityCommand command = new ChangeBugSeverityCommand(parameters); command.Execute(); }
public void InValidChangeBugPriority_Should() { string bugName = "BugNameShould"; string description = "MegaBadBug"; List <string> stepsToProduce = new List <string> { "steps" }; var bug = new Bug(bugName, description, stepsToProduce); database.Bugs.Add(bug); string newSeverity = "Invalid"; List <string> parameters = new List <string> { bugName, newSeverity }; ChangeBugSeverityCommand command = new ChangeBugSeverityCommand(parameters); command.Execute(); }
public void ValidChangeBugSeverity_Should() { string bugName = "BugNameShould"; string description = "MegaBadBug"; List <string> stepsToProduce = new List <string> { "steps" }; var bug = new Bug(bugName, description, stepsToProduce); database.Bugs.Add(bug); Severity newSeverity = Severity.Major; List <string> parameters = new List <string> { bugName, newSeverity.ToString() }; ChangeBugSeverityCommand command = new ChangeBugSeverityCommand(parameters); command.Execute(); Assert.IsTrue(bug.Priority.Equals(newSeverity)); }