Reputation: 49
I am getting really hacked off with having to type [TestMethod] at the top of each method in my class. At present I have over 600 tests in my project. Is there a way that I can add this attribute through and IL weaver like PostSharp or fody? or can I add one class attribute that will do the same?
cheers
Upvotes: 0
Views: 93
Reputation: 171
you can use find and replace and replace the public void with [TestMethod] public void :)
Upvotes: 0
Reputation: 142
The only idea that comes in mind to me is to write your own method with attribute [ClassInitialize] which will run before tests execution. Method implementation: using reflection go through all methods in specific class and add attribute at runtime. There is no out of the box solution to your problem.
Upvotes: 2