public void MultipleIssueNumberReferencesEnclosedInBracketsGetsParsedCorrectly(string comment, params string[] expectedReferences) { var workItemReferences = new CommentParser().ParseWorkItemIds(Create(comment)); Assert.IsNotEmpty(workItemReferences); Assert.AreEqual(2, workItemReferences.Length); var reference = workItemReferences.First(); Assert.AreEqual(expectedReferences[0], reference); reference = workItemReferences.Last(); Assert.AreEqual(expectedReferences[1], reference); }
public void MultipleIssueNumberWithAlphaNumericProjectIdentifierEnclosedInBracketsReferencesGetsParsedCorrectly(string comment, params string[] expectedReferences) { var workItemReferences = new CommentParser().ParseWorkItemIds(Create("Fixes Bt2-1234,Bt2-2345")); Assert.IsNotEmpty(workItemReferences); Assert.AreEqual(2, workItemReferences.Length); var reference = workItemReferences.First(); Assert.AreEqual(expectedReferences[0], reference); reference = workItemReferences.Last(); Assert.AreEqual(expectedReferences[1], reference); }
public void MultipleIssueNumberReferencesGetsParsedCorrectly() { var workItemReferences = new CommentParser().ParseWorkItemIds(Create("Fixes JRE-1234,JRE-2345")); Assert.IsNotEmpty(workItemReferences); Assert.AreEqual(2, workItemReferences.Length); var reference = workItemReferences.First(); Assert.AreEqual("JRE-1234", reference); reference = workItemReferences.Last(); Assert.AreEqual("JRE-2345", reference); }
public void MultipleIssueNumberWithAlphaNumericProjectIdentifierReferencesGetsParsedCorrectly() { var workItemReferences = new CommentParser().ParseWorkItemIds(Create("Fixes Bt2-1234,Bt2-2345")); Assert.IsNotEmpty(workItemReferences); Assert.AreEqual(2, workItemReferences.Length); var reference = workItemReferences.First(); Assert.AreEqual("Bt2-1234", reference); reference = workItemReferences.Last(); Assert.AreEqual("Bt2-2345", reference); }