예제 #1
0
 private void OnRecipeFinishedAsync(object sender, RecipeEventArgs args)
 {
     if (_failureNodes.Count > 0)
     {
         EnsureTreeNodeVisible(_failureNodes[0]);
     }
 }
예제 #2
0
 private void OnRecipeLoaded(object sender, RecipeEventArgs args)
 {
     _selectedItems.Clear();
     UnhookRecipe();
     Reset();
     HookupRecipe();
 }
예제 #3
0
 // bubble up the event so consumers of the IRecipeManagerService can get a hold of it
 void package_AfterRecipeExecution(object sender, RecipeEventArgs e)
 {
     if (AfterRecipeExecution != null)
     {
         AfterRecipeExecution(sender, e);
     }
 }
예제 #4
0
 private void OnRecipeStarted(object sender, RecipeEventArgs args)
 {
     Reset();
     if (FindPanel.Visible)
     {
         Command.ExecuteCommand(typeof(ShowFindPanelCommand), this, new EventArgs());
     }
 }
예제 #5
0
 private void OnRecipeClosing(object sender, RecipeEventArgs args)
 {
     foreach (var assembly in RecipeFactory.Current.Assemblies)
     {
         assembly.TestError  -= _onTestErrorOrFail;
         assembly.TestFailed -= _onTestErrorOrFail;
     }
 }
예제 #6
0
        //private static void EnsureTreeNodeVisible(TreeNode node) {
        //   TreeNode parent = node.Parent;
        //   while(parent != null) {
        //      parent.Expand();
        //      parent = parent.Parent;
        //   }
        //   node.EnsureVisible();
        //}

        private void OnRecipeStarted(object sender, RecipeEventArgs args)
        {
            HideSearchPanel();
            Reset();
            //TreeNode selectedNode = _treeTestHierarchy.SelectedNode;
            //if( selectedNode != null ) {
            //   _treeTestHierarchy.SelectedNode = selectedNode;
            //   EnsureTreeNodeVisible(selectedNode);
            //}
        }
예제 #7
0
        private void OnRecipeStarted(object sender, RecipeEventArgs args)
        {
            var selectedNode = _treeTestHierarchy.SelectedNode;

            Reset();
            if (selectedNode != null)
            {
                _treeTestHierarchy.SelectedNode = selectedNode;
                EnsureTreeNodeVisible(selectedNode);
            }
        }
예제 #8
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);
 }
예제 #9
0
        void guidanceNavigatorManager_RecipeExecuted(object sender, RecipeEventArgs e)
        {
            GuidancePackage package = (GuidancePackage)sender;

            if (package != selectedGuidancePackage)
            {
                SelectPackage(package);
            }
            GuidanceNavigatorManager.RecipeExecutionHistory[] history     = guidanceNavigatorManager.GetExecutedRecipes(package).ToArray();
            GuidanceNavigatorManager.RecipeExecutionHistory   historyItem = history.GetValue(history.Length - 1) as GuidanceNavigatorManager.RecipeExecutionHistory;

            AddHistoryRecipeEntry(historyItem);
            ShowHistoryRecipes();
        }
예제 #10
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();
     }
 }
예제 #11
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;
        }
예제 #12
0
        void OnAfterRecipeExecution(object sender, RecipeEventArgs e)
        {
            GuidancePackage package = (GuidancePackage)sender;

            // we don't want the toolwindow to get notificatins of recipes
            // that executed because of the unfolding of a template
            if (e.ExecutedFromTemplate)
            {
                return;
            }
            LogRecipeExecution(package.Configuration.Name, e.Recipe.Name);
            if (RecipeExecuted != null)
            {
                RecipeExecuted(sender, e);
            }
        }
예제 #13
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);
             }
         }
     }
 }
예제 #14
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();
            }
        }
예제 #15
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"));
     }
 }
예제 #16
0
 void OnRecipeClosing(object sender, RecipeEventArgs args) {
    UnhookRecipe();
 }
예제 #17
0
 private void OnRecipeSaved(object sender, RecipeEventArgs args)
 {
     _recentRecipies.AddRecipe(RecipeFactory.Current.PathName);
 }
예제 #18
0
 private void OnRecipeLoaded(object sender, RecipeEventArgs args)
 {
     HookupRecipe();
     UpdateEnabledStatus();
 }
예제 #19
0
 private void OnRecipeLoaded(object sender, RecipeEventArgs args)
 {
     HookupRecipe();
 }
예제 #20
0
 private void OnRecipeStarted(object sender, RecipeEventArgs args)
 {
     Enabled = true;
 }
예제 #21
0
 private void OnRecipeFinishedOrAborted(object sender, RecipeEventArgs args) {
    Enabled = false;
 }
예제 #22
0
 private void OnRecipeStarted(object sender, RecipeEventArgs args)
 {
     _startTime = DateTime.Now;
     Reset();
 }
예제 #23
0
 private void OnRecipeLoadFailed(object sender, RecipeEventArgs args)
 {
     MessageBox.Show(this, args.Message, "csUnitRunner - Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
 }
예제 #24
0
 private void OnRecipeStarted(object sender, RecipeEventArgs args) {
    Enabled = true;
 }
예제 #25
0
 private void OnRecipeFinished(object sender, RecipeEventArgs args)
 {
     UpdateEnabledStatus();
 }
예제 #26
0
 private void OnOtherRecipeEvent(object sender, RecipeEventArgs args)
 {
     UpdateEnabledStatus();
 }
예제 #27
0
 private void OnRecipeClosing(object sender, RecipeEventArgs args)
 {
     UnhookRecipe();
     UpdateEnabledStatus();
 }
예제 #28
0
 private void OnRecipeLoaded(object sender, RecipeEventArgs args) {
    HookupRecipe();
 }
 void service_AfterRecipeExecution(object sender, RecipeEventArgs e)
 {
     //pkg.ExecuteFromTemplate("EmptyFeature", null);
 }
예제 #30
0
 private void OnRecipeSaved(object sender, RecipeEventArgs args)
 {
     UpdateFormTitle();
 }
예제 #31
0
 void OnRecipeClosing(object sender, RecipeEventArgs args)
 {
     UnhookRecipe();
 }
 void service_AfterRecipeExecution(object sender, RecipeEventArgs e)
 {
     //pkg.ExecuteFromTemplate("EmptyFeature", null);
 }
예제 #33
0
 private void OnRecipeFinishedOrAborted(object sender, RecipeEventArgs args)
 {
     Enabled = false;
 }
예제 #34
0
 private void OnSelectorModified(object sender, RecipeEventArgs args)
 {
     UpdateFormTitle();
 }
예제 #35
0
 private void OnAfterRecipeExecution(object sender, RecipeEventArgs e)
 {
     // reset the stored values
     storedPath       = null;
     storedPathStatus = false;
 }
예제 #36
0
 private void OnAfterRecipeExecution(object sender, RecipeEventArgs e)
 {
     // reset the stored values
     storedPath = null;
     storedPathStatus = false;
 }