Re: Multiple Constructors - Please help!

"Nassar, Anthony" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <[email protected]>
Create an abstract fixture class with an "abstract factory" method that
instantiates the object for the setup method? Then subclass as
necessary. I believe that if [TestFixtureAttribute] is on the abstract
class, the derived classes will inherit it. If not, don't worry; just
put the attribute on the derived classes. [Test] can go on the methods
of the abstract base class. 


________________________________

	From: [email protected]
[mailto:[email protected]] On Behalf Of James
Snell
	Sent: Wednesday, December 19, 2007 5:06 PM
	To: [email protected]
	Subject: [Nunit-users] Multiple Constructors - Please help!
	
	
	Hey gang,
	   I've just started implementing unit tests for a project at
work and I've been asked to give NUnit a try for it.
	
	  The challenge I've got is I need to imeplement unit tests for
a class that is rather large. The key problem I'm dealing with is that
it has 3 totally different constructors. For each constructor I must run
the entire test suite once. At this point the only way I can think of
doing that is to effectively just cut and paste the entire suite 3 times
and make the minor changes necessary for the SetUp() of them. Either
that or by just having one suite and manually commenting out two out of
three constructors and manually rerunning the test suite 3 times. I
figure there's got to be a better way of doing this. The code I'm
testing is C++, for the most part, my existing suite for NUnit is a C#
implementation. 
	
	  Does anyone know of a means of testing all the constructors
gracefully!? I'd really really appreciate some help.
	
	  Thanks,
	     James

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

_______________________________________________
Nunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.