I am writing integration tests.Now, before tests are run I want to setup the database with initial data.For this, I have created a separate project, which is run before test project is executed(using MSBuild file).But, I want to merge the db setup code in testproject, and have it executed before any tests get executed.I am using MBunit 3.Is it possible?
Share
You can declare a class with the [AssemblyFixture] attribute; and a few methods into that class with the [FixtureSetUp] and [FixtureTearDown] attributes to define assembly-level setup and teardown methods.
In fact, the syntax is similar to what is usually done at test fixture level with the well-known [TestFixture], [SetUp], and [TearDown] attributes.