'Method is not implemented' error is displayed when clicked on 'Back' button.

vaibhav4242 1 Reputation point
2021-12-14T16:08:42.017+00:00
protected override void RunStarted(
             object automationObject,
             Dictionary<string, string> replacementsDictionary,
             WizardRunKind runKind,
             object[] customParams)
        {
            BaseTestTools defaultTestTool = BaseTestTools.Default;
            var dte = (DTE)automationObject;
            if (!bool.Parse(replacementsDictionary["$exclusiveproject$"]))
            {
                defaultTestTool = ProjectAutomationHelper.GetSolutionTestToolBasedOnBizLib(dte.Solution);
            }

            this.inputForm = new FuncTestWizardForm(replacementsDictionary["$safeprojectname$"], defaultTestTool);
            DialogResult result = this.inputForm.ShowDialog();

            logger.Trace("result from Dilaogresult ");
            if (result == DialogResult.OK)
            {
                string suiteName = this.inputForm.GetSuiteName();
                int automationTarget = this.inputForm.GetAutomationTarget();

                this.baseTestTool = this.inputForm.GeBaseTestTool();
                addBaseToolUsings(this.baseTestTool, ref replacementsDictionary);

                replacementsDictionary.Add("$suitename$", XmlEscapeHelper.EscapeString(suiteName));
                replacementsDictionary.Add("$automationtarget$", automationTarget.ToString("D"));
                replacementsDictionary.Add("$studioversion$", dte.Version);

                MtmProjectSettings mtmSettings = this.inputForm.GetMtmProjectSettings();

                if (mtmSettings.IsReportingEnabled)
                {
                    replacementsDictionary.Add("$mtmserver$", mtmSettings.MtmServerUrl);
                    replacementsDictionary.Add("$mtmproject$", mtmSettings.MtmTestProject);
                    replacementsDictionary.Add("$mtmplan$", mtmSettings.MtmTestPlanId != null ? mtmSettings.MtmTestPlanId.ToString() : string.Empty);
                    replacementsDictionary.Add("$isreportingenabled$", mtmSettings.IsReportingEnabled.ToString());
                    replacementsDictionary.Add("$mtmreportinglevel$", mtmSettings.MtmReportingLevel.ToString());
                    replacementsDictionary.Add("$publishaheadoftime$", mtmSettings.IsPublishAheadOfTimeEnabled.ToString());
                    writeMtmSettingsToRegistry(mtmSettings);
                }
                else
                {
                    replacementsDictionary.Add("$mtmserver$", string.Empty);
                    replacementsDictionary.Add("$mtmproject$", string.Empty);
                    replacementsDictionary.Add("$mtmplan$", string.Empty);
                    replacementsDictionary.Add("$isreportingenabled$", "False");
                    replacementsDictionary.Add("$mtmreportinglevel$", "Low");
                    replacementsDictionary.Add("$publishaheadoftime$", "True");
                }
            }

            if (result == DialogResult.Cancel)
            {
                    ProjectAutomationHelper.CleanupProjectDirectory(replacementsDictionary);
                    throw new WizardCancelledException();
            }
            if (result == DialogResult.Abort)
            {
                ProjectAutomationHelper.CleanupProjectDirectory(replacementsDictionary);
                throw new WizardBackoutException();
            }
        }
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,977 questions
{count} votes