Has the threading model running unit tests changed???
Hi,
Until build 5.1.1731.17 running the following code using Nunit and the test runner would correctly return the currently logged in user (me!). As of the latest build it returns an empty string.
I've just had about 30 unit tests break on me!!
Further trying to get a value for TaskScheduler.FromCurrentSynchronizationContext() when running unit tests has always returned null - I have had to write code in my main application
to test for null just so that I can test the routines in the test runner.
Regards
Jeremy
Please sign in to leave a comment.
Build 5.1.1731.17 has updated NUnit 2.5.6. Have you tried running your tests with this exact version of NUnit?
Hi Victor
I just upgraded to NUnit 2.5.6.
Unfortunately I get exactly the same thing.
SynchronizationContext.Current always returns null and
Thread.CurrentPrincipal.Identity always returns string.empty() Regards JeremyPlease, report this bug to NUnit.
Meanwhile you can you use older NUnit version with ReSharper. Just install it and point ReSharper to it.
Victor
SynchronizationContext.Current has always returned null for all previous version of Nunit/Resharper.
How do I point Resharper to an earlier version of NUnit?
Thanks
Jeremy
Open ReSharper - Options, then on Unit Testing page select nUnit, select "Specified NUnit installation" and choose folder, with NUnit assemblies.