Unit Test Runner and ExpectedException attribute

I have a test which fails when run via the NUnit GUI or NUnit-Console but passes when run within the Unit Test Runner. The test below demonstrates the problem


public class SampleTestFixture
{

public void TearDown()
{
throw new Exception();
}



public void Test()
{
throw new ArgumentNullException();
}
}

It appears that the exception thrown in the TearDown is swallowed by the Unit Test Runner when a test is run that has an ExpectedException attribute.

Why does the behaviour of the unit test runner differ from NUnit?

1 comment
Comment actions Permalink

Hello,

We appreciate your feedback.

The corresponding JIRA request has been created, and you are welcome to monitor
its status at http://www.jetbrains.net/jira/browse/RSRP-50818.

Best regards,
- Development Team.


0

Please sign in to leave a comment.