Reputation: 3035
I am developing using TDD and ASP.Net MVC.
I have a custom ActionFilterAttribute which needs to be applied to certain controller actions and was wondering the best approach to this using TDD.
If this a suitable way to go about it?
Upvotes: 0
Views: 327
Reputation: 47647
It sounds like it is.
What confuses You? Test that tests if attribute is applied? There is nothing bad with that. Testing actual constructions of code is very useful technique. You can force various conventions too with this approach like naming of classes in particular namespace, existence of public constructors w/o arguments, etc.
Upvotes: 1