Weird unit testing bug?

"David Keaveny" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <[email protected]>
Here's an interesting conundrum for you:
 
I've written a bunch of unit tests that test a public method on an
internal class located in another assembly, using some good ol'
fashioned reflection voodoo. Running these tests in VS2005 using
TestDriven.NET 2.0.1438d and NUnit 2.4.3, these tests run just fine
(although if I try to test with code coverage using NCover 1.4.0.7 it
refuses). For good measure, I also run the same tests using Resharper
2.5, and they pass. So far, so good. 
 
If I then drop out of Visual Studio, and fire up my NAnt scripts to
repeat those tests, they fail. If I load up the NUnit GUI to repeat
those tests, they fail. It's only the reflection-based tests that fail -
I've added some vanilla tests in there to make sure that setup/teardown
calls were working OK, and those tests work just fine.
 
So, anyone have any idea why tests using reflection run fine when run
from within VS2005, but fail when run from the command line?
 
________________________________

David Keaveny
Developer, Enterprise Applications, Fairfax Digital

The information contained in this e-mail message and any accompanying files is or may be confidential. If you are not the intended recipient, any use, dissemination, reliance, forwarding, printing or copying of this e-mail or any attached files is unauthorised. This e-mail is subject to copyright. No part of it should be reproduced, adapted or communicated without the written consent of the copyright owner. If you have received this e-mail in error please advise the sender immediately by return e-mail or telephone and delete all copies. Fairfax does not guarantee the accuracy or completeness of any information contained in this e-mail or attached files. Internet communications are not secure, therefore Fairfax does not accept legal responsibility for the contents of this message or attache
 d files.

-------------------------------------------------------------------------
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://sourceforge.net/services/buy/index.php
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.