Resharper test runner marking story with Pending items as Fail not Inconclusive

May 6, 2010 at 3:07 PM

We're just starting out using StoryQ and have hit a problem with the 'writing your first StoryQ test' code with Resharper. We're using Resharper Build 5.0.1658.17.

When the MSTest is run using the Resharper Unit Test runner, the 'throw new NotImplementedException()'s are causing the test to be marked as Fail rather than Inconclusive. This appears to be a restriction of Resharper?

Visual Studio's MSTest runner in Visual Studio 2008 runs the Story fine and marks the test as Inconclusive as expected.

For those who use Resharper, is this the expected behaviour, or is there an option or solution that would be better to try?


May 6, 2010 at 8:05 PM

Hi Jon

When StoryQ executes a step that throws a NotImplementedException, it tries to throw a Pending or an AssertInconclusive exception, depending on what framework it thinks your using. My guess is that this build of resharper makes both MSTest and NUnit available to the appdomain. Here's the code that tries to figure out what kind of exception to throw:

You can fix this by overriding this default exception converter (assuming you want to use MSTest):

StoryQ.ExceptionHelper.PendingExceptionBuilder = p => new AssertInconclusiveException();