There is an Attribute
called DataSourceAttribute
in C#. It needs to be declared on each Method again and again. Is it possible to declare it one time at the class level so that I don't need to repeat myself. If so, how?
In Data Driven UnitTesting, the data source need to be specified with the help of this attribute: [DataSource (...),...]
. There are about 10-15 such methods, and I do not want to declare the attribute for each method. I'd like to declare it once and have all the methods inherit it from the class level usage.
Take a look at Afterthough. It is a framework that applies custom chunks of code, including properties, methods, attributes to your solution post-compile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With