ReSharper Support

Currently, the main piece of xunitcontrib is the ReSharper support. It consists of three parts:

Installation

There is currently no installer, but the steps to install aren't too difficult.

For ReSharper 5.0
  1. Close all Visual Studio instances
  2. Copy the folder xunitcontrib.runner.resharper.5.0 to C:\Program Files\JetBrains\ReSharper\v5.0\bin\plugins (you might need to create the plugins folder). Alternatively, you can copy the folder to <RoamingAppData>\JetBrains\ReSharper\v5.0\vs10.0\plugins, where vs10.0 is for VS2010 (use vs9.0 is for VS2008 or vs8.0 for VS2005) and <RoamingAppData> is e.g. C:\Users\matt\AppData\Roaming. This allows for installation where the user doesn't have permissions to write to the Program Files folder
  3. Copy the file resharper.external.annotations\xunit.xml to C:\Program Files\JetBrains\ReSharper\v5.0\bin\External Annotations
  4. Start Visual Studio
  5. Go to ReSharper -> Live Templates and click the "Import" toolbar button
  6. Import either xunit-ae.xml or xunit-xe.xml. The first file gives code snippets beginning with "a" for assert (e.g. ae => Assert.Equal), the second gives code snippets beginning with "x" for xunit (e.g. xe => Assert.Equal). (The "xe" file exists to avoid clashes with other unit testing framework templates). Pick which one you want and import just that file.

For ReSharper 4.5 and 4.1

The process is as above for 5.0, but replace all occurrences of 5.0 with 4.5 or 4.1.

Known Issues

Please see the notes on the test runner page.

Last edited Jun 13, 2010 at 9:24 PM by mattellis, version 5