private void Update() { // Do this work in the background to avoid a possible deadlock acquiring the report lock // on the UI thread. taskManager.ClearQueue(QueueId); taskManager.QueueTask(QueueId, new DelegateCommand((pm => testController.ReadReport(report => { TestModelData = report.TestModel; var testStepRuns = new List <TestStepRun>(); if (report.TestPackageRun != null) { foreach (var testStepRun in report.TestPackageRun.AllTestStepRuns) { if (RelevantStep(testStepRun)) { testStepRuns.Add(testStepRun); } } } EventHandlerPolicy.SafeInvoke(ExecutionLogUpdated, this, new ExecutionLogUpdatedEventArgs(testStepRuns)); })))); }
public void ViewSourceCode(string testId, IProgressMonitor progressMonitor) { using (progressMonitor.BeginTask("View source code", 100)) { var codeLocation = CodeLocation.Unknown; testController.ReadReport(report => { if (report.TestModel == null) { return; } var testData = report.TestModel.GetTestById(testId); if (testData != null) { codeLocation = testData.CodeLocation; } }); if (CanDisplay(codeLocation)) { ViewSourceCode(codeLocation); } } }
private void UpdateList() { annotations.Clear(); testController.ReadReport(r => annotations = r.TestModel.Annotations); OnPropertyChanged(new PropertyChangedEventArgs("Annotations")); OnPropertyChanged(new PropertyChangedEventArgs("ErrorsText")); OnPropertyChanged(new PropertyChangedEventArgs("WarningsText")); OnPropertyChanged(new PropertyChangedEventArgs("InfoText")); }
public void Execute(IProgressMonitor progressMonitor) { testController.ReadReport(report => { string fileName = reportController.ShowReport(report, ReportFormat, progressMonitor); if (!string.IsNullOrEmpty(fileName) && fileSystem.FileExists(fileName)) { fileSystem.OpenFile(fileName); } }); }
public void Execute(IProgressMonitor progressMonitor) { testController.ReadReport(report => reportController.GenerateReport(report, ReportOptions, progressMonitor)); }