[Deps]Update MSTest from 3.5.0 to 3.6.3 (#36115)
* Update MSTest from 3.5.0 to 3.6.3 * Use STA attributes that are now part of MSTest
This commit is contained in:
Родитель
09ce610dbb
Коммит
a6c5420f2a
|
@ -53,7 +53,7 @@
|
|||
<PackageVersion Include="ModernWpfUI" Version="0.9.4" />
|
||||
<!-- Moq to stay below v4.20 due to behavior change. need to be sure fixed -->
|
||||
<PackageVersion Include="Moq" Version="4.18.4" />
|
||||
<PackageVersion Include="MSTest" Version="3.5.0" />
|
||||
<PackageVersion Include="MSTest" Version="3.6.3" />
|
||||
<PackageVersion Include="NLog" Version="5.0.4" />
|
||||
<PackageVersion Include="NLog.Extensions.Logging" Version="5.3.8" />
|
||||
<PackageVersion Include="NLog.Schema" Version="5.2.8" />
|
||||
|
@ -94,4 +94,4 @@
|
|||
<PackageVersion Include="Microsoft.VariantAssignment.Client" Version="2.4.17140001" />
|
||||
<PackageVersion Include="Microsoft.VariantAssignment.Contract" Version="3.0.16990001" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -1338,7 +1338,7 @@ EXHIBIT A -Mozilla Public License.
|
|||
- Microsoft.Xaml.Behaviors.Wpf 1.1.39
|
||||
- ModernWpfUI 0.9.4
|
||||
- Moq 4.18.4
|
||||
- MSTest 3.5.0
|
||||
- MSTest 3.6.3
|
||||
- NLog.Extensions.Logging 5.3.8
|
||||
- NLog.Schema 5.2.8
|
||||
- ReverseMarkdown 4.1.0
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using Microsoft.PowerToys.STATestExtension;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Moq;
|
||||
using PowerLauncher.Plugin;
|
||||
|
|
|
@ -14,11 +14,6 @@
|
|||
<OutputPath>..\..\..\..\$(Platform)\$(Configuration)\tests\WoxTest</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\previewpane\STATestClassAttribute.cs" Link="STATestClassAttribute.cs" />
|
||||
<Compile Include="..\..\previewpane\STATestMethodAttribute.cs" Link="STATestMethodAttribute.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Plugins\Microsoft.Plugin.Folder\Microsoft.Plugin.Folder.csproj" />
|
||||
<ProjectReference Include="..\Plugins\Microsoft.Plugin.Indexer\Microsoft.Plugin.Indexer.csproj" />
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
// Used for STA tests in PreviewPane
|
||||
namespace Microsoft.PowerToys.STATestExtension
|
||||
{
|
||||
public class STATestClassAttribute : TestClassAttribute
|
||||
{
|
||||
public override TestMethodAttribute GetTestMethodAttribute(TestMethodAttribute testMethodAttribute)
|
||||
{
|
||||
if (testMethodAttribute is STATestMethodAttribute)
|
||||
{
|
||||
return testMethodAttribute;
|
||||
}
|
||||
|
||||
return new STATestMethodAttribute(base.GetTestMethodAttribute(testMethodAttribute));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
// Used for STA tests in PreviewPane
|
||||
namespace Microsoft.PowerToys.STATestExtension
|
||||
{
|
||||
public class STATestMethodAttribute : TestMethodAttribute
|
||||
{
|
||||
private readonly TestMethodAttribute _testMethodAttribute;
|
||||
|
||||
public STATestMethodAttribute()
|
||||
{
|
||||
}
|
||||
|
||||
public STATestMethodAttribute(TestMethodAttribute testMethodAttribute)
|
||||
{
|
||||
_testMethodAttribute = testMethodAttribute;
|
||||
}
|
||||
|
||||
public override TestResult[] Execute(ITestMethod testMethod)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(testMethod);
|
||||
|
||||
if (Thread.CurrentThread.GetApartmentState() == ApartmentState.STA)
|
||||
{
|
||||
return Invoke(testMethod);
|
||||
}
|
||||
|
||||
TestResult[] result = null;
|
||||
var thread = new Thread(() => result = Invoke(testMethod));
|
||||
thread.SetApartmentState(ApartmentState.STA);
|
||||
thread.Start();
|
||||
thread.Join();
|
||||
return result;
|
||||
}
|
||||
|
||||
private TestResult[] Invoke(ITestMethod testMethod)
|
||||
{
|
||||
if (_testMethodAttribute != null)
|
||||
{
|
||||
return _testMethodAttribute.Execute(testMethod);
|
||||
}
|
||||
|
||||
return new[] { testMethod.Invoke(null) };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,7 +10,6 @@ using System.Runtime.InteropServices.ComTypes;
|
|||
using System.Windows.Forms;
|
||||
|
||||
using Microsoft.PowerToys.PreviewHandler.Gcode;
|
||||
using Microsoft.PowerToys.STATestExtension;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Moq;
|
||||
|
||||
|
|
|
@ -39,7 +39,5 @@
|
|||
<Content Include="HelperFiles\sample_QOI.gcode">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Compile Include="..\STATestClassAttribute.cs" Link="STATestClassAttribute.cs" />
|
||||
<Compile Include="..\STATestMethodAttribute.cs" Link="STATestMethodAttribute.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
using System.Drawing;
|
||||
using System.IO;
|
||||
|
||||
using Microsoft.PowerToys.STATestExtension;
|
||||
using Microsoft.PowerToys.ThumbnailHandler.Gcode;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
|
|
@ -30,10 +30,6 @@
|
|||
<ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" />
|
||||
<ProjectReference Include="..\GcodeThumbnailProvider\GcodeThumbnailProvider.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\STATestClassAttribute.cs" Link="STATestClassAttribute.cs" />
|
||||
<Compile Include="..\STATestMethodAttribute.cs" Link="STATestMethodAttribute.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="HelperFiles\sample.gcode">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
|
|
|
@ -8,7 +8,6 @@ using System.Threading;
|
|||
using System.Windows.Forms;
|
||||
|
||||
using Microsoft.PowerToys.PreviewHandler.Markdown;
|
||||
using Microsoft.PowerToys.STATestExtension;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Microsoft.Web.WebView2.WinForms;
|
||||
|
||||
|
|
|
@ -35,8 +35,4 @@
|
|||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\STATestClassAttribute.cs" Link="STATestClassAttribute.cs" />
|
||||
<Compile Include="..\STATestMethodAttribute.cs" Link="STATestMethodAttribute.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -10,7 +10,6 @@ using System.Runtime.InteropServices.ComTypes;
|
|||
using System.Windows.Forms;
|
||||
|
||||
using Microsoft.PowerToys.PreviewHandler.Pdf;
|
||||
using Microsoft.PowerToys.STATestExtension;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Moq;
|
||||
|
||||
|
|
|
@ -33,7 +33,5 @@
|
|||
<Content Include="HelperFiles\sample.pdf">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Compile Include="..\STATestClassAttribute.cs" Link="STATestClassAttribute.cs" />
|
||||
<Compile Include="..\STATestMethodAttribute.cs" Link="STATestMethodAttribute.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -9,7 +9,6 @@ using System.Runtime.InteropServices;
|
|||
using System.Runtime.InteropServices.ComTypes;
|
||||
|
||||
using Common.ComInterlop;
|
||||
using Microsoft.PowerToys.STATestExtension;
|
||||
using Microsoft.PowerToys.ThumbnailHandler.Pdf;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Moq;
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
<ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" />
|
||||
<ProjectReference Include="..\PdfThumbnailProvider\PdfThumbnailProvider.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\STATestClassAttribute.cs" Link="STATestClassAttribute.cs" />
|
||||
<Compile Include="..\STATestMethodAttribute.cs" Link="STATestMethodAttribute.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="HelperFiles\sample.pdf">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
|
|
|
@ -21,10 +21,6 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="MSTest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\STATestClassAttribute.cs" Link="STATestClassAttribute.cs" />
|
||||
<Compile Include="..\STATestMethodAttribute.cs" Link="STATestMethodAttribute.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Moq" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -10,7 +10,6 @@ using System.Runtime.InteropServices.ComTypes;
|
|||
using System.Windows.Forms;
|
||||
|
||||
using Microsoft.PowerToys.PreviewHandler.Qoi;
|
||||
using Microsoft.PowerToys.STATestExtension;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Moq;
|
||||
|
||||
|
|
|
@ -31,7 +31,5 @@
|
|||
<Content Include="HelperFiles\sample.qoi">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Compile Include="..\STATestClassAttribute.cs" Link="STATestClassAttribute.cs" />
|
||||
<Compile Include="..\STATestMethodAttribute.cs" Link="STATestMethodAttribute.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
using System.Drawing;
|
||||
|
||||
using Microsoft.PowerToys.STATestExtension;
|
||||
using Microsoft.PowerToys.ThumbnailHandler.Qoi;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
<ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" />
|
||||
<ProjectReference Include="..\QoiThumbnailProvider\QoiThumbnailProvider.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\STATestClassAttribute.cs" Link="STATestClassAttribute.cs" />
|
||||
<Compile Include="..\STATestMethodAttribute.cs" Link="STATestMethodAttribute.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="HelperFiles\sample.qoi">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
using System.Drawing;
|
||||
using System.IO;
|
||||
|
||||
using Microsoft.PowerToys.STATestExtension;
|
||||
using Microsoft.PowerToys.ThumbnailHandler.Stl;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
<ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" />
|
||||
<ProjectReference Include="..\StlThumbnailProvider\StlThumbnailProvider.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\STATestClassAttribute.cs" Link="STATestClassAttribute.cs" />
|
||||
<Compile Include="..\STATestMethodAttribute.cs" Link="STATestMethodAttribute.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="HelperFiles\sample.stl">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
|
|
|
@ -9,7 +9,6 @@ using System.Threading;
|
|||
using System.Windows.Forms;
|
||||
|
||||
using Microsoft.PowerToys.PreviewHandler.Svg;
|
||||
using Microsoft.PowerToys.STATestExtension;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Microsoft.Web.WebView2.WinForms;
|
||||
using Moq;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
using System.Text;
|
||||
|
||||
using Common.Utilities;
|
||||
using Microsoft.PowerToys.STATestExtension;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace SvgPreviewHandlerUnitTests
|
||||
|
|
|
@ -30,10 +30,6 @@
|
|||
<ProjectReference Include="..\common\PreviewHandlerCommon.csproj" />
|
||||
<ProjectReference Include="..\SvgPreviewHandler\SvgPreviewHandler.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\STATestClassAttribute.cs" Link="STATestClassAttribute.cs" />
|
||||
<Compile Include="..\STATestMethodAttribute.cs" Link="STATestMethodAttribute.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="HelperFiles\file1.svg">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
|
|
|
@ -8,7 +8,6 @@ using System.Drawing.Imaging;
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
using Microsoft.PowerToys.STATestExtension;
|
||||
using Microsoft.PowerToys.ThumbnailHandler.Svg;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
|
|
@ -33,12 +33,6 @@
|
|||
<ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" />
|
||||
<ProjectReference Include="..\SvgThumbnailProvider\SvgThumbnailProvider.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\STATestClassAttribute.cs"
|
||||
Link="STATestClassAttribute.cs" />
|
||||
<Compile Include="..\STATestMethodAttribute.cs"
|
||||
Link="STATestMethodAttribute.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="HelperFiles\*.svg">
|
||||
|
|
Загрузка…
Ссылка в новой задаче