示例#1
0
 public void Two()
 {
     AssertQuery(Source <JiraIssue>()
                 .Where(x => JqlFunctions.Contains(x.Summary, "test"))
                 .Where(x => x.Parent == "SOME_KEY"),
                 "((summary ~ \"test\") AND (parent = \"SOME_KEY\"))");
 }
示例#2
0
 public void ParentsOf()
 {
     AssertQuery(Source <JiraIssue>()
                 .Where(x => Source <JiraIssue>()
                        .Where(y => JqlFunctions.Contains(y.Summary, "test"))
                        .Any(y => y.Parent == x)),
                 "(ISSUEFUNCTION IN PARENTSOF(\"(summary ~ \\\"test\\\")\"))");
 }
示例#3
0
 public void SubTasksOf()
 {
     AssertQuery(Source <JiraIssue>()
                 .Where(x => Source <JiraIssue>()
                        .Where(y => JqlFunctions.Contains(y.Summary, "test"))
                        .Any(y => y == x.Parent)),
                 "(ISSUEFUNCTION IN SUBTASKSOF(\"(summary ~ \\\"test\\\")\"))");
 }
示例#4
0
 public void ParentsOf_Complex()
 {
     AssertQuery(Source <JiraIssue>()
                 .Where(x => x.Key == "TEST_KEY")
                 .Where(x => Source <JiraIssue>()
                        .Where(y => JqlFunctions.Contains(y.Summary, "test"))
                        .Any(y => y.Parent == x)),
                 "((key = \"TEST_KEY\") AND (ISSUEFUNCTION IN PARENTSOF(\"(summary ~ \\\"test\\\")\")))");
 }
示例#5
0
        public async Task False()
        {
            await jira.CreateIssueAsync(new JiraIssue
            {
                Project   = TestMetadata.Project,
                IssueType = TestMetadata.IssueType,
                Summary   = "Тестовая тема"
            }, CancellationToken.None);

            AssertEmpty(Source <JiraCustomIssue>()
                        .Where(x => JqlFunctions.Contains(x.Summary, Guid.NewGuid().ToString())));
        }
示例#6
0
        public async Task True()
        {
            var reference = await jira.CreateIssueAsync(new JiraIssue
            {
                Project   = TestMetadata.Project,
                IssueType = TestMetadata.IssueType,
                Summary   = "Тестовая тема"
            }, CancellationToken.None);

            AssertSingle(Source <JiraCustomIssue>()
                         .Where(x => JqlFunctions.Contains(x.Summary, "тема")),
                         reference);
        }
示例#7
0
 public async Task Test()
 {
     for (var i = 0; i < 1643; ++i)
     {
         await jira.CreateIssueAsync(new JiraCustomIssue
         {
             Project   = TestProject,
             IssueType = TestMetadata.IssueType,
             Summary   = "Тестовая тема"
         }, CancellationToken.None);
     }
     Assert.That(
         Source <JiraCustomIssue>().Any(x => JqlFunctions.Contains(x.Summary, "тема")),
         Is.True);
 }