Exemplo n.º 1
0
 private void OnRecipeFinishedAsync(object sender, RecipeEventArgs args)
 {
     if (_failureNodes.Count > 0)
     {
         EnsureTreeNodeVisible(_failureNodes[0]);
     }
 }
Exemplo n.º 2
0
 private void OnRecipeLoaded(object sender, RecipeEventArgs args)
 {
     _selectedItems.Clear();
     UnhookRecipe();
     Reset();
     HookupRecipe();
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 4
0
 private void OnRecipeStarted(object sender, RecipeEventArgs args)
 {
     Reset();
     if (FindPanel.Visible)
     {
         Command.ExecuteCommand(typeof(ShowFindPanelCommand), this, new EventArgs());
     }
 }
Exemplo n.º 5
0
 private void OnRecipeClosing(object sender, RecipeEventArgs args)
 {
     foreach (var assembly in RecipeFactory.Current.Assemblies)
     {
         assembly.TestError  -= _onTestErrorOrFail;
         assembly.TestFailed -= _onTestErrorOrFail;
     }
 }
Exemplo n.º 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);
            //}
        }
Exemplo n.º 7
0
        private void OnRecipeStarted(object sender, RecipeEventArgs args)
        {
            var selectedNode = _treeTestHierarchy.SelectedNode;

            Reset();
            if (selectedNode != null)
            {
                _treeTestHierarchy.SelectedNode = selectedNode;
                EnsureTreeNodeVisible(selectedNode);
            }
        }
Exemplo n.º 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);
 }
Exemplo n.º 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();
        }
Exemplo n.º 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();
     }
 }
Exemplo n.º 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;
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
             }
         }
     }
 }
Exemplo n.º 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();
            }
        }
Exemplo n.º 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"));
     }
 }
Exemplo n.º 16
0
 void OnRecipeClosing(object sender, RecipeEventArgs args) {
    UnhookRecipe();
 }
Exemplo n.º 17
0
 private void OnRecipeSaved(object sender, RecipeEventArgs args)
 {
     _recentRecipies.AddRecipe(RecipeFactory.Current.PathName);
 }
Exemplo n.º 18
0
 private void OnRecipeLoaded(object sender, RecipeEventArgs args)
 {
     HookupRecipe();
     UpdateEnabledStatus();
 }
Exemplo n.º 19
0
 private void OnRecipeLoaded(object sender, RecipeEventArgs args)
 {
     HookupRecipe();
 }
Exemplo n.º 20
0
 private void OnRecipeStarted(object sender, RecipeEventArgs args)
 {
     Enabled = true;
 }
Exemplo n.º 21
0
 private void OnRecipeFinishedOrAborted(object sender, RecipeEventArgs args) {
    Enabled = false;
 }
Exemplo n.º 22
0
 private void OnRecipeStarted(object sender, RecipeEventArgs args)
 {
     _startTime = DateTime.Now;
     Reset();
 }
Exemplo n.º 23
0
 private void OnRecipeLoadFailed(object sender, RecipeEventArgs args)
 {
     MessageBox.Show(this, args.Message, "csUnitRunner - Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
 }
Exemplo n.º 24
0
 private void OnRecipeStarted(object sender, RecipeEventArgs args) {
    Enabled = true;
 }
Exemplo n.º 25
0
 private void OnRecipeFinished(object sender, RecipeEventArgs args)
 {
     UpdateEnabledStatus();
 }
Exemplo n.º 26
0
 private void OnOtherRecipeEvent(object sender, RecipeEventArgs args)
 {
     UpdateEnabledStatus();
 }
Exemplo n.º 27
0
 private void OnRecipeClosing(object sender, RecipeEventArgs args)
 {
     UnhookRecipe();
     UpdateEnabledStatus();
 }
Exemplo n.º 28
0
 private void OnRecipeLoaded(object sender, RecipeEventArgs args) {
    HookupRecipe();
 }
 void service_AfterRecipeExecution(object sender, RecipeEventArgs e)
 {
     //pkg.ExecuteFromTemplate("EmptyFeature", null);
 }
Exemplo n.º 30
0
 private void OnRecipeSaved(object sender, RecipeEventArgs args)
 {
     UpdateFormTitle();
 }
Exemplo n.º 31
0
 void OnRecipeClosing(object sender, RecipeEventArgs args)
 {
     UnhookRecipe();
 }
 void service_AfterRecipeExecution(object sender, RecipeEventArgs e)
 {
     //pkg.ExecuteFromTemplate("EmptyFeature", null);
 }
Exemplo n.º 33
0
 private void OnRecipeFinishedOrAborted(object sender, RecipeEventArgs args)
 {
     Enabled = false;
 }
Exemplo n.º 34
0
 private void OnSelectorModified(object sender, RecipeEventArgs args)
 {
     UpdateFormTitle();
 }
Exemplo n.º 35
0
 private void OnAfterRecipeExecution(object sender, RecipeEventArgs e)
 {
     // reset the stored values
     storedPath       = null;
     storedPathStatus = false;
 }
Exemplo n.º 36
0
 private void OnAfterRecipeExecution(object sender, RecipeEventArgs e)
 {
     // reset the stored values
     storedPath = null;
     storedPathStatus = false;
 }