Loading...

nunit-discuss@googlegroups.com

[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:  
https://answers.launchpad.net/nunitv2/+question/189098)

Hi

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" 
code).

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

Regards
Roger

-- 
You received this message because you are subscribed to the Google Groups 
"NUnit-Discuss" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nunit-discuss/-/5eO8rtPKgJAJ.
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 
http://groups.google.com/group/nunit-discuss?hl=en.