mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
Test frameworks consolidated (#12672)
This commit is contained in:
committed by
GitHub
parent
c3a51f9227
commit
e96c0da265
@@ -3,25 +3,25 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.Plugin.Program.ProgramArgumentParser;
|
||||
using Mono.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Wox.Plugin;
|
||||
|
||||
namespace Microsoft.Plugin.Program.UnitTests.ProgramArgumentParser
|
||||
{
|
||||
[TestFixture]
|
||||
[TestClass]
|
||||
public class ProgramArgumentParserTests
|
||||
{
|
||||
[TestCase("Microsoft Edge", "Microsoft Edge", null)]
|
||||
[TestCase("Microsoft Edge ---inprivate", "Microsoft Edge ---inprivate", null)]
|
||||
[TestCase("Microsoft Edge -- -inprivate", "Microsoft Edge", "-inprivate")]
|
||||
[TestCase("Microsoft Edge -inprivate", "Microsoft Edge", "-inprivate")]
|
||||
[TestCase("Microsoft Edge /inprivate", "Microsoft Edge", "/inprivate")]
|
||||
[TestCase("edge.exe --inprivate", "edge.exe", "--inprivate")]
|
||||
[TestCase("edge.exe -- --inprivate", "edge.exe", "--inprivate")]
|
||||
[TestCase("edge.exe", "edge.exe", null)]
|
||||
[TestCase("edge", "edge", null)]
|
||||
[TestCase("cmd /c \"ping 1.1.1.1\"", "cmd", "/c \"ping 1.1.1.1\"")]
|
||||
[DataTestMethod]
|
||||
[DataRow("Microsoft Edge", "Microsoft Edge", null)]
|
||||
[DataRow("Microsoft Edge ---inprivate", "Microsoft Edge ---inprivate", null)]
|
||||
[DataRow("Microsoft Edge -- -inprivate", "Microsoft Edge", "-inprivate")]
|
||||
[DataRow("Microsoft Edge -inprivate", "Microsoft Edge", "-inprivate")]
|
||||
[DataRow("Microsoft Edge /inprivate", "Microsoft Edge", "/inprivate")]
|
||||
[DataRow("edge.exe --inprivate", "edge.exe", "--inprivate")]
|
||||
[DataRow("edge.exe -- --inprivate", "edge.exe", "--inprivate")]
|
||||
[DataRow("edge.exe", "edge.exe", null)]
|
||||
[DataRow("edge", "edge", null)]
|
||||
[DataRow("cmd /c \"ping 1.1.1.1\"", "cmd", "/c \"ping 1.1.1.1\"")]
|
||||
public void ProgramArgumentParserTestsCanParseQuery(string inputQuery, string expectedProgram, string expectedProgramArguments)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
Reference in New Issue
Block a user