public void TestCreateIssue_InvalidTitleAndDescription_ShouldThrowUp() { IIssueTracker tracker = new FakeIssueTrackerWithLoggedUser(); string title = "ab"; string description = "abc"; IssuePriority priority = (IssuePriority)Enum.Parse(typeof(IssuePriority), "low"); string[] tags = new string[] { "new", "issue", "another" }; tracker.CreateIssue(title, description, priority, tags); }
public void TestCreateIssue_ValidIssueDetails_ShouldAddIssueToDatabase() { IIssueTracker tracker = new FakeIssueTrackerWithLoggedUser(); string title = "title"; string description = "description"; IssuePriority priority = (IssuePriority)Enum.Parse(typeof(IssuePriority), "low"); string[] tags = new string[] { "new", "issue", "another" }; string result = tracker.CreateIssue(title, description, priority, tags); Assert.AreEqual(result, "Issue 1 created successfully", "CreateIssue() does not return proper outcome after successful issue creation."); }