Пример #1
0
 private Milestone GetOrCreateMilestone(string sprintName, int projectId)
 {
     var mileStone = new Milestone
     {
         Name = sprintName,
         ProjectId = projectId
     };
     var mileStoneExists = _testrail.Extension.GetMilestoneByName(sprintName, projectId);
     if (mileStoneExists != null) return mileStoneExists;
     mileStone = _testrail.AddMilestone(projectId, mileStone);
     return mileStone;
 }
Пример #2
0
 private TestPlan CreateTestPlanForIssue(Issue issue, Milestone milestone)
 {
     var planName = $"[DEV] {issue.Key}: {issue.Summary}";
     var planAcceptanceCriteria = _jira.GetCustomFieldFromIssue(issue, "Acceptance Criteria");
     var planDescription =
         $"Description:\r\n{issue.Description}\r\n\r\nAcceptance Criteria:\r\n{planAcceptanceCriteria}";
     var plan = new TestPlan
     {
         MilestoneId = milestone.Id,
         Name = planName,
         Description = planDescription,
         ProjectId = milestone.ProjectId
     };
     return plan;
 }
Пример #3
0
 public Milestone AddMilestone(int projectId, Milestone milestone)
 {
     var url = $"add_milestone/{projectId}";
     var response = _client.SendPost(url, milestone);
     return JsonConvert.DeserializeObject<Milestone>(response.ToString());
 }
Пример #4
0
 public Milestone UpdateMilestone(int milestoneId, Milestone milestone)
 {
     var url = string.Format("update_milestone/" + milestoneId);
     var originalMilestone = GetMilestone(milestoneId);
     originalMilestone.MergeWith(milestone);
     var response = _client.SendPost(url, originalMilestone);
     return JsonConvert.DeserializeObject<Milestone>(response.ToString());
 }