private void TestEditIssue(JiraCredentials credential) { CreateEntities(credential); try { var result = ProjectSteps.GetProjectMetadateByKey(credential, project.Key); JiraProjectMetadataModel projectMetadata = result.Data; var issue = TestData.GetJiraIssue(projectMetadata.Id, projectMetadata.Issuetypes[0].Id); JiraCreateIssueResult createIssueResult = IssueSteps.CreateIssue(credential, issue); issue.IssueIdOrKey = createIssueResult.Data.Key; issue.Issuetype = null; issue.Summary = null; issue.Description = "new edited description"; issue.Project = null; BaseJiraResult editResult = IssueSteps.EditIssue(credential, issue); Assert.AreEqual(editResult.Status, JiraResultStatus.Success); } finally { DeleteEntities(credential); } }
private void TestAssignIssue(JiraCredentials credential) { CreateEntities(credential); if (credential.JiraConnection == JiraConnectionType.JiraCloud) { Thread.Sleep(10000); // Jira won't allow to AssignIssue without this pause (after User creating). } try { var result = ProjectSteps.GetProjectMetadateByKey(credential, project.Key); JiraProjectMetadataModel projectMetadata = result.Data; var issue = TestData.GetJiraIssue(projectMetadata.Id, projectMetadata.Issuetypes[0].Id); JiraCreateIssueResult CreateIssueResult = IssueSteps.CreateIssue(credential, issue); JiraAssigneeModel Assign = new JiraAssigneeModel { AccountId = createUserResult.Data.AccountId, Key = createUserResult.Data.Key, IssueIdOrKey = CreateIssueResult.Data.Key }; BaseJiraResult AssigneResult = IssueSteps.AssignIssue(credential, Assign); Assert.AreEqual(AssigneResult.Status, JiraResultStatus.Success); } finally { DeleteEntities(credential); } }
private void TestCreateIssue(JiraCredentials credential) { CreateEntities(credential); try { var result = ProjectSteps.GetProjectMetadateByKey(credential, project.Key); JiraProjectMetadataModel projectMetadata = result.Data; var issue = TestData.GetJiraIssue(projectMetadata.Id, projectMetadata.Issuetypes[0].Id); JiraCreateIssueResult CreateResult = IssueSteps.CreateIssue(credential, issue); Assert.AreEqual(CreateResult.Status, JiraResultStatus.Success); } finally { DeleteEntities(credential); } }