[MonoDevelop] Using Nunit 2.5+

Matt Calder mvcalder at gmail.com
Fri Aug 20 14:17:40 EDT 2010


Hi,

I want to run tests like the following:

//////////////////////////////////////////////
using NUnit.Framework;

namespace Tests
{
    [TestFixture(1)]
    [TestFixture(2)]
    public class Blah
    {
        int I;

        public Blah(int i) {I = i;}

        [Test]
        public void One() {Assert.That(I == 1);}

        [Test]
        public void Two() {Assert.That(I == 2);}
    }
}
//////////////////////////////////////////////

This fails to run under my current setup: Monodevelop 2.4, Mono 2.6.7,
on Ubuntu 10.04. The default Nunit package for Ubuntu is 2.4
something. However, we have put a Nunit 2.5 into the Solution. So, the
test builds, however, when it runs the test fails saying that the
class Blah does not have the proper constructor.

I believe the issue is the Nunit version because I can run the test
under Nunit-gui 2.4 and it gives the error, but under Nunit-gui 2.5 it
works fine.

My question is, how do I tell Monodevelop to use the Nunit 2.5
executables to run the tests? Thanks for any  guidance.

Matt


More information about the Monodevelop-list mailing list