Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [TestMethod]
- public void ToStringMethod_Should_Return()
- {
- int id = 1;
- string title = "mytesttitle";
- string description = "this is a test description";
- var steps = new List<string>();
- Priority priority = Priority.Low;
- Severity severity = Severity.Minor;
- string boardName = "testboard";
- string assignee = "no assignee";
- var testObject = new Bug(id, title, description, steps, priority, severity, boardName);
- var actual = testObject.ToString();
- var builder = new StringBuilder();
- builder.AppendLine($"Task type: BUG");
- builder.AppendLine($"Title: \"{title}\"");
- builder.AppendLine($"Description: \"{description}\"");
- builder.AppendLine($"Status: {Status.Active}");
- builder.AppendLine($"Severity: {severity}");
- builder.AppendLine($"Priority: {priority}");
- builder.AppendLine($"Assignee: {assignee}");
- foreach (string step in steps)
- {
- builder.AppendLine(step);
- }
- var expected = builder.ToString().TrimEnd();
- Assert.AreEqual(expected, actual);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement