There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Resharper runner crashes when adding [Fact] at end of class (with fix)
Hi folks. I've got a bug where the resharper test runner crashes if you add the [Fact] attribute as the last thing in the body of a class. Easy to repro: Create a new class, and before adding a method signature, enter [Fact] - boom! the plugin crashes.
I've fixed the problem, but after noting a comment elsewhere on the site about IP agreements, it might be best if I just describe how I fixed it...
The problem is that in ProcessBeforeInterior in XunitFileExplorer, the name and document ranges are invalid when they're passed into UnitTestElementDisposition's constructor. The guard logic throws an exception. So I just pulled them out into variables and
checked each's IsValid methods. Bob's your uncle.