private void OnRecipeStarted(object sender, RecipeEventArgs args) { Enabled = true; }
private void OnRecipeStarted(object sender, RecipeEventArgs args) { _startTime = DateTime.Now; Reset(_waitingForTestRunToFinish, _waitingForTestRunToFinish); }
private void OnRecipeClosing(object sender, RecipeEventArgs args) { foreach(var assembly in RecipeFactory.Current.Assemblies) { assembly.TestError -= _onTestErrorOrFail; assembly.TestFailed -= _onTestErrorOrFail; } }
void Current_Finished(object sender, RecipeEventArgs args) { Enabled = true; }
private void OnRecipeFinished(object sender, RecipeEventArgs args) { var total = _document.CreateAttribute("total"); total.Value = (_passedCount + _failureCount + _errorCount + _skippedCount).ToString(); _results.Attributes.Append(total); CreateAttributeOnResults("passed", _passedCount.ToString()); CreateAttributeOnResults("failures", _failureCount.ToString()); CreateAttributeOnResults("errors", _errorCount.ToString()); CreateAttributeOnResults("skipped", _skippedCount.ToString()); CreateAttributeOnResults("duration", (DateTime.Now - _startTime).TotalSeconds.ToString("0.000")); _startTime = DateTime.MinValue; }
private void OnRecipeClosing(object sender, RecipeEventArgs args) { RecipeFactory.Current.AssemblyAdded -= _onAssemblyAdded; }
private void RecipeLoaded(object sender, RecipeEventArgs args) { HookupRecipe(); RefreshCategoriesList(); }
private void OnSelectorModified(object sender, RecipeEventArgs args) { UpdateFormTitle(); }
private void OnRecipeLoaded(object sender, RecipeEventArgs args) { _testSpec = new TestSpec(); Recipe.Current.AssemblyRemoving += _onAssemblyRemoving; foreach(TestAssembly ass in Recipe.Current.Assemblies) { ass.TestError += _onTestErrorOrFail; ass.TestFailed += _onTestErrorOrFail; } OnUiUpdate(sender, args); }
private void OnRecipeSaved(object sender, RecipeEventArgs args) { UpdateFormTitle(); }
private void OnRecipeAborted(object sender, RecipeEventArgs args) { Status = "Tests aborted."; if(_clh.HasOption("autoexit")) { if(_xmlWriter != null) { _xmlWriter.Save(); } // Close the current recipe RecipeFactory.Current.Close(); Application.Exit(); } }
private void OnRecipeFinished(object sender, RecipeEventArgs args) { TimeSpan duration = DateTime.Now.Subtract(_startTime); Status = "Duration: " + duration.TotalSeconds.ToString("0.000") + " seconds. Finished at: " + DateTime.Now.ToShortTimeString(); UpdateFormTitle(); #if DEBUG _bIdle = true; #endif if(_clh.HasOption("autoexit")) { if(_xmlWriter != null) { _xmlWriter.Save(); } // Close the current recipe RecipeFactory.Current.Close(); Application.Exit(); } }
private void OnRecipeLoadFailed(object sender, RecipeEventArgs args) { MessageBox.Show(this, args.Message, "csUnitRunner - Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); }
private void OnRecipeFinishedOrAborted(object sender, RecipeEventArgs args) { Enabled = false; }
private void OnOtherRecipeEvent(object sender, RecipeEventArgs args) { UpdateEnabledStatus(); }
void OnRecipeClosing(object sender, RecipeEventArgs args) { UnhookRecipe(); }
private void OnRecipeLoaded(object sender, RecipeEventArgs args) { RecipeFactory.Current.AssemblyAdded += _onAssemblyAdded; }
void OnRecipeLoaded(object sender, RecipeEventArgs args) { HookupRecipe(); }
private static void CurrentStarted(object sender, RecipeEventArgs args) { }
private void OnRecipeStartedOrFinished(object sender, RecipeEventArgs args) { UpdateEnabledStatus(); }
void RecipeFactory_Loaded(object sender, RecipeEventArgs args) { _results = new DefaultXmlWriter(RecipeFactory.Current, string.Empty); RecipeFactory.Current.Finished += Current_Finished; Enabled = false; }
private void RecipeAborted(object sender, RecipeEventArgs args) { _recipeAbortMessage = args.Message; _recipeAborted = true; }
private void OnRecipeStarted(object sender, RecipeEventArgs args) { _startTime = DateTime.Now; }
private void OnRecipeSaved(object sender, RecipeEventArgs args) { _recentRecipies.AddRecipe(RecipeFactory.Current.PathName); }
private void OnRecipeLoaded(object sender, RecipeEventArgs args) { HookupRecipe(); Reset(_avgTimePerTestUnknown, _estimatedOverheadUnknown); }
private void OnRecipeLoaded(object sender, RecipeEventArgs args) { HookupRecipe(); UpdateEnabledStatus(); }
private void OnRecipeFinished(object sender, RecipeEventArgs args) { if(InvokeRequired) { Invoke(new RecipeEventHandler(this.OnRecipeFinished), new object[] { sender, args }); } else { UpdatePercentages(); TimeSpan overallDuration = DateTime.Now - _startTime; double estimatedOverhead = overallDuration.TotalMilliseconds - _totalTestTime / (1000 * 1000); double percentage = 100 * estimatedOverhead / overallDuration.TotalMilliseconds; _overheadTimeLabel.Text = String.Format( _estimatedOverheadFormat, estimatedOverhead.ToString("N2"), percentage.ToString("N2")); double averageTimePerTest = ((double)_totalTestTime) / _testCount / (1000 * 1000); _averageTimeLabel.Text = String.Format( _averageTestTimeFormat, averageTimePerTest.ToString("N2"), (1000.0d / averageTimePerTest).ToString("N2")); } }
private void OnRecipeClosing(object sender, RecipeEventArgs args) { UnhookRecipe(); UpdateEnabledStatus(); }
private void OnRecipeLoaded(object sender, RecipeEventArgs args) { _failedTestCriterion = new MultipleTestsCriterion(); HookupRecipe(); }
private void RunTests(ITestAssembly testAssembly, ITestRun testRun) { if( testAssembly != null ) { try { //testAssembly.Refresh(); testAssembly.RunTests(testRun); } catch( Exception ex ) { // Invoke the abort event b/c an exception that goes unhandled // here is the equivalent of an aborted recipe. var recipeEventArgs = new RecipeEventArgs(ex.Message); TestsRunning = false; if( Aborted != null ) { Aborted(this, recipeEventArgs); } } } }