예제 #1
0
        public void TestShouldParseLabelRangeWithDashesAndNoSpaces()
        {
            ParsedQuery parsedQuery = ParsedQuery.Parse("$/Test;LmyLabel-LotherLabel");

            Assert.AreEqual("LmyLabel", parsedQuery.StartVersion.DisplayString, "start version");
            Assert.AreEqual("LotherLabel", parsedQuery.EndVersion.DisplayString, "end version ('T' is latest)");
        }
예제 #2
0
        public void TestShouldParseOneWorkItem()
        {
            ParsedQuery parsedQuery = ParsedQuery.Parse("5432");

            Assert.AreEqual(1, parsedQuery.WorkItemIds.Count, "Number of work items parsed.");
            CollectionAssert.Contains(parsedQuery.WorkItemIds, 5432);
        }
예제 #3
0
        public void TestShouldParseSingleLabelAsDiffToCurrent()
        {
            ParsedQuery parsedQuery = ParsedQuery.Parse("$/Test;LmyLabel");

            Assert.AreEqual("LmyLabel", parsedQuery.StartVersion.DisplayString, "start version");
            Assert.AreEqual(VersionSpec.Latest, parsedQuery.EndVersion, "end version");
        }
예제 #4
0
        public void TestShouldHaveNoWorkItemNumbersForLabelSpec()
        {
            ParsedQuery parsedQuery = ParsedQuery.Parse("$/Test;LmyLabel-LotherLabel");

            Assert.IsNotNull(parsedQuery.WorkItemIds, "work item id collection should not be null.");
            Assert.AreEqual(0, parsedQuery.WorkItemIds.Count);
        }
예제 #5
0
        public void TestShouldGetPath()
        {
            ParsedQuery parsedQuery = ParsedQuery.Parse("$/Test;Lone, Ltwo");

            Assert.AreEqual("$/Test", parsedQuery.ServerPath);
        }
예제 #6
0
        public void TestShouldHaveVersionsForTwoLabels()
        {
            ParsedQuery parsedQuery = ParsedQuery.Parse("$/Test;Lone, Ltwo");

            Assert.AreEqual(true, parsedQuery.HasVersions);
        }
예제 #7
0
        public void TestShouldHaveVersionsForSingleLabel()
        {
            ParsedQuery parsedQuery = ParsedQuery.Parse("$/Test;Lone");

            Assert.AreEqual(true, parsedQuery.HasVersions);
        }
예제 #8
0
        public void TestShouldNotHaveVersionsForWorkItemNumbers()
        {
            ParsedQuery parsedQuery = ParsedQuery.Parse("5432, 4321");

            Assert.AreEqual(false, parsedQuery.HasVersions);
        }