diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-11-02 14:47:35 +0300 |
---|---|---|
committer | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-11-02 18:39:53 +0300 |
commit | 5b2e621bb5b49b71bf89c4b71d6689a2961d4e16 (patch) | |
tree | ea33e136aeb3a287b5f5bfd201bfbb565cd58b4a /main/src/addins/NUnit | |
parent | 8027e7d6c68d5d45a87d7f774817528fde53c0ea (diff) |
[NUnit] Add rerun command to the test pad.
Diffstat (limited to 'main/src/addins/NUnit')
-rw-r--r-- | main/src/addins/NUnit/Commands/NUnitCommands.cs | 3 | ||||
-rw-r--r-- | main/src/addins/NUnit/Gui/TestResultsPad.cs | 10 | ||||
-rw-r--r-- | main/src/addins/NUnit/MonoDevelopNUnit.addin.xml | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/main/src/addins/NUnit/Commands/NUnitCommands.cs b/main/src/addins/NUnit/Commands/NUnitCommands.cs index f0d9322df4..0a581fdb81 100644 --- a/main/src/addins/NUnit/Commands/NUnitCommands.cs +++ b/main/src/addins/NUnit/Commands/NUnitCommands.cs @@ -41,7 +41,8 @@ namespace MonoDevelop.NUnit.Commands ShowTestCode, SelectTestInTree, ShowTestDetails, - GoToFailure + GoToFailure, + RerunTest, } public enum TestChartCommands diff --git a/main/src/addins/NUnit/Gui/TestResultsPad.cs b/main/src/addins/NUnit/Gui/TestResultsPad.cs index 6391b0031e..5110f4de4d 100644 --- a/main/src/addins/NUnit/Gui/TestResultsPad.cs +++ b/main/src/addins/NUnit/Gui/TestResultsPad.cs @@ -604,9 +604,19 @@ namespace MonoDevelop.NUnit if (loc != null) IdeApp.Workbench.OpenDocument (loc.FileName, loc.Line, loc.Column); } + + [CommandHandler (TestCommands.RerunTest)] + protected void OnRerunTest () + { + UnitTest test = GetSelectedTest (); + if (test == null) + return; + NUnitService.Instance.RunTest (test, null); + } [CommandUpdateHandler (TestCommands.ShowTestCode)] [CommandUpdateHandler (TestCommands.GoToFailure)] + [CommandUpdateHandler (TestCommands.RerunTest)] protected void OnUpdateRunTest (CommandInfo info) { UnitTest test = GetSelectedTest (); diff --git a/main/src/addins/NUnit/MonoDevelopNUnit.addin.xml b/main/src/addins/NUnit/MonoDevelopNUnit.addin.xml index 96f4fb6295..25aef50656 100644 --- a/main/src/addins/NUnit/MonoDevelopNUnit.addin.xml +++ b/main/src/addins/NUnit/MonoDevelopNUnit.addin.xml @@ -91,6 +91,7 @@ <Command id = "MonoDevelop.NUnit.Commands.TestCommands.GoToFailure" _label = "Go to failure" /> <Command id = "MonoDevelop.NUnit.Commands.TestCommands.SelectTestInTree" _label = "Select test in tree" /> <Command id = "MonoDevelop.NUnit.Commands.TestCommands.ShowTestDetails" _label = "Show results pad" /> + <Command id = "MonoDevelop.NUnit.Commands.TestCommands.RerunTest" _label = "Rerun test" /> <Command id = "MonoDevelop.NUnit.Commands.TestChartCommands.UseTimeScale" _label = "Proportional time scale" type="check"/> <Command id = "MonoDevelop.NUnit.Commands.TestChartCommands.SingleDayResult" _label = "Show one result per day" type="check"/> <Command id = "MonoDevelop.NUnit.Commands.TestChartCommands.ShowResults" _label = "Results chart" type="radio"/> @@ -136,6 +137,7 @@ <CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.GoToFailure" /> <CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.ShowTestCode" /> <CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.SelectTestInTree" /> + <CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.RerunTest" /> <SeparatorItem id = "s1" /> <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Copy" /> </Extension> |