Re: ExpectedException and derived exception types

"Charlie Poole" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <[email protected]>
Hi Tony,
 
Yes, that's right. the argument must be the exact type, if used.
 
Regardintg Resharper, they implement their own runner for NUnit tests and it
doesn't recognize a number of the newer variations of ExpectedException.
Also, they won't recogize the SetUpFixture, Culture or SetCulture attributes
or load any addins.
 
Charlie


  _____  

From: [email protected]
[mailto:[email protected]] On Behalf Of Nassar,
Anthony
Sent: Tuesday, January 22, 2008 5:16 PM
To: [email protected]
Subject: [Nunit-users] ExpectedException and derived exception types


I'm right in thinking that this:
 
[ExpectedException(typeof(DbException))] ...
 
...will not work if the actual exception type is SQLiteException, right? I'd
hoped to implement a generic fixture for some database-independent code. So
I have to implement my own handler (http://nunit.net/index.php?p=exception
<http://nunit.net/index.php?p=exception&r=2.4.2> &r=2.4.2), or make the
expected exception's type one of the type parameters.
 
By the way, as far as I can tell, Resharper's test runner doesn't recognize
the Handler property of the ExpectedException class. Caveat emptor. 
 

  _____  


Tony Nassar

Cell: (703) 994-0954

Blog:  <blocked::http://slideguitarist.blogspot.com/>
http://slideguitarist.blogspot.com/
Music:  <http://www.soundclick.com/thecompletists>
http://www.soundclick.com/thecompletists



"God love me, and I'm a hell of a fighter.." - Floyd Mayweather

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
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.