IAsyncOperation RunTest(ITreeNavigator nav, IExecutionHandler mode, bool bringToFront = true) { if (nav == null) { return(null); } UnitTest test = nav.DataItem as UnitTest; if (test == null) { return(null); } NUnitService.ResetResult(test.RootTest); this.buttonRunAll.Sensitive = false; this.buttonStop.Sensitive = true; if (bringToFront) { IdeApp.Workbench.GetPad <TestPad> ().BringToFront(); } runningTestOperation = testService.RunTest(test, mode); runningTestOperation.Completed += (OperationHandler)DispatchService.GuiDispatch(new OperationHandler(OnTestSessionCompleted)); return(runningTestOperation); }
void RunTests() { try { NUnitService.ResetResult(test); TestContext ctx = new TestContext(monitor, resultsPad, context, DateTime.Now); test.Run(ctx); test.SaveResults(); success = true; } catch (Exception ex) { LoggingService.LogError(ex.ToString()); monitor.ReportRuntimeError(null, ex); success = false; } finally { monitor.FinishTestRun(); runThread = null; } lock (this) { if (waitEvent != null) { waitEvent.Set(); } } if (Completed != null) { Completed(this); } }
AsyncOperation RunTest(ITreeNavigator nav, IExecutionHandler mode, bool bringToFront = true) { if (nav == null) { return(null); } UnitTest test = nav.DataItem as UnitTest; if (test == null) { return(null); } NUnitService.ResetResult(test.RootTest); this.buttonRunAll.Sensitive = false; this.buttonStop.Sensitive = true; if (bringToFront) { IdeApp.Workbench.GetPad <TestPad> ().BringToFront(); } runningTestOperation = testService.RunTest(test, mode); runningTestOperation.Task.ContinueWith(t => OnTestSessionCompleted(), TaskScheduler.FromCurrentSynchronizationContext()); return(runningTestOperation); }
protected override void OnCreateTests() { NUnitService testService = NUnitService.Instance; foreach (SolutionItem e in combine.Items) { UnitTest t = testService.BuildTest(e); if (t != null) { Tests.Add(t); } } }
protected override void OnCreateTests() { NUnitService testService = NUnitService.Instance; foreach (WorkspaceItem e in workspace.Items) { UnitTest t = testService.BuildTest(e); if (t != null) { Tests.Add(t); } } }
void RunTests() { try { NUnitService.ResetResult(test); TestContext ctx = new TestContext(monitor, resultsPad, context, DateTime.Now); test.Run(ctx); test.SaveResults(); } catch (Exception ex) { LoggingService.LogError(ex.ToString()); monitor.ReportRuntimeError(null, ex); } finally { monitor.FinishTestRun(); } }
protected void OnShowOptions() { UnitTest test = CurrentNode.DataItem as UnitTest; NUnitService.ShowOptionsDialog(test); }