Пример #1
0
        private async Task InitializeAsync()
        {
            this.Status = "Running tests...";

            var selfTestService = new SelfTestService();

            this.runResult = await selfTestService.RunTestsAsync(this.dte, this.classesProject, this.targetProjects);

            // For now just display the first detection failure
            if (this.runResult.DetectionFailures.Count > 0)
            {
                this.Status = this.runResult.DetectionFailures[0];
                return;
            }

            this.failures = new List <SelfTestFileFailure>(this.runResult.FileFailures);

            this.succeededCount = this.runResult.FilesSucceededCount;

            if (this.failures.Count == 0)
            {
                this.ShowSuccess();
            }
            else
            {
                this.ShowingDiff = true;
                this.RefreshUI();
            }
        }
Пример #2
0
        /// <summary>
        /// This function is the callback used to execute the command when the menu item is clicked.
        /// See the constructor to see how the menu item is associated with this function using
        /// OleMenuCommandService service and MenuCommand class.
        /// </summary>
        /// <param name="sender">Event sender.</param>
        /// <param name="e">Event args.</param>
        private void MenuItemCallback(object sender, EventArgs e)
        {
            var createTestService = new SelfTestService();

            createTestService.Clean(save: true);
        }