[Monodevelop-patches-list] r2365 - in trunk/MonoDevelop/Extras/NUnit: . Gui Services

John Luke <jluke@cfl.rr.com> jluke at mono-cvs.ximian.com
Wed Mar 16 21:02:37 EST 2005


Author: jluke
Date: 2005-03-16 21:02:37 -0500 (Wed, 16 Mar 2005)
New Revision: 2365

Added:
   trunk/MonoDevelop/Extras/NUnit/FixtureAddedEventHandler.cs
   trunk/MonoDevelop/Extras/NUnit/FixtureLoadedErrorEventHandler.cs
Modified:
   trunk/MonoDevelop/Extras/NUnit/Gui/TestPad.cs
   trunk/MonoDevelop/Extras/NUnit/Makefile
   trunk/MonoDevelop/Extras/NUnit/Services/NUnitService.cs
Log:
add some missing files, and some minor changes


Added: trunk/MonoDevelop/Extras/NUnit/FixtureAddedEventHandler.cs
===================================================================
--- trunk/MonoDevelop/Extras/NUnit/FixtureAddedEventHandler.cs	2005-03-17 01:35:19 UTC (rev 2364)
+++ trunk/MonoDevelop/Extras/NUnit/FixtureAddedEventHandler.cs	2005-03-17 02:02:37 UTC (rev 2365)
@@ -0,0 +1,26 @@
+using System;
+
+namespace MonoDevelop.NUnit
+{
+	delegate void FixtureAddedEventHandler (object sender, FixtureAddedEventArgs args);
+
+	public class FixtureAddedEventArgs : EventArgs
+	{
+		int total, current;
+
+		public FixtureAddedEventArgs (int current, int total)
+		{
+			this.total = total;
+			this.current = current;
+		}
+
+		public int Current {
+			get { return current; }
+		}
+
+		public int Total {
+			get { return total; }
+		}
+	}
+}
+

Added: trunk/MonoDevelop/Extras/NUnit/FixtureLoadedErrorEventHandler.cs
===================================================================
--- trunk/MonoDevelop/Extras/NUnit/FixtureLoadedErrorEventHandler.cs	2005-03-17 01:35:19 UTC (rev 2364)
+++ trunk/MonoDevelop/Extras/NUnit/FixtureLoadedErrorEventHandler.cs	2005-03-17 02:02:37 UTC (rev 2365)
@@ -0,0 +1,26 @@
+using System;
+
+namespace MonoDevelop.NUnit
+{
+	public delegate void FixtureLoadedErrorEventHandler (object sender, FixtureLoadedErrorEventArgs args);
+
+	public class FixtureLoadedErrorEventArgs : EventArgs
+	{
+		string message, filename;
+
+		public FixtureLoadedErrorEventArgs (string filename, Exception e)
+		{
+			this.filename = filename;
+			this.message = e.Message;
+		}
+
+		public string Filename {
+			get { return filename; }
+		}
+
+		public string Message {
+			get { return message; }
+		}
+	}
+}
+

Modified: trunk/MonoDevelop/Extras/NUnit/Gui/TestPad.cs
===================================================================
--- trunk/MonoDevelop/Extras/NUnit/Gui/TestPad.cs	2005-03-17 01:35:19 UTC (rev 2364)
+++ trunk/MonoDevelop/Extras/NUnit/Gui/TestPad.cs	2005-03-17 02:02:37 UTC (rev 2365)
@@ -121,6 +121,11 @@
 			// FIXME: set run menu items sensitive
 		}
 
+		void OnFinishedRunning (object sender, EventArgs a)
+		{
+			statusBarService.SetMessage ("");
+		}
+
 		void OnFixtureAdded (object sender, FixtureAddedEventArgs a)
 		{
 			string msg = String.Format (GettextCatalog.GetString ("Loading test {0} of {1}"), a.Current, a.Total);

Modified: trunk/MonoDevelop/Extras/NUnit/Makefile
===================================================================
--- trunk/MonoDevelop/Extras/NUnit/Makefile	2005-03-17 01:35:19 UTC (rev 2364)
+++ trunk/MonoDevelop/Extras/NUnit/Makefile	2005-03-17 02:02:37 UTC (rev 2365)
@@ -14,6 +14,7 @@
 FILES = \
 AssemblyInfo.cs \
 FixtureAddedEventHandler.cs \
+FixtureLoadedErrorEventHandler.cs \
 Commands/NUnitCommands.cs \
 Gui/CircleImage.cs \
 Gui/TestPad.cs \

Modified: trunk/MonoDevelop/Extras/NUnit/Services/NUnitService.cs
===================================================================
--- trunk/MonoDevelop/Extras/NUnit/Services/NUnitService.cs	2005-03-17 01:35:19 UTC (rev 2364)
+++ trunk/MonoDevelop/Extras/NUnit/Services/NUnitService.cs	2005-03-17 02:02:37 UTC (rev 2365)
@@ -4,6 +4,7 @@
 
 using NUnit.Core;
 using MonoDevelop.Core.Services;
+using MonoDevelop.NUnit;
 
 namespace MonoDevelop.Services
 {
@@ -13,14 +14,11 @@
 		bool running = false;
 
 		public event EventHandler AssemblyLoaded;
-		public event EventHandler FixtureLoadError;
-		public event EventHandler RunFinishedEvent;
-		public event EventHandler RunStartedEvent;
+		public event FixtureLoadedErrorEventHandler FixtureLoadError;
 		public event TestEventHandler SuiteFinishedEvent;
 		public event TestEventHandler SuiteStartedEvent;
 		public event TestEventHandler TestFinishedEvent;
 		public event TestEventHandler TestStartedEvent;
-		public event EventHandler UnhandledExceptionEvent;
 
 		public NUnitService ()
 		{
@@ -41,8 +39,7 @@
 			}
 			catch (Exception e) {
 				if (FixtureLoadError != null)
-					FixtureLoadError (this, EventArgs.Empty);
-				//	FixtureLoadError (this, new FixtureLoadErrorArgs (assemblyName, e));
+					FixtureLoadError (this, new FixtureLoadedErrorEventArgs (assemblyName, e));
 			}
 			finally {
 				AppDomain.CurrentDomain.AssemblyResolve -= reh;
@@ -64,20 +61,14 @@
 
 		public void RunFinished (Exception exception)
 		{
-			if (RunFinishedEvent != null)
-				RunFinishedEvent (this, EventArgs.Empty);
 		}
 
 		public void RunFinished (TestResult[] results)
 		{
-			if (RunFinishedEvent != null)
-				RunFinishedEvent (this, EventArgs.Empty);
 		}
 
 		public void RunStarted (Test[] tests)
 		{
-			if (RunStartedEvent != null)
-				RunStartedEvent (this, EventArgs.Empty);
 		}
 
 		public void RunTest (Test test)
@@ -128,8 +119,6 @@
 
 		public void UnhandledException (Exception exception)
 		{
-			if (UnhandledExceptionEvent != null)
-				UnhandledExceptionEvent (this, EventArgs.Empty);
 		}
 	}
 }




More information about the Monodevelop-patches-list mailing list