Assuming Visual Studio.NET 2008 and MsTest are used to run unit tests. When a system is based on a service container and dependency injection unit testing would naturally require the setting up of services.
Should these services rather be setup in a base class that all unit tests derive from or in each unit test class. If they should be in a base class, is there a way to have the TestInitialize
and ClassInitialize
methods be executed without requiring them to be called from the derived class, e.g base.Initialise?