예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }