Re: Weird unit testing bug?

"Charlie Poole" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <005d01c83b89$cfb0d4d0$6401a8c0@FERRARI>
Hi David, 

> 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?

Can you get this down to a simple test case and submit a bug report?

Charlie



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