[Monodevelop-patches-list] r2334 - in trunk/MonoDevelop/Unused/Nunit: . Commands Gui Services
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Sun Mar 13 00:05:33 EST 2005
Author: jluke
Date: 2005-03-13 00:05:32 -0500 (Sun, 13 Mar 2005)
New Revision: 2334
Modified:
trunk/MonoDevelop/Unused/Nunit/Commands/NunitCommands.cs
trunk/MonoDevelop/Unused/Nunit/Gui/NunitTestTree.cs
trunk/MonoDevelop/Unused/Nunit/MonoDevelopNunit.addin.xml
trunk/MonoDevelop/Unused/Nunit/Services/AssemblyStore.cs
trunk/MonoDevelop/Unused/Nunit/Services/CircleRenderer.cs
Log:
make this compile so I can test something else
Modified: trunk/MonoDevelop/Unused/Nunit/Commands/NunitCommands.cs
===================================================================
--- trunk/MonoDevelop/Unused/Nunit/Commands/NunitCommands.cs 2005-03-12 22:05:02 UTC (rev 2333)
+++ trunk/MonoDevelop/Unused/Nunit/Commands/NunitCommands.cs 2005-03-13 05:05:32 UTC (rev 2334)
@@ -2,10 +2,9 @@
using System.IO;
using Gtk;
-using MonoDevelop.Core.AddIns.Codons;
using MonoDevelop.Services;
-using MonoDevelop.Core.Services;
using MonoDevelop.Gui.Widgets;
+using MonoDevelop.Core.AddIns.Codons;
namespace MonoDevelop.Commands
{
@@ -13,10 +12,10 @@
{
public override void Run ()
{
- NunitService nunitService = (NunitService) MonoDevelop.Core.Services.ServiceManager.Services.GetService (typeof (NunitService));
+ NunitService nunitService = (NunitService) MonoDevelop.Core.Services.ServiceManager.GetService (typeof (NunitService));
using (FileSelector fs = new FileSelector ("Load test assembly")) {
- string defaultPath = Path.Combine (Environment.GetEnvironmentVariable ("HOME"), "Projects");
+ //string defaultPath = Path.Combine (Environment.GetEnvironmentVariable ("HOME"), "Projects");
if (fs.Run () == (int) Gtk.ResponseType.Ok)
{
Modified: trunk/MonoDevelop/Unused/Nunit/Gui/NunitTestTree.cs
===================================================================
--- trunk/MonoDevelop/Unused/Nunit/Gui/NunitTestTree.cs 2005-03-12 22:05:02 UTC (rev 2333)
+++ trunk/MonoDevelop/Unused/Nunit/Gui/NunitTestTree.cs 2005-03-13 05:05:32 UTC (rev 2334)
@@ -12,17 +12,17 @@
using Gtk;
using MonoDevelop.Gui;
+using MonoDevelop.Core.Services;
using MonoDevelop.Services;
using MonoDevelop.Services.Nunit;
-using MonoDevelop.Core.Services;
using NUnit.Core;
namespace MonoDevelop.Nunit.Gui
{
public class TestTree : AbstractPadContent, EventListener
{
- NunitService ns = (NunitService) ServiceManager.Services.GetService (typeof (NunitService));
- IStatusBarService sbs = (IStatusBarService) ServiceManager.Services.GetService (typeof (IStatusBarService));
+ NunitService ns = (NunitService) ServiceManager.GetService (typeof (NunitService));
+ IStatusBarService sbs = (IStatusBarService) ServiceManager.GetService (typeof (IStatusBarService));
ScrolledWindow sw = new ScrolledWindow ();
Notebook notebook;
@@ -139,7 +139,7 @@
ntests = -1;
finishedTests = 0;
- sbs.ProgressMonitor.Worked (0.0, "");
+ //sbs.ProgressMonitor.Worked (0.0, "");
sbs.SetMessage ("Running tests...");
SetStringWriters ();
@@ -148,6 +148,22 @@
ClockUpdater (this, EventArgs.Empty);
}
+ public void RunFinished (Exception e)
+ {
+ }
+
+ public void RunFinished (TestResult[] tests)
+ {
+ }
+
+ public void RunStarted (Test[] tests)
+ {
+ }
+
+ public void UnhandledException (Exception e)
+ {
+ }
+
void SetStringWriters ()
{
Console.SetOut (stdout);
@@ -214,7 +230,7 @@
void EventListener.TestFinished (TestCaseResult result)
{
- sbs.ProgressMonitor.Worked (++finishedTests / (double) ntests, String.Format ("{0}/{1}", finishedTests, ntests));
+ //sbs.ProgressMonitor.Worked (++finishedTests / (double) ntests, String.Format ("{0}/{1}", finishedTests, ntests));
if (result.Executed == false) {
AddIgnored (result.Test.FullName, result.Test.IgnoreReason);
Modified: trunk/MonoDevelop/Unused/Nunit/MonoDevelopNunit.addin.xml
===================================================================
--- trunk/MonoDevelop/Unused/Nunit/MonoDevelopNunit.addin.xml 2005-03-12 22:05:02 UTC (rev 2333)
+++ trunk/MonoDevelop/Unused/Nunit/MonoDevelopNunit.addin.xml 2005-03-13 05:05:32 UTC (rev 2334)
@@ -3,7 +3,7 @@
copyright = "GPL"
url = "http://monodevelop.com"
description = "NUnit testing tool"
- version = "0.2">
+ version = "0.6">
<Runtime>
<Import assembly="MonoDevelop.Nunit.dll"/>
@@ -25,7 +25,7 @@
</Extension>
<Extension path="/SharpDevelop/Workbench/MainMenu/Tools">
- <MenuItem id = "NunitMenu" _label = "NUnit" insertafter = "ExternalTools" insertbefore = "Options">
+ <MenuItem id = "NunitMenu" _label = "NUnit">
<MenuItem id = "LoadTestAssembly"
_label = "Load Assembly"
shortcut = ""
Modified: trunk/MonoDevelop/Unused/Nunit/Services/AssemblyStore.cs
===================================================================
--- trunk/MonoDevelop/Unused/Nunit/Services/AssemblyStore.cs 2005-03-12 22:05:02 UTC (rev 2333)
+++ trunk/MonoDevelop/Unused/Nunit/Services/AssemblyStore.cs 2005-03-13 05:05:32 UTC (rev 2334)
@@ -9,7 +9,6 @@
{
public class AssemblyStore : TreeStore, EventListener
{
- static GLib.GType gtype;
string assemblyName;
Hashtable iters;
TestSuite rootTS;
@@ -33,17 +32,7 @@
public event EventHandler FinishedLoad;
public event EventHandler IdleCallback;
- public static new GLib.GType GType
- {
- get {
- if (gtype == GLib.GType.Invalid)
- gtype = RegisterGType (typeof (AssemblyStore));
- return gtype;
- }
- }
-
- public AssemblyStore (string assemblyName)
- : base (typeof (int), typeof (string))
+ public AssemblyStore (string assemblyName) : base (typeof (int), typeof (string))
{
if (assemblyName == null)
throw new ArgumentNullException ("assemblyName");
@@ -100,6 +89,22 @@
GLib.Idle.Add (new GLib.IdleHandler (Populate));
}
+ public void RunFinished (Exception e)
+ {
+ }
+
+ public void RunFinished (TestResult[] results)
+ {
+ }
+
+ public void RunStarted (Test[] tests)
+ {
+ }
+
+ public void UnhandledException (Exception e)
+ {
+ }
+
void GrayOut (TreeIter iter)
{
SetValue (iter, 0, (int) CircleColor.None);
@@ -109,7 +114,7 @@
do {
GrayOut (child);
- } while (IterNext (out child));
+ } while (IterNext (ref child));
}
public void RunTestAtIter (TreeIter iter, EventListener listener, ref int ntests)
@@ -146,7 +151,7 @@
if (test == null)
return;
- ntests = test.CountTestCases;
+ ntests = test.CountTestCases ();
runningTest = true;
this.listener = listener;
th = new System.Threading.Thread (new ThreadStart (InternalRunTest));
@@ -292,7 +297,7 @@
}
currentTest = 0;
- totalTests = rootTS.CountTestCases;
+ totalTests = rootTS.CountTestCases ();
AddSuite (first, rootTS);
OnFinishedLoad ();
Modified: trunk/MonoDevelop/Unused/Nunit/Services/CircleRenderer.cs
===================================================================
--- trunk/MonoDevelop/Unused/Nunit/Services/CircleRenderer.cs 2005-03-12 22:05:02 UTC (rev 2333)
+++ trunk/MonoDevelop/Unused/Nunit/Services/CircleRenderer.cs 2005-03-13 05:05:32 UTC (rev 2334)
@@ -29,7 +29,7 @@
static TreeCellDataFunc dataFunc = null;
static Pixbuf [] circles = null;
static string [] colors = null;
- static ResourceService resourceService = (ResourceService) ServiceManager.Services.GetService (typeof (ResourceService));
+ static ResourceService resourceService = (ResourceService) ServiceManager.GetService (typeof (ResourceService));
static void Init ()
{
More information about the Monodevelop-patches-list
mailing list