C# – How does one create a global testfixturesetup routine with MBUnit and C#

cmbunitunit testing

I'm using MBUnit for my test project and have a setup routine that must run before several different test fixtures can run properly.

Currently in each TestFixture I've got the [TestFixtureSetup] attribute on a routine that performs this, but the logic is unnecessarily duplicated in each individual test fixture.

What method is used to create a TestFixtureSetup routine that will run before any TestFixture is ran?

Best Answer

In MbUnit v3, use [AssemblyFixture].

In MbUnit v2, use [AssemblyCleanUp].