From c141bc11ef1e8c5e13e8c6d2a6993fc08071929a Mon Sep 17 00:00:00 2001 From: Josef Pihrt Date: Sun, 20 Nov 2022 19:11:51 +0100 Subject: [PATCH] Add package Roslynator.Testing.CSharp.MSTest (#997) --- ChangeLog.md | 1 + src/Core.sln | 11 ++++- src/Roslynator.sln | 7 +++ .../Testing.CSharp.MSTest.csproj | 46 +++++++++++++++++++ .../Testing/CSharp/MSTest/MSTestAssert.cs | 18 ++++++++ .../MSTestCompilerDiagnosticFixVerifier.cs | 19 ++++++++ .../CSharp/MSTest/MSTestDiagnosticVerifier.cs | 21 +++++++++ .../MSTest/MSTestRefactoringVerifier.cs | 19 ++++++++ .../Testing.CSharp.MSTest/docs/NuGetReadme.md | 22 +++++++++ src/Tests/Testing.CSharp.sln | 10 +++- .../Testing.CSharp/Properties/AssemblyInfo.cs | 1 + .../Testing.Common/Properties/AssemblyInfo.cs | 1 + src/Tests/Tests.sln | 10 +++- tools/build.cmd | 1 + tools/build_testing.cmd | 1 + tools/generate_documentation.cmd | 2 +- tools/nuget_push.cmd | 1 + 17 files changed, 184 insertions(+), 7 deletions(-) create mode 100644 src/Tests/Testing.CSharp.MSTest/Testing.CSharp.MSTest.csproj create mode 100644 src/Tests/Testing.CSharp.MSTest/Testing/CSharp/MSTest/MSTestAssert.cs create mode 100644 src/Tests/Testing.CSharp.MSTest/Testing/CSharp/MSTest/MSTestCompilerDiagnosticFixVerifier.cs create mode 100644 src/Tests/Testing.CSharp.MSTest/Testing/CSharp/MSTest/MSTestDiagnosticVerifier.cs create mode 100644 src/Tests/Testing.CSharp.MSTest/Testing/CSharp/MSTest/MSTestRefactoringVerifier.cs create mode 100644 src/Tests/Testing.CSharp.MSTest/docs/NuGetReadme.md diff --git a/ChangeLog.md b/ChangeLog.md index b92a923914..4a4ec72186 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - This analyzer reports null checks of arguments that are: - annotated as nullable reference type. - optional and its default value is `null`. +- Add package `Roslynator.Testing.CSharp.MSTest` ([#997](https://github.com/JosefPihrt/Roslynator/pull/997)). ### Changed diff --git a/src/Core.sln b/src/Core.sln index b3859fa4b0..9bef229a17 100644 --- a/src/Core.sln +++ b/src/Core.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28407.52 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.33027.108 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{228E25E1-FDE6-40C1-98AF-8E636D174D94}" ProjectSection(SolutionItems) = preProject @@ -23,6 +23,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Testing.CSharp.Xunit", "Tes EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Testing", "Testing", "{EB3BBB7E-3C50-4C99-B644-54E79B9D9057}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Testing.CSharp.MSTest", "Tests\Testing.CSharp.MSTest\Testing.CSharp.MSTest.csproj", "{E3B53E76-EFCF-4D93-B015-06FE4697AE4E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -57,6 +59,10 @@ Global {D4823929-83FD-46FF-986F-87457550F4CF}.Debug|Any CPU.Build.0 = Debug|Any CPU {D4823929-83FD-46FF-986F-87457550F4CF}.Release|Any CPU.ActiveCfg = Release|Any CPU {D4823929-83FD-46FF-986F-87457550F4CF}.Release|Any CPU.Build.0 = Release|Any CPU + {E3B53E76-EFCF-4D93-B015-06FE4697AE4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E3B53E76-EFCF-4D93-B015-06FE4697AE4E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E3B53E76-EFCF-4D93-B015-06FE4697AE4E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E3B53E76-EFCF-4D93-B015-06FE4697AE4E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -65,6 +71,7 @@ Global {4B793EFF-2DF6-44DF-AF71-C94422E310D4} = {EB3BBB7E-3C50-4C99-B644-54E79B9D9057} {F61EB339-5B02-4AD7-A3C7-BF80B8F00F95} = {EB3BBB7E-3C50-4C99-B644-54E79B9D9057} {D4823929-83FD-46FF-986F-87457550F4CF} = {EB3BBB7E-3C50-4C99-B644-54E79B9D9057} + {E3B53E76-EFCF-4D93-B015-06FE4697AE4E} = {EB3BBB7E-3C50-4C99-B644-54E79B9D9057} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D1943010-8F47-4798-9A3D-97BC24CF1AC4} diff --git a/src/Roslynator.sln b/src/Roslynator.sln index 5b5c683840..567de88069 100644 --- a/src/Roslynator.sln +++ b/src/Roslynator.sln @@ -124,6 +124,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Testing.CSharp.Xunit", "Tes EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.Common", "Tests\Tests.Common\Tests.Common.csproj", "{D671D7C6-A4DD-41DC-A309-7892E008FD0A}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Testing.CSharp.MSTest", "Tests\Testing.CSharp.MSTest\Testing.CSharp.MSTest.csproj", "{E08D9D15-E5D8-424F-A544-E00A5CB85F50}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -281,6 +283,10 @@ Global {D671D7C6-A4DD-41DC-A309-7892E008FD0A}.Debug|Any CPU.Build.0 = Debug|Any CPU {D671D7C6-A4DD-41DC-A309-7892E008FD0A}.Release|Any CPU.ActiveCfg = Release|Any CPU {D671D7C6-A4DD-41DC-A309-7892E008FD0A}.Release|Any CPU.Build.0 = Release|Any CPU + {E08D9D15-E5D8-424F-A544-E00A5CB85F50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E08D9D15-E5D8-424F-A544-E00A5CB85F50}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E08D9D15-E5D8-424F-A544-E00A5CB85F50}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E08D9D15-E5D8-424F-A544-E00A5CB85F50}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -309,6 +315,7 @@ Global {41F5F74A-7D16-4B6B-81E6-D222A4485FC4} = {CC69BDBB-35E9-43A9-9397-4B2832270BB8} {CA7B4345-0758-4AFA-ADCC-2563640614BD} = {A1DB0C05-3710-4B69-955F-2F46E330591B} {D671D7C6-A4DD-41DC-A309-7892E008FD0A} = {A1DB0C05-3710-4B69-955F-2F46E330591B} + {E08D9D15-E5D8-424F-A544-E00A5CB85F50} = {A1DB0C05-3710-4B69-955F-2F46E330591B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D1943010-8F47-4798-9A3D-97BC24CF1AC4} diff --git a/src/Tests/Testing.CSharp.MSTest/Testing.CSharp.MSTest.csproj b/src/Tests/Testing.CSharp.MSTest/Testing.CSharp.MSTest.csproj new file mode 100644 index 0000000000..8438d55acc --- /dev/null +++ b/src/Tests/Testing.CSharp.MSTest/Testing.CSharp.MSTest.csproj @@ -0,0 +1,46 @@ + + + + netstandard2.0 + $(RoslynatorTestingVersion) + Roslynator.Testing.CSharp.MSTest + Roslynator.Testing.CSharp.MSTest + + + + true + true + 1591 + bin\$(Configuration)\netstandard2.0\Roslynator.Testing.CSharp.MSTest.xml + + + + Roslynator.Testing.CSharp.MSTest + $(RoslynatorTestingPackageVersion) + + Testing framework for Roslyn analyzers, refactorings and code fixes. + false + Apache-2.0 + https://github.com/josefpihrt/roslynator + icon.png + + Roslyn;CodeAnalysis;Test;UnitTest + docs/README.md + https://github.com/josefpihrt/roslynator.git + git + + + + + + + + + + + + + + + + diff --git a/src/Tests/Testing.CSharp.MSTest/Testing/CSharp/MSTest/MSTestAssert.cs b/src/Tests/Testing.CSharp.MSTest/Testing/CSharp/MSTest/MSTestAssert.cs new file mode 100644 index 0000000000..46c5ceee25 --- /dev/null +++ b/src/Tests/Testing.CSharp.MSTest/Testing/CSharp/MSTest/MSTestAssert.cs @@ -0,0 +1,18 @@ +// Copyright (c) Josef Pihrt and Contributors. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +namespace Roslynator.Testing.CSharp.MSTest; + +internal class MSTestAssert : IAssert +{ + public static MSTestAssert Instance { get; } = new(); + + public void Equal(string expected, string actual) + { + global::Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(expected, actual); + } + + public void True(bool condition, string userMessage) + { + global::Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsTrue(condition, userMessage); + } +} diff --git a/src/Tests/Testing.CSharp.MSTest/Testing/CSharp/MSTest/MSTestCompilerDiagnosticFixVerifier.cs b/src/Tests/Testing.CSharp.MSTest/Testing/CSharp/MSTest/MSTestCompilerDiagnosticFixVerifier.cs new file mode 100644 index 0000000000..9a62ec8925 --- /dev/null +++ b/src/Tests/Testing.CSharp.MSTest/Testing/CSharp/MSTest/MSTestCompilerDiagnosticFixVerifier.cs @@ -0,0 +1,19 @@ +// Copyright (c) Josef Pihrt and Contributors. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.CodeAnalysis.CodeFixes; + +namespace Roslynator.Testing.CSharp.MSTest; + +/// +/// Represents a verifier for C# compiler diagnostics. +/// +public abstract class MSTestCompilerDiagnosticFixVerifier : CSharpCompilerDiagnosticFixVerifier + where TFixProvider : CodeFixProvider, new() +{ + /// + /// Initializes a new instance of + /// + protected MSTestCompilerDiagnosticFixVerifier() : base(MSTestAssert.Instance) + { + } +} diff --git a/src/Tests/Testing.CSharp.MSTest/Testing/CSharp/MSTest/MSTestDiagnosticVerifier.cs b/src/Tests/Testing.CSharp.MSTest/Testing/CSharp/MSTest/MSTestDiagnosticVerifier.cs new file mode 100644 index 0000000000..2b458b80ce --- /dev/null +++ b/src/Tests/Testing.CSharp.MSTest/Testing/CSharp/MSTest/MSTestDiagnosticVerifier.cs @@ -0,0 +1,21 @@ +// Copyright (c) Josef Pihrt and Contributors. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.CodeAnalysis.CodeFixes; +using Microsoft.CodeAnalysis.Diagnostics; + +namespace Roslynator.Testing.CSharp.MSTest; + +/// +/// Represents a verifier for a C# diagnostic that is produced by . +/// +public abstract class MSTestDiagnosticVerifier : CSharpDiagnosticVerifier + where TAnalyzer : DiagnosticAnalyzer, new() + where TFixProvider : CodeFixProvider, new() +{ + /// + /// Initializes a new instance of . + /// + protected MSTestDiagnosticVerifier() : base(MSTestAssert.Instance) + { + } +} diff --git a/src/Tests/Testing.CSharp.MSTest/Testing/CSharp/MSTest/MSTestRefactoringVerifier.cs b/src/Tests/Testing.CSharp.MSTest/Testing/CSharp/MSTest/MSTestRefactoringVerifier.cs new file mode 100644 index 0000000000..c8c7bdcebf --- /dev/null +++ b/src/Tests/Testing.CSharp.MSTest/Testing/CSharp/MSTest/MSTestRefactoringVerifier.cs @@ -0,0 +1,19 @@ +// Copyright (c) Josef Pihrt and Contributors. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.CodeAnalysis.CodeRefactorings; + +namespace Roslynator.Testing.CSharp.MSTest; + +/// +/// Represents verifier for a C# code refactoring. +/// +public abstract class MSTestRefactoringVerifier : CSharpRefactoringVerifier + where TRefactoringProvider : CodeRefactoringProvider, new() +{ + /// + /// Initializes a new instance of . + /// + protected MSTestRefactoringVerifier() : base(MSTestAssert.Instance) + { + } +} diff --git a/src/Tests/Testing.CSharp.MSTest/docs/NuGetReadme.md b/src/Tests/Testing.CSharp.MSTest/docs/NuGetReadme.md new file mode 100644 index 0000000000..3160080099 --- /dev/null +++ b/src/Tests/Testing.CSharp.MSTest/docs/NuGetReadme.md @@ -0,0 +1,22 @@ +# Roslynator.Testing.CSharp.MSTest + +Test framework for unit testing of [Roslyn](https://github.com/dotnet/roslyn) analyzers, refactorings and code fixes. + +## Usage + +Learn how to use the framework from actual usages in Roslynator repository: + +* Tests of analyzers are [here](https://github.com/josefpihrt/roslynator/tree/main/src/Tests/Analyzers.Tests), [here](https://github.com/josefpihrt/roslynator/tree/main/src/Tests/CodeAnalysis.Analyzers.Tests) and [here](https://github.com/josefpihrt/roslynator/tree/main/src/Tests/Formatting.Analyzers.Tests). +* Tests of refactorings are [here](https://github.com/josefpihrt/roslynator/tree/main/src/Tests/Refactorings.Tests). +* Tests of fixes of compiler diagnostics are [here](https://github.com/josefpihrt/roslynator/tree/main/src/Tests/CodeFixes.Tests). + +## Feedback + +* File an issue on [GitHub](https://github.com/josefpihrt/roslynator/issues/new) +* Follow on [Twitter](https://twitter.com/roslynator) + +## Related Products + +* [Roslynator for Visual Studio 2022](https://marketplace.visualstudio.com/items?itemName=josefpihrt.Roslynator2022) +* [Roslynator for VS Code](https://marketplace.visualstudio.com/items?itemName=josefpihrt-vscode.roslynator) +* [Roslynator Command-line Tool](https://www.nuget.org/packages/Roslynator.DotNet.Cli) diff --git a/src/Tests/Testing.CSharp.sln b/src/Tests/Testing.CSharp.sln index 81b93d72cc..f3ee4e1b54 100644 --- a/src/Tests/Testing.CSharp.sln +++ b/src/Tests/Testing.CSharp.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29411.108 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.33027.108 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{228E25E1-FDE6-40C1-98AF-8E636D174D94}" ProjectSection(SolutionItems) = preProject @@ -15,6 +15,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Testing.Common", "Testing.C EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Testing.CSharp.Xunit", "Testing.CSharp.Xunit\Testing.CSharp.Xunit.csproj", "{AD1C3E62-672B-405A-9D90-4CB89CF58112}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Testing.CSharp.MSTest", "Testing.CSharp.MSTest\Testing.CSharp.MSTest.csproj", "{ED3B8F45-8BF0-4842-8A6C-C0FA91690D87}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -37,6 +39,10 @@ Global {AD1C3E62-672B-405A-9D90-4CB89CF58112}.Debug|Any CPU.Build.0 = Debug|Any CPU {AD1C3E62-672B-405A-9D90-4CB89CF58112}.Release|Any CPU.ActiveCfg = Release|Any CPU {AD1C3E62-672B-405A-9D90-4CB89CF58112}.Release|Any CPU.Build.0 = Release|Any CPU + {ED3B8F45-8BF0-4842-8A6C-C0FA91690D87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ED3B8F45-8BF0-4842-8A6C-C0FA91690D87}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ED3B8F45-8BF0-4842-8A6C-C0FA91690D87}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ED3B8F45-8BF0-4842-8A6C-C0FA91690D87}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/Tests/Testing.CSharp/Properties/AssemblyInfo.cs b/src/Tests/Testing.CSharp/Properties/AssemblyInfo.cs index c687fc54e4..99b5128233 100644 --- a/src/Tests/Testing.CSharp/Properties/AssemblyInfo.cs +++ b/src/Tests/Testing.CSharp/Properties/AssemblyInfo.cs @@ -11,3 +11,4 @@ [assembly: InternalsVisibleTo("Roslynator.CodeAnalysis.Analyzers.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d348e1a51bc190259aed17cfe132736241fef462de45a5de6c881c7f9d705073c7a2a08ba5ae493c7e878fe5f3cf7909e89045cca696422f03b284b147daf6b93c47bc53dd61ceeae60f73149d183032f029761d0d59aab49a26be4f6af71cd8194ace937642bdcb515f07530096122e97cfe6c8549a843530f71c24c7e3dab8")] [assembly: InternalsVisibleTo("Roslynator.Formatting.Analyzers.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d348e1a51bc190259aed17cfe132736241fef462de45a5de6c881c7f9d705073c7a2a08ba5ae493c7e878fe5f3cf7909e89045cca696422f03b284b147daf6b93c47bc53dd61ceeae60f73149d183032f029761d0d59aab49a26be4f6af71cd8194ace937642bdcb515f07530096122e97cfe6c8549a843530f71c24c7e3dab8")] [assembly: InternalsVisibleTo("Roslynator.Testing.CSharp.Xunit, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d348e1a51bc190259aed17cfe132736241fef462de45a5de6c881c7f9d705073c7a2a08ba5ae493c7e878fe5f3cf7909e89045cca696422f03b284b147daf6b93c47bc53dd61ceeae60f73149d183032f029761d0d59aab49a26be4f6af71cd8194ace937642bdcb515f07530096122e97cfe6c8549a843530f71c24c7e3dab8")] +[assembly: InternalsVisibleTo("Roslynator.Testing.CSharp.MSTest, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d348e1a51bc190259aed17cfe132736241fef462de45a5de6c881c7f9d705073c7a2a08ba5ae493c7e878fe5f3cf7909e89045cca696422f03b284b147daf6b93c47bc53dd61ceeae60f73149d183032f029761d0d59aab49a26be4f6af71cd8194ace937642bdcb515f07530096122e97cfe6c8549a843530f71c24c7e3dab8")] diff --git a/src/Tests/Testing.Common/Properties/AssemblyInfo.cs b/src/Tests/Testing.Common/Properties/AssemblyInfo.cs index 7defbb4886..4f8d362ae5 100644 --- a/src/Tests/Testing.Common/Properties/AssemblyInfo.cs +++ b/src/Tests/Testing.Common/Properties/AssemblyInfo.cs @@ -5,6 +5,7 @@ [assembly: InternalsVisibleTo("Roslynator.Testing.CSharp, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d348e1a51bc190259aed17cfe132736241fef462de45a5de6c881c7f9d705073c7a2a08ba5ae493c7e878fe5f3cf7909e89045cca696422f03b284b147daf6b93c47bc53dd61ceeae60f73149d183032f029761d0d59aab49a26be4f6af71cd8194ace937642bdcb515f07530096122e97cfe6c8549a843530f71c24c7e3dab8")] [assembly: InternalsVisibleTo("Roslynator.Testing.VisualBasic, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d348e1a51bc190259aed17cfe132736241fef462de45a5de6c881c7f9d705073c7a2a08ba5ae493c7e878fe5f3cf7909e89045cca696422f03b284b147daf6b93c47bc53dd61ceeae60f73149d183032f029761d0d59aab49a26be4f6af71cd8194ace937642bdcb515f07530096122e97cfe6c8549a843530f71c24c7e3dab8")] [assembly: InternalsVisibleTo("Roslynator.Testing.CSharp.Xunit, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d348e1a51bc190259aed17cfe132736241fef462de45a5de6c881c7f9d705073c7a2a08ba5ae493c7e878fe5f3cf7909e89045cca696422f03b284b147daf6b93c47bc53dd61ceeae60f73149d183032f029761d0d59aab49a26be4f6af71cd8194ace937642bdcb515f07530096122e97cfe6c8549a843530f71c24c7e3dab8")] +[assembly: InternalsVisibleTo("Roslynator.Testing.CSharp.MSTest, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d348e1a51bc190259aed17cfe132736241fef462de45a5de6c881c7f9d705073c7a2a08ba5ae493c7e878fe5f3cf7909e89045cca696422f03b284b147daf6b93c47bc53dd61ceeae60f73149d183032f029761d0d59aab49a26be4f6af71cd8194ace937642bdcb515f07530096122e97cfe6c8549a843530f71c24c7e3dab8")] [assembly: InternalsVisibleTo("Roslynator.Tests.Common, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d348e1a51bc190259aed17cfe132736241fef462de45a5de6c881c7f9d705073c7a2a08ba5ae493c7e878fe5f3cf7909e89045cca696422f03b284b147daf6b93c47bc53dd61ceeae60f73149d183032f029761d0d59aab49a26be4f6af71cd8194ace937642bdcb515f07530096122e97cfe6c8549a843530f71c24c7e3dab8")] [assembly: InternalsVisibleTo("Roslynator.Core.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d348e1a51bc190259aed17cfe132736241fef462de45a5de6c881c7f9d705073c7a2a08ba5ae493c7e878fe5f3cf7909e89045cca696422f03b284b147daf6b93c47bc53dd61ceeae60f73149d183032f029761d0d59aab49a26be4f6af71cd8194ace937642bdcb515f07530096122e97cfe6c8549a843530f71c24c7e3dab8")] [assembly: InternalsVisibleTo("Roslynator.CSharp.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d348e1a51bc190259aed17cfe132736241fef462de45a5de6c881c7f9d705073c7a2a08ba5ae493c7e878fe5f3cf7909e89045cca696422f03b284b147daf6b93c47bc53dd61ceeae60f73149d183032f029761d0d59aab49a26be4f6af71cd8194ace937642bdcb515f07530096122e97cfe6c8549a843530f71c24c7e3dab8")] diff --git a/src/Tests/Tests.sln b/src/Tests/Tests.sln index e324efb867..6b26b3bb73 100644 --- a/src/Tests/Tests.sln +++ b/src/Tests/Tests.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29411.108 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.33027.108 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{228E25E1-FDE6-40C1-98AF-8E636D174D94}" ProjectSection(SolutionItems) = preProject @@ -67,6 +67,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Formatting.Analyzers.CodeFi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.Common", "Tests.Common\Tests.Common.csproj", "{D392CC4D-A4C9-4273-8AD1-17D6BCFE2826}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Testing.CSharp.MSTest", "Testing.CSharp.MSTest\Testing.CSharp.MSTest.csproj", "{9D7F97D5-9CAB-41FA-83E0-EE5CFFC3111F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -186,6 +188,10 @@ Global {D392CC4D-A4C9-4273-8AD1-17D6BCFE2826}.Debug|Any CPU.Build.0 = Debug|Any CPU {D392CC4D-A4C9-4273-8AD1-17D6BCFE2826}.Release|Any CPU.ActiveCfg = Release|Any CPU {D392CC4D-A4C9-4273-8AD1-17D6BCFE2826}.Release|Any CPU.Build.0 = Release|Any CPU + {9D7F97D5-9CAB-41FA-83E0-EE5CFFC3111F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D7F97D5-9CAB-41FA-83E0-EE5CFFC3111F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D7F97D5-9CAB-41FA-83E0-EE5CFFC3111F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D7F97D5-9CAB-41FA-83E0-EE5CFFC3111F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/tools/build.cmd b/tools/build.cmd index 2dd7501a2f..7be006436e 100644 --- a/tools/build.cmd +++ b/tools/build.cmd @@ -119,6 +119,7 @@ dotnet pack -c Release --no-build -v normal "..\src\CSharp.Workspaces\CSharp.Wor dotnet pack -c Release --no-build -v normal "..\src\Tests\Testing.Common\Testing.Common.csproj" dotnet pack -c Release --no-build -v normal "..\src\Tests\Testing.CSharp\Testing.CSharp.csproj" dotnet pack -c Release --no-build -v normal "..\src\Tests\Testing.CSharp.Xunit\Testing.CSharp.Xunit.csproj" +dotnet pack -c Release --no-build -v normal "..\src\Tests\Testing.CSharp.MSTest\Testing.CSharp.MSTest.csproj" orang copy "../src" "%_outDir%" -e nupkg,vsix --flat -i packages e ne diff --git a/tools/build_testing.cmd b/tools/build_testing.cmd index 9e0f2c7bdc..a7d03cd65c 100644 --- a/tools/build_testing.cmd +++ b/tools/build_testing.cmd @@ -10,6 +10,7 @@ if errorlevel 1 ( dotnet pack -c Release --no-build -v normal "..\src\Tests\Testing.Common\Testing.Common.csproj" dotnet pack -c Release --no-build -v normal "..\src\Tests\Testing.CSharp\Testing.CSharp.csproj" dotnet pack -c Release --no-build -v normal "..\src\Tests\Testing.CSharp.Xunit\Testing.CSharp.Xunit.csproj" +dotnet pack -c Release --no-build -v normal "..\src\Tests\Testing.CSharp.MSTest\Testing.CSharp.MSTest.csproj" echo OK pause diff --git a/tools/generate_documentation.cmd b/tools/generate_documentation.cmd index 3bc2d41978..7f1dc9bb1a 100644 --- a/tools/generate_documentation.cmd +++ b/tools/generate_documentation.cmd @@ -56,7 +56,7 @@ set _rootDirectoryUrl="../../docs/api/" %_roslynatorExe% generate-doc-root "..\src\Core.sln" ^ --properties %_msbuildProperties% ^ - --projects Testing.Common Testing.CSharp Testing.CSharp.Xunit ^ + --projects Testing.Common Testing.CSharp Testing.CSharp.Xunit Testing.CSharp.MSTest ^ -o "..\src\Tests\README.md" ^ --host github ^ --heading "Roslynator Testing Framework" ^ diff --git a/tools/nuget_push.cmd b/tools/nuget_push.cmd index 3efaf07860..f7b1266f31 100644 --- a/tools/nuget_push.cmd +++ b/tools/nuget_push.cmd @@ -11,6 +11,7 @@ dotnet nuget push "..\out\release\Roslynator.CSharp.Workspaces.*.nupkg" --source dotnet nuget push "..\out\release\Roslynator.Testing.Common.*.nupkg" --source %_nugetSource% --api-key %_apiKey% dotnet nuget push "..\out\release\Roslynator.Testing.CSharp.*.nupkg" --source %_nugetSource% --api-key %_apiKey% dotnet nuget push "..\out\release\Roslynator.Testing.CSharp.Xunit.*.nupkg" --source %_nugetSource% --api-key %_apiKey% +dotnet nuget push "..\out\release\Roslynator.Testing.CSharp.MSTest.*.nupkg" --source %_nugetSource% --api-key %_apiKey% dotnet nuget push "..\out\release\Roslynator.Analyzers.*.nupkg" --source %_nugetSource% --api-key %_apiKey% dotnet nuget push "..\out\release\Roslynator.Formatting.Analyzers.*.nupkg" --source %_nugetSource% --api-key %_apiKey%