Is it possible to run specific method before each test in an assembly?
I know about TestInitialize
attribute but this attribute has \"class scope\". If it\'
I am not sure that this feature is possible in MsTest out of box like in other test frameworks (e.g. MbUnit).
If I have to use MsTest, then I am solving this by defining abstract class TestBase with [TestInitialize]
attribute and every test which needs this behaviour derives from this base class. In your case, every test class in your assembly must inherit from this base...
And there is probably another solution, you can make your custom test attribute - but I have not tried this yet... :)