public void AssingANewStoryToEpic()
        {
            var createIssue = new CreateIssueBuilder().
                              WithIssueType("Epic").
                              WithIssueName("EpicTest").
                              Build();
            var issue              = new Issue(restClient);
            var objectResponse     = issue.CreateIssue(createIssue);
            var statusCodeResponse = issue.UpdateIssue("JIR-2", objectResponse.key);

            Assert.AreEqual("NoContent", statusCodeResponse);
            Console.WriteLine(objectResponse.key);
            Assert.AreEqual("NoContent", statusCodeResponse);
        }
        public void CreateNewTicket()
        {
            var createIssue = new CreateIssueBuilder().
                              WithIssueType("Epic").
                              WithIssueName("EpicTest").
                              Build();
            var issue          = new Issue(restClient);
            var objectResponse = issue.CreateIssue(createIssue);

            AllureLifecycle.Instance.WrapInStep(
                () => {
                Console.WriteLine(objectResponse.key);
                Assert.IsNotNull(objectResponse.key);
            },
                "Validate Creation of Epic");
        }
        private void Default_Send_Click(object sender, EventArgs e)
        {
            if (F_ReportBug_TB_Title.Text == String.Empty || F_ReportBug_TB_Content.Text == String.Empty)
            {
                return;
            }

            PasswordHasher hasher = new PasswordHasher();

            string key    = _settings.GetValue("OauthKey");
            string secret = _settings.GetValue("OAuthSecret");

            if (key == string.Empty || secret == string.Empty)
            {
                F_OAuth OAuthEntry = new F_OAuth(_settings);

                OAuthEntry.ShowDialog();
                if (!OAuthEntry.GoodToGO)
                {
                    return;
                }
                key    = _settings.GetValue("OauthKey");
                secret = _settings.GetValue("OAuthSecret");
            }

            F_Password passwordForm = new F_Password();

            passwordForm.ShowDialog();

            string realPassword = _settings.GetValue("OAuthPassword");

            if (!hasher.CheckPassword(passwordForm.Password, realPassword))
            {
                MessageBox.Show(CentralLanguage.LanguageManager.GetText("Message_Wrong_Password_Text"), CentralLanguage.LanguageManager.GetText("Message_Wrong_Password_Title"), MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            RepositoryData repository = new RepositoryData("XanatosX", "modulartoolmanager");

            PasswordManager pwManager      = new PasswordManager();
            OAuth           authentication = new OAuth(pwManager.DecryptPassword(key, passwordForm.Password), pwManager.DecryptPassword(secret, passwordForm.Password));

            if (authentication.ResponseData == null)
            {
                return;
            }


            Issue issue = new Issue(repository, authentication.ResponseData);
            HashSet <FileInfo> files       = GetFiles();
            List <string>      uploadFiles = new List <string>();

            foreach (FileInfo fi in files)
            {
                if (!File.Exists(fi.FullName))
                {
                    continue;
                }
                uploadFiles.Add(fi.FullName);
            }


            string UploadWindowTitle = CentralLanguage.LanguageManager.GetText("Message_Upload_Status_Title");

            if (issue.CreateIssue(new IssueCreateData(F_ReportBug_TB_Title.Text, F_ReportBug_TB_Content.Text, _curPriority, _curKind), uploadFiles.ToArray()))
            {
                MessageBox.Show(CentralLanguage.LanguageManager.GetText("Message_Upload_Status_Succeded"), UploadWindowTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
                return;
            }

            MessageBox.Show(CentralLanguage.LanguageManager.GetText("Message_Upload_Status_Failed"), UploadWindowTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);
        }