ReSharper Platform SDK
 
Because ReSharper Platform SDK undefined is still in development, this documentation may not be entirely accurate and is subject to change.

Test Project Structure

Last modified: 04 July 2023

A test project is an NUnit based Class Library project, that targets .Net 4.0 and includes a reference to the main plugin project (ReSharper is a .net 4.0 application in order to support Visual Studio 2010 and above).

The test project should also include a reference to the JetBrains.ReSharper.SDK.Tests NuGet package. This package takes a dependency on the JetBrains.ReSharper.SDK package, as well as the NUnit package. The SDK.Tests package will ensure that all files required to run the plugin are copied to the output directory. This includes reference assemblies, but also content files, such as external annotations and CSS definition files.

The standard project layout for a ReSharper project with tests is as follows:

+-- src\ | +-- {plugin}.sln | +-- plugin\ | +-- {plugin}.csproj +-- test\ +-- data\ +-- nuget.config +-- ... +-- src\ +-- {tests}.csproj +-- TestEnvironment.cs +-- ...

Where {plugin} is the name of your plugin solution and project and {tests} is the name of your tests project. The main plugin solution includes the plugin project and the tests project.

The TestEnvironment.cs file contains the bootstrap code for the test environment. This is detailed in the Test Environment section.