nunit-2.5

Trace in NUnit works only while debugging from Visual Studio

I want to display trace info into Text Output tab in NUnit GUI (ver. 2.5.7, target runtime 4.0): Trace.Listeners.Add(new ConsoleTraceListener()); Trace.WriteLine("Hello NUnit"); This works fine when I launch NUnit GUI from Visual Studio (2010) via Debug -> Start external application. But when from .nunit project file and console runn...

Nunit parameterised TestFixtures with parameters set at runtime?

I'm interested in being able to instantiate multiple testfixtures with constructor arguments passed to it at runtime by a static method or property returning an IEnumerable. In Nunit 2.5 they introduced parameterised tests and test fixtures. These allow you to write a single test and run it with several inputs provided using the TestCas...

How to get NUnit to work with Visual Studio 2008

Maybe I am just forgetting something, but I cannot seem to get NUnit to work in Visual Studio 2008 Standard Edition. I am trying to use NUnit 2.5.7 in a C# class library project. I am following the structure of the samples given in the download of NUnit. Here are the steps I am doing 1) Download and install NUnit 2.5.7 2) Create C# cl...

How to force Nunit to release handles on native DLLs?

I have code which require me to Pinvoke into a 3rd party native DLL. The issue is that when I use the Nunit test runner for those tests, the native dll is locked by the nunit processes (nunit.exe and nubit-agent.exe). Thus my post-build copy command fails because of this. The only way to generate a 'successful build' (includes post-buil...

Data-driven testing in NUnit?

In MSTest you can do something like: [TestMethod] [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "testdata.csv", "testdata#csv", DataAccessMethod.Sequential)] public void TestSomething() { double column1 = Convert.ToDouble(TestContext.DataRow["column1"]); ... Assert.AreEqual(...); } What is the equivalent c...