[Prev] Thread [Next]  |  [Prev] Date [Next]

[nunit-discuss] Parameterized testfixture with default ctor Roger Kratz Tue Apr 03 04:01:21 2012

(similar question posted here:  


In a pretty big project (~1000 test fixtures) the test fixtures derives 
from a common base class. Because of new requirements I needed to run the 
tests twice, with two different configurations. To accomplish this I used 
nunit's feature "Parameterized test fixture" and declared two testfixture 
attributes on the base class. This worked fine, but led to tedious work 
adding the parameterized ctor on all test fixtures.
I've already done this, but I would have had a lot of easier work if nunit 
would have accepted property injection rather than ctor injection. Also, in 
my opinion, this would have led to cleaner test fixtures with no 
"disturbing", explicit ctor (even though I must say that I'm 
100% favoring ctor injection rather than accessor injection in "normal" 

Are there any plans to implement something like this in nunit?


You received this message because you are subscribed to the Google Groups 
"NUnit-Discuss" group.
To view this discussion on the web visit 
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at