mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
Test frameworks consolidated (#12672)
This commit is contained in:
committed by
GitHub
parent
c3a51f9227
commit
e96c0da265
@@ -3,31 +3,30 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Mono.Collections.Generic;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using Wox.Infrastructure;
|
||||
using Wox.Plugin;
|
||||
|
||||
namespace Microsoft.PowerToys.Run.Plugin.System.UnitTests
|
||||
{
|
||||
[TestFixture]
|
||||
[TestClass]
|
||||
public class ImageTests
|
||||
{
|
||||
[SetUp]
|
||||
[TestInitialize]
|
||||
public void Setup()
|
||||
{
|
||||
StringMatcher.Instance = new StringMatcher();
|
||||
}
|
||||
|
||||
[TestCase("shutdown", "Images\\shutdown.dark.png")]
|
||||
[TestCase("restart", "Images\\restart.dark.png")]
|
||||
[TestCase("sign out", "Images\\logoff.dark.png")]
|
||||
[TestCase("lock", "Images\\lock.dark.png")]
|
||||
[TestCase("sleep", "Images\\sleep.dark.png")]
|
||||
[TestCase("hibernate", "Images\\sleep.dark.png")]
|
||||
[TestCase("empty recycle", "Images\\recyclebin.dark.png")]
|
||||
[DataTestMethod]
|
||||
[DataRow("shutdown", "Images\\shutdown.dark.png")]
|
||||
[DataRow("restart", "Images\\restart.dark.png")]
|
||||
[DataRow("sign out", "Images\\logoff.dark.png")]
|
||||
[DataRow("lock", "Images\\lock.dark.png")]
|
||||
[DataRow("sleep", "Images\\sleep.dark.png")]
|
||||
[DataRow("hibernate", "Images\\sleep.dark.png")]
|
||||
[DataRow("empty recycle", "Images\\recyclebin.dark.png")]
|
||||
public void IconThemeDarkTest(string typedString, string expectedResult)
|
||||
{
|
||||
// Setup
|
||||
@@ -42,13 +41,14 @@ namespace Microsoft.PowerToys.Run.Plugin.System.UnitTests
|
||||
Assert.AreEqual(expectedResult, result);
|
||||
}
|
||||
|
||||
[TestCase("shutdown", "Images\\shutdown.light.png")]
|
||||
[TestCase("restart", "Images\\restart.light.png")]
|
||||
[TestCase("sign out", "Images\\logoff.light.png")]
|
||||
[TestCase("lock", "Images\\lock.light.png")]
|
||||
[TestCase("sleep", "Images\\sleep.light.png")]
|
||||
[TestCase("hibernate", "Images\\sleep.light.png")]
|
||||
[TestCase("empty recycle", "Images\\recyclebin.light.png")]
|
||||
[DataTestMethod]
|
||||
[DataRow("shutdown", "Images\\shutdown.light.png")]
|
||||
[DataRow("restart", "Images\\restart.light.png")]
|
||||
[DataRow("sign out", "Images\\logoff.light.png")]
|
||||
[DataRow("lock", "Images\\lock.light.png")]
|
||||
[DataRow("sleep", "Images\\sleep.light.png")]
|
||||
[DataRow("hibernate", "Images\\sleep.light.png")]
|
||||
[DataRow("empty recycle", "Images\\recyclebin.light.png")]
|
||||
public void IconThemeLightTest(string typedString, string expectedResult)
|
||||
{
|
||||
// Setup
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Moq" Version="4.16.1" />
|
||||
<PackageReference Include="NUnit" Version="3.13.1" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.5" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.2.5" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
||||
@@ -3,29 +3,30 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Linq;
|
||||
using Mono.Collections.Generic;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using Wox.Infrastructure;
|
||||
using Wox.Plugin;
|
||||
|
||||
namespace Microsoft.PowerToys.Run.Plugin.System.UnitTests
|
||||
{
|
||||
[TestClass]
|
||||
public class QueryTests
|
||||
{
|
||||
[SetUp]
|
||||
[TestInitialize]
|
||||
public void Setup()
|
||||
{
|
||||
StringMatcher.Instance = new StringMatcher();
|
||||
}
|
||||
|
||||
[TestCase("shutdown", "Shutdown computer")]
|
||||
[TestCase("restart", "Restart computer")]
|
||||
[TestCase("sign out", "Sign out of computer")]
|
||||
[TestCase("lock", "Lock computer")]
|
||||
[TestCase("sleep", "Put computer to sleep")]
|
||||
[TestCase("hibernate", "Hibernate computer")]
|
||||
[TestCase("empty recycle", "Empty Recycle Bin")]
|
||||
[DataTestMethod]
|
||||
[DataRow("shutdown", "Shutdown computer")]
|
||||
[DataRow("restart", "Restart computer")]
|
||||
[DataRow("sign out", "Sign out of computer")]
|
||||
[DataRow("lock", "Lock computer")]
|
||||
[DataRow("sleep", "Put computer to sleep")]
|
||||
[DataRow("hibernate", "Hibernate computer")]
|
||||
[DataRow("empty recycle", "Empty Recycle Bin")]
|
||||
public void QueryResults(string typedString, string expectedResult)
|
||||
{
|
||||
// Setup
|
||||
|
||||
Reference in New Issue
Block a user