Mark Brown

Nota Bene

Integrate NUnit into the IDE

As I've mentioned before I've been jumping into NUnit more and more lately. I just found this little gem to integrate NUnit and the IDE.

“TestRunner seamlessly integrates NUnit testing and debugging into a compact Visual Studio .NET 2003 add-in.“

http://www.mailframe.net/Products/TestRunner.htm


1using System;
2using NUnit.Framework;
3
4namespace TestRunner
5{
6 public class Library
7 {
8 public static string HelloWorld()
9 {
10 return "Hello World!";
11 }
12 }
13
14 [TestFixture]
15 public class UnitTest
16 {
17 [Test]
18 public void TestEqual()
19 {
20 string TestString = Library.HelloWorld();
21 Assert.AreEqual("Hello World!", TestString );
22 }
23 }
24}

 

Posted: Jun 11 2004, 09:33 AM by markbrown | with 1 comment(s)
Filed under:

Comments

Jamie Cansdale said:

You might also like to try...

http://weblogs.asp.net/nunitaddin/
http://sourceforge.net/projects/nunitaddin

Just right click anywhere inside a method between the { ... } and select 'Run Test(s)'. You can do the same for test fixtures, namespaces, projects and solutions. The method doesn't even have to be a test if it doesn take parameters (it can be public, private static or instance). You can also debug tests by selecting 'Test With... Debugger'.

Use Debug.WriteLine(...) to send stuff to the output window. If tests fail you can doulble click on the stack trace. Just for kicks try... Debug.WriteLine(AppDomain.CurrentDomain, "_verbose")

Have fun, Jamie.
# June 15, 2004 1:36 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)