NUnit projects and config files

NUnit project files (*.nunit) are an easy way to specify test assemblies you want tested during the build or continuous integration. Unfortunately, if you use app.configs in your test assemblies, you will quickly realize that NUnit isn’t loading them. For a test project, a single AppDomain is used (by default). Today, I figured out how to change the default behavior quite by accident. In NUnit GUI, go to Tools -> Settings then Assembly Isolation. »

Brian Hartsock on #NUnit,

When TDD Goes Bad, NUnit wasted 2 hours of my night

[TestFixture] public class IHateNunit { [Test] public void A_list_works() { IList strs = new List() { “asdf” }; //Double Pass Assert.That(strs.Count, Is.EqualTo(1)); Assert.That(strs, Has.Count(1)); } [Test] public void An_array_doesnt() { IList<string> strs = new string[] { "asdf" }; //Pass Assert.That(strs.Count, Is.EqualTo(1)); //#FAIL Assert.That(strs, Has.Count(1)); } } »