public void ThrowExeptionWhenWorkItemTitleIsNull() { string workitem = "Bug"; string currentWorkItemName = null; string comment = "bugComment"; string bugTitle = "MnogoLoshBug"; string description = "Bug description"; List <string> stepsToProduce = new List <string> { "steps" }; IBug bug = new Bug(bugTitle, description, stepsToProduce); database.Bugs.Add(bug); List <string> parameters = new List <string> { workitem, currentWorkItemName, comment }; AddCommentToWorkItemCommand command = new AddCommentToWorkItemCommand(parameters); command.Execute(); }
public void AddCommentToWorkItemCommand() { string workitem = "Bug"; string currentWorkItemName = "MnogoLoshBug"; string comment = "bugComment"; string bugTitle = "MnogoLoshBug"; string description = "Bug description"; List <string> stepsToProduce = new List <string> { "steps" }; IBug bug = new Bug(bugTitle, description, stepsToProduce); database.Bugs.Add(bug); List <string> parameters = new List <string> { workitem, currentWorkItemName, comment }; AddCommentToWorkItemCommand command = new AddCommentToWorkItemCommand(parameters); command.Execute(); Assert.IsTrue(bug.Comments.Any(x => x.Value == comment)); }