Пример #1
0
 private void OnRecipeStarted(object sender, RecipeEventArgs args) {
    Enabled = true;
 }
Пример #2
0
 private void OnRecipeStarted(object sender, RecipeEventArgs args) {
    _startTime = DateTime.Now;
    Reset(_waitingForTestRunToFinish, _waitingForTestRunToFinish);
 }
Пример #3
0
 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;
 }
Пример #5
0
      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;
 }
Пример #7
0
 private void RecipeLoaded(object sender, RecipeEventArgs args) {
    HookupRecipe();
    RefreshCategoriesList();
 }
Пример #8
0
 private void OnSelectorModified(object sender, RecipeEventArgs args) {
    UpdateFormTitle();
 }
Пример #9
0
 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);
 }
Пример #10
0
 private void OnRecipeSaved(object sender, RecipeEventArgs args) {
    UpdateFormTitle();
 }
Пример #11
0
 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();
    }
 }
Пример #12
0
      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();
         }
      }
Пример #13
0
 private void OnRecipeLoadFailed(object sender, RecipeEventArgs args) {
    MessageBox.Show(this, args.Message, "csUnitRunner - Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
 }
Пример #14
0
 private void OnRecipeFinishedOrAborted(object sender, RecipeEventArgs args) {
    Enabled = false;
 }
Пример #15
0
 private void OnOtherRecipeEvent(object sender, RecipeEventArgs args) {
    UpdateEnabledStatus();
 }
Пример #16
0
 void OnRecipeClosing(object sender, RecipeEventArgs args) {
    UnhookRecipe();
 }
Пример #17
0
 private void OnRecipeLoaded(object sender, RecipeEventArgs args) {
    RecipeFactory.Current.AssemblyAdded += _onAssemblyAdded;
 }
Пример #18
0
 void OnRecipeLoaded(object sender, RecipeEventArgs args) {
    HookupRecipe();
 }
Пример #19
0
 private static void CurrentStarted(object sender, RecipeEventArgs args) {
 }
Пример #20
0
 private void OnRecipeStartedOrFinished(object sender, RecipeEventArgs args) {
    UpdateEnabledStatus();
 }
Пример #21
0
 void RecipeFactory_Loaded(object sender, RecipeEventArgs args) {
    _results = new DefaultXmlWriter(RecipeFactory.Current, string.Empty);
    RecipeFactory.Current.Finished += Current_Finished;
    Enabled = false;
 }
Пример #22
0
 private void RecipeAborted(object sender, RecipeEventArgs args) {
    _recipeAbortMessage = args.Message;
    _recipeAborted = true;
 }
Пример #23
0
 private void OnRecipeStarted(object sender, RecipeEventArgs args) {
    _startTime = DateTime.Now;
 }
Пример #24
0
 private void OnRecipeSaved(object sender, RecipeEventArgs args) {
    _recentRecipies.AddRecipe(RecipeFactory.Current.PathName);
 }
Пример #25
0
 private void OnRecipeLoaded(object sender, RecipeEventArgs args) {
    HookupRecipe();
    Reset(_avgTimePerTestUnknown, _estimatedOverheadUnknown);
 }
Пример #26
0
 private void OnRecipeLoaded(object sender, RecipeEventArgs args) {
    HookupRecipe();
    UpdateEnabledStatus();
 }
Пример #27
0
 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"));
    }
 }
Пример #28
0
 private void OnRecipeClosing(object sender, RecipeEventArgs args) {
    UnhookRecipe();
    UpdateEnabledStatus();
 }
Пример #29
0
 private void OnRecipeLoaded(object sender, RecipeEventArgs args) {
    _failedTestCriterion = new MultipleTestsCriterion();
    HookupRecipe();
 }
Пример #30
0
 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);
          }
       }
    }
 }