I have a rather large set of integration tests developed in C#/NUnit. Currently it is one test fixture, one class. In [TestFixtureSetUp] I create a database from a script and populate it with test data, also from a script. My tests do not modify data, so they can run in any order or in parallel.
My problem is that I have too many tests and the file is growing too big, so it looks ugly, and my ReSharper is getting sluggish. I want to split the file, but I really want to create my test database only once. As a temporary measure, I am moving the code which does actual testing into static methods in other classes, and invoke them from a single TextFixture class, as follows:
[Test]
public void YetAnotherIntegrationTest()
{
IntegrationTestsPart5.YetAnotherIntegrationTest(connection);
}
Yet it still looks ugly and I think there should be a better way.
I am using VS 2008, upgrading to 2010 right now, and SQL Server 2005.