diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2015-02-25 17:17:47 +0300 |
---|---|---|
committer | Lluis Sanchez <lluis@xamarin.com> | 2015-02-25 17:18:11 +0300 |
commit | 3d231348472ef87bf6c5ba418ea5b78e89af7324 (patch) | |
tree | b325accb1632a890b2a56e7b84948d608a117ff8 /main/src/addins/NUnit | |
parent | a8d5b1c367213a1800f89ade1c006a4ac02fd204 (diff) |
[NUnit] Added new event
Added new event that is fired when a test session is starting.
Diffstat (limited to 'main/src/addins/NUnit')
-rw-r--r-- | main/src/addins/NUnit/Services/NUnitService.cs | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/main/src/addins/NUnit/Services/NUnitService.cs b/main/src/addins/NUnit/Services/NUnitService.cs index cdcbfdbe3f..05a501a932 100644 --- a/main/src/addins/NUnit/Services/NUnitService.cs +++ b/main/src/addins/NUnit/Services/NUnitService.cs @@ -69,7 +69,7 @@ namespace MonoDevelop.NUnit return instance; } } - + void OnExtensionChange (object s, ExtensionNodeEventArgs args) { if (args.Change == ExtensionChange.Add) { @@ -166,7 +166,9 @@ namespace MonoDevelop.NUnit resultsPad.Sticky = false; }); }; - + + OnTestSessionStarting (new TestSessionEventArgs { Session = session, Test = test }); + session.Start (); IdeApp.ProjectOperations.CurrentRunOperation = session; @@ -332,6 +334,17 @@ namespace MonoDevelop.NUnit } public event EventHandler TestSessionCompleted; + + void OnTestSessionStarting (TestSessionEventArgs args) + { + if (TestSessionStarting != null) + TestSessionStarting (this, args); + } + + /// <summary> + /// Occurs just before a test session is started + /// </summary> + public event EventHandler<TestSessionEventArgs> TestSessionStarting; } @@ -455,5 +468,11 @@ namespace MonoDevelop.NUnit remove { monitor.CancelRequested -= value; } } } + + public class TestSessionEventArgs: EventArgs + { + public IAsyncOperation Session { get; set; } + public UnitTest Test { get; set; } + } } |