Question

My solution has many projects. Most projects in the solution will have associated unit test projects. I have created a UnitTestCommon project to act as a stand alone assembly with a local database and setup methods to refresh its data by parsing xml records into the tables. Also others like, test the db connection and expose public properties for the connection string and others needed to interact with the db.

I want to accomplish a self instantiated UnitTestCommon project to be references by all other associated unit test projects.

I know if you add the attribute [AssemblyFixture] for the "global" class and [FixtureSetup] it will run before all other tests. But because I want to separate my unit test projects this will not self instantiate when referencing in the associated unit tests.

I could always call an Initialize method in the UnitTestCommon, but...there has to be a better way.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top