Resharper fails to recognize exceptions ?

Hello !

Here is simple unit test with NUnit framework.

public class Class1
        public void ThrowsApplicationException()
            throw new ApplicationException();

This test fails in NUnit test runner, but succedes in Resharper test runner.


Comment actions Permalink

Hello Alexey
     Which version of NUnit are you using? Does this test fail in NUnit 2.5.3 test runner? Thank you!

Andrey Serebryansky

Support Engineer

JetBrains, Inc

"Develop with pleasure!"
Comment actions Permalink

I'm using NUnit 2.4.8. There is different behaviour in 2.4.8 and 2.5.3 This test succedes in 2.5.3

P.S. here is bug description:

Thanks for your answer !

Comment actions Permalink

Hi, i've got the same issue (also Nunit 2.4.8)
We're planning on upgrading N-unit, but in the mean while, will there be a fix for resharper?

Sample code:

          // Test succeeds


        public void ShouldFailBecauseOfWrongExceptionType()


            throw new ArgumentException();


        // Test Fails

        [Test, ExpectedException(typeof(SqlException))]
        public void ShouldFailBecauseNoExceptionIsThrown()

Resharper version details:
JetBrains ReSharper 5 C# Edition
Build 5.0.1659.36 on 2010-04-13T02:19:06


Please sign in to leave a comment.