public XElement GetSortingXml()
        {
            var parser   = new LexalParser(this.QueryText);
            var sortList = parser.ProcessOrderBy();

            return(XElement.Parse(sortList.WriteToXml()));
        }
        public void OrderByParse1()
        {
            XElement el     = XElement.Parse(@"<f>select [System.Id], [Phoenix.DueDate], [Phoenix.MagicDueDate], [System.WorkItemType], [System.State], [System.Title], [System.IterationPath] 
from WorkItems 
where ([System.State] = 'New' 
    or [System.State] = 'Active') 
    and ([System.AssignedTo] = 'Ventsislav Mladenov' or [System.TeamProject] = @project) 
order by [System.Id]</f>");
            var      parser = new LexalParser(el.Value);
            var      nodes  = parser.ProcessOrderBy();

            Console.WriteLine(nodes);
            Assert.Equal("[System.Id] Asc", nodes.ToString());
        }
        public void OrderByParse2()
        {
            XElement el     = XElement.Parse(@"<f>SELECT [System.Id], [System.WorkItemType], [System.AssignedTo], [System.CreatedBy], [Microsoft.VSTS.Common.Priority], [System.Title], [System.Description] 
FROM WorkItems 
WHERE 
    [System.TeamProject] = @project 
AND [System.State] &lt;&gt; 'Closed' 
AND [Microsoft.VSTS.Common.Issue] = 'Yes' 
ORDER BY [Microsoft.VSTS.Common.Priority], [System.Id] desc</f>");
            var      parser = new LexalParser(el.Value);
            var      nodes  = parser.ProcessOrderBy();

            Console.WriteLine(nodes);
            Assert.Equal("[Microsoft.VSTS.Common.Priority] Asc, [System.Id] Desc", nodes.ToString());
        }