diff options
author | Keting Yang <ketyang@microsoft.com> | 2019-08-15 18:26:23 +0300 |
---|---|---|
committer | Keting Yang <ketyang@microsoft.com> | 2019-09-04 17:19:03 +0300 |
commit | 93c1b5300b0b91dfc1312a2e56cbfdd55c05b178 (patch) | |
tree | a4a21d92accd1668bf2287c30660b2b5adf78d14 /main/src/addins/MonoDevelop.UnitTesting | |
parent | 7310e60275cb2fed042887a068ac3fc9a14c216a (diff) |
Use rootNode instead of selectedTest
Diffstat (limited to 'main/src/addins/MonoDevelop.UnitTesting')
-rw-r--r-- | main/src/addins/MonoDevelop.UnitTesting/Gui/TestPad.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/main/src/addins/MonoDevelop.UnitTesting/Gui/TestPad.cs b/main/src/addins/MonoDevelop.UnitTesting/Gui/TestPad.cs index dc8b0efd19..dea1cc2d13 100644 --- a/main/src/addins/MonoDevelop.UnitTesting/Gui/TestPad.cs +++ b/main/src/addins/MonoDevelop.UnitTesting/Gui/TestPad.cs @@ -565,14 +565,18 @@ namespace MonoDevelop.UnitTesting void OnDebugAllClicked (object sender, EventArgs args) { - var debugModeSet = Runtime.ProcessService.GetDebugExecutionMode (); - if (debugModeSet == null) + var nav = TreeView.GetRootNode (); + if (nav == null) return; - UnitTest test = GetSelectedTest (); + var test = nav.DataItem as UnitTest; if (test == null) return; + var debugModeSet = Runtime.ProcessService.GetDebugExecutionMode (); + if (debugModeSet == null) + return; + foreach (var mode in debugModeSet.ExecutionModes) { if (test.CanRun (mode.ExecutionHandler)) { RunTest (test, mode.ExecutionHandler); |