-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
331 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using System.Collections.Generic; | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
|
||
using NUnit.Framework; | ||
|
||
using JetBrains.Application; | ||
using JetBrains.Threading; | ||
|
||
using OrderUsings.Configuration; | ||
using OrderUsings.ReSharper.Settings; | ||
|
||
[assembly: AssemblyTitle("OrderUsings.ReSharper810.Tests")] | ||
[assembly: AssemblyDescription("Tests for ReSharper v8.1 Order Usings plug-in")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("Ian Griffiths")] | ||
[assembly: AssemblyProduct("Order Usings")] | ||
[assembly: AssemblyCopyright("Copyright © Ian Griffiths, 2014")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
[assembly: AssemblyVersion("1.2.0.0")] | ||
[assembly: AssemblyFileVersion("1.2.0.0")] | ||
|
||
[assembly: ComVisible(false)] | ||
|
||
/// <summary> | ||
/// Test environment. Must be in the global namespace. | ||
/// </summary> | ||
[SetUpFixture] | ||
// ReSharper disable once CheckNamespace | ||
public class TestEnvironmentAssembly : ReSharperTestEnvironmentAssembly | ||
{ | ||
/// <summary> | ||
/// Gets the assemblies to load into test environment. | ||
/// Should include all assemblies which contain components. | ||
/// </summary> | ||
private static IEnumerable<Assembly> GetAssembliesToLoad() | ||
{ | ||
// Test assembly | ||
yield return Assembly.GetExecutingAssembly(); | ||
|
||
yield return typeof(GroupRule).Assembly; | ||
yield return typeof(OrderUsingsSettings).Assembly; | ||
} | ||
|
||
public override void SetUp() | ||
{ | ||
base.SetUp(); | ||
ReentrancyGuard.Current.Execute( | ||
"LoadAssemblies", | ||
() => Shell.Instance.GetComponent<AssemblyManager>().LoadAssemblies( | ||
GetType().Name, GetAssembliesToLoad())); | ||
} | ||
|
||
public override void TearDown() | ||
{ | ||
ReentrancyGuard.Current.Execute( | ||
"UnloadAssemblies", | ||
() => Shell.Instance.GetComponent<AssemblyManager>().UnloadAssemblies( | ||
GetType().Name, GetAssembliesToLoad())); | ||
base.TearDown(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="..\packages\JetBrains.ReSharper.SDK.Tests.8.2.1158\build\JetBrains.ReSharper.SDK.Tests.Props" Condition="Exists('..\packages\JetBrains.ReSharper.SDK.Tests.8.2.1158\build\JetBrains.ReSharper.SDK.Tests.Props')" /> | ||
<Import Project="..\packages\JetBrains.ReSharper.SDK.8.2.1158\build\JetBrains.ReSharper.SDK.Props" Condition="Exists('..\packages\JetBrains.ReSharper.SDK.8.2.1158\build\JetBrains.ReSharper.SDK.Props')" /> | ||
<PropertyGroup> | ||
<ReSharperSdkMode>Tests</ReSharperSdkMode> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProductVersion>8.0.30703</ProductVersion> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{396DEB61-5CC3-48C8-8877-1E344C564E29}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>ReSharper.Tests</RootNamespace> | ||
<AssemblyName>ReSharper820.Tests</AssemblyName> | ||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<TargetFrameworkProfile /> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>JET_MODE_ASSERT;DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="PresentationCore" /> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Drawing" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Windows.Forms" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="WindowsBase" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="..\Resharper810.Tests\CodeCleanup\WhenOrderIsWrong.cs"> | ||
<Link>CodeCleanup\WhenOrderIsWrong.cs</Link> | ||
</Compile> | ||
<Compile Include="..\Resharper810.Tests\Highlighting\WhenOrderIsWrong.cs"> | ||
<Link>Highlighting\WhenOrderIsWrong.cs</Link> | ||
</Compile> | ||
<Compile Include="..\Resharper810.Tests\Highlighting\WhenSpacingIsWrong.cs"> | ||
<Link>Highlighting\WhenSpacingIsWrong.cs</Link> | ||
</Compile> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
<None Include="ReadMe.txt" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\OrderUsings.Core\OrderUsings.Core.csproj"> | ||
<Project>{9875da0a-db09-47b2-80b5-80b08e430cef}</Project> | ||
<Name>OrderUsings.Core</Name> | ||
</ProjectReference> | ||
<ProjectReference Include="..\ReSharper820\ReSharper820.csproj"> | ||
<Project>{0eff7bd1-e944-4cfd-bbf4-91563372bcaf}</Project> | ||
<Name>ReSharper820</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||
<PropertyGroup> | ||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | ||
</PropertyGroup> | ||
<Error Condition="!Exists('..\packages\JetBrains.ReSharper.SDK.8.2.1158\build\JetBrains.ReSharper.SDK.Props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\JetBrains.ReSharper.SDK.8.2.1158\build\JetBrains.ReSharper.SDK.Props'))" /> | ||
<Error Condition="!Exists('..\packages\JetBrains.ReSharper.SDK.8.2.1158\build\JetBrains.ReSharper.SDK.Targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\JetBrains.ReSharper.SDK.8.2.1158\build\JetBrains.ReSharper.SDK.Targets'))" /> | ||
<Error Condition="!Exists('..\packages\JetBrains.ReSharper.SDK.Tests.8.2.1158\build\JetBrains.ReSharper.SDK.Tests.Props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\JetBrains.ReSharper.SDK.Tests.8.2.1158\build\JetBrains.ReSharper.SDK.Tests.Props'))" /> | ||
</Target> | ||
<Import Project="..\packages\JetBrains.ReSharper.SDK.8.2.1158\build\JetBrains.ReSharper.SDK.Targets" Condition="Exists('..\packages\JetBrains.ReSharper.SDK.8.2.1158\build\JetBrains.ReSharper.SDK.Targets')" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
You have just generated an empty ReSharper plugin test project. | ||
|
||
To add additional tests to your project, use the Add|New Item... menu. | ||
|
||
To add test data to your project, open or create a \test\data folder inside | ||
the solution folder. Then, in each of the tests you create, be sure to override | ||
the RelativeTestDataPath property to correctly point ReSharper to your tests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="JetBrains.ReSharper.SDK" version="8.2.1158" targetFramework="net40" /> | ||
<package id="JetBrains.ReSharper.SDK.Tests" version="8.2.1158" targetFramework="net40" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using JetBrains.ActionManagement; | ||
using JetBrains.Application.PluginSupport; | ||
|
||
[assembly: AssemblyTitle("ReSharper820")] | ||
[assembly: AssemblyDescription("Rules-based ordering for C# using directives")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("Ian Griffiths")] | ||
[assembly: AssemblyProduct("Order Usings")] | ||
[assembly: AssemblyCopyright("Copyright © Ian Griffiths, 2014")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
[assembly: AssemblyVersion("1.2.0.0")] | ||
[assembly: AssemblyFileVersion("1.2.0.0")] | ||
|
||
[assembly: ActionsXml("ReSharper820.Actions.xml")] | ||
|
||
// The following information is displayed by ReSharper in the Plugins dialog | ||
[assembly: PluginTitle("Order Usings")] | ||
[assembly: PluginDescription("Rules-based ordering for C# using directives")] | ||
[assembly: PluginVendor("Ian Griffiths")] | ||
|
||
[assembly: InternalsVisibleTo("ReSharper820.Tests")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="..\packages\JetBrains.ReSharper.SDK.8.2.1158\build\JetBrains.ReSharper.SDK.Props" Condition="Exists('..\packages\JetBrains.ReSharper.SDK.8.2.1158\build\JetBrains.ReSharper.SDK.Props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProductVersion>8.0.30703</ProductVersion> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{0EFF7BD1-E944-4CFD-BBF4-91563372BCAF}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>OrderUsings.ReSharper</RootNamespace> | ||
<AssemblyName>OrderUsings.ReSharper820</AssemblyName> | ||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<TargetFrameworkProfile /> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>JET_MODE_ASSERT;DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> | ||
<StartAction>Program</StartAction> | ||
<StartProgram>$(VsInstallDir)devenv.exe</StartProgram> | ||
<StartArguments>/ReSharper.Plugin $(AssemblyName).dll /ReSharper.Internal</StartArguments> | ||
<StartWorkingDirectory>$(MSBuildProjectDirectory)\$(OutputPath)</StartWorkingDirectory> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="PresentationCore" /> | ||
<Reference Include="PresentationFramework" /> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Drawing" /> | ||
<Reference Include="System.Xaml" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Windows.Forms" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="WindowsBase" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="..\ReSharper810\CodeCleanup\OrderAndSpaceCleanupDescriptor.cs"> | ||
<Link>CodeCleanup\OrderAndSpaceCleanupDescriptor.cs</Link> | ||
</Compile> | ||
<Compile Include="..\ReSharper810\CodeCleanup\OrderAndSpacingCodeCleanupModule.cs"> | ||
<Link>CodeCleanup\OrderAndSpacingCodeCleanupModule.cs</Link> | ||
</Compile> | ||
<Compile Include="..\ReSharper810\CodeModel\ImportReader.cs"> | ||
<Link>CodeModel\ImportReader.cs</Link> | ||
</Compile> | ||
<Compile Include="..\ReSharper810\Fixes.cs"> | ||
<Link>Fixes.cs</Link> | ||
</Compile> | ||
<Compile Include="..\ReSharper810\Highlightings\BaseHighlighting.cs"> | ||
<Link>Highlightings\BaseHighlighting.cs</Link> | ||
</Compile> | ||
<Compile Include="..\ReSharper810\Highlightings\UsingOrderHighlighting.cs"> | ||
<Link>Highlightings\UsingOrderHighlighting.cs</Link> | ||
</Compile> | ||
<Compile Include="..\ReSharper810\Highlightings\UsingSpacingHighlighting.cs"> | ||
<Link>Highlightings\UsingSpacingHighlighting.cs</Link> | ||
</Compile> | ||
<Compile Include="..\ReSharper810\Inspection\OrderUsingsDaemonStage.cs"> | ||
<Link>Inspection\OrderUsingsDaemonStage.cs</Link> | ||
</Compile> | ||
<Compile Include="..\ReSharper810\Inspection\OrderUsingsDaemonStageProcess.cs"> | ||
<Link>Inspection\OrderUsingsDaemonStageProcess.cs</Link> | ||
</Compile> | ||
<Compile Include="..\ReSharper810\QuickFixes\UsingOrderAndSpacingQuickFix.cs"> | ||
<Link>QuickFixes\UsingOrderAndSpacingQuickFix.cs</Link> | ||
</Compile> | ||
<Compile Include="..\ReSharper810\Settings\OrderUsingsOptionsPage.cs"> | ||
<Link>Settings\OrderUsingsOptionsPage.cs</Link> | ||
</Compile> | ||
<Compile Include="..\ReSharper810\Settings\OrderUsingsSettings.cs"> | ||
<Link>Settings\OrderUsingsSettings.cs</Link> | ||
</Compile> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\OrderUsings.Core\OrderUsings.Core.csproj"> | ||
<Project>{9875da0a-db09-47b2-80b5-80b08e430cef}</Project> | ||
<Name>OrderUsings.Core</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||
<PropertyGroup> | ||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | ||
</PropertyGroup> | ||
<Error Condition="!Exists('..\packages\JetBrains.ReSharper.SDK.8.2.1158\build\JetBrains.ReSharper.SDK.Props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\JetBrains.ReSharper.SDK.8.2.1158\build\JetBrains.ReSharper.SDK.Props'))" /> | ||
<Error Condition="!Exists('..\packages\JetBrains.ReSharper.SDK.8.2.1158\build\JetBrains.ReSharper.SDK.Targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\JetBrains.ReSharper.SDK.8.2.1158\build\JetBrains.ReSharper.SDK.Targets'))" /> | ||
</Target> | ||
<Import Project="..\packages\JetBrains.ReSharper.SDK.8.2.1158\build\JetBrains.ReSharper.SDK.Targets" Condition="Exists('..\packages\JetBrains.ReSharper.SDK.8.2.1158\build\JetBrains.ReSharper.SDK.Targets')" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="JetBrains.ReSharper.SDK" version="8.2.1158" targetFramework="net40" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace Resharper810.Tests.CodeCleanup | ||
namespace Resharper.Tests.CodeCleanup | ||
{ | ||
using NUnit.Framework; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace Resharper810.Tests.Highlighting | ||
namespace Resharper.Tests.Highlighting | ||
{ | ||
using System; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace Resharper810.Tests.Highlighting | ||
namespace Resharper.Tests.Highlighting | ||
{ | ||
using System; | ||
|
||
|
Oops, something went wrong.