Skip to content

Commit c65db2e

Browse files
committed
TESTS: Added bare bones unit test package
1 parent a917885 commit c65db2e

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net9.0-windows10.0.22621.0</TargetFramework>
5+
<Platforms>x64;ARM64</Platforms>
6+
<PlatformTarget>$(Platform)</PlatformTarget>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="MSTest" Version="3.6.3" />
11+
<PackageReference Include="System.IO.Abstractions" Version="21.0.29" />
12+
</ItemGroup>
13+
14+
<ItemGroup>
15+
<ProjectReference Include="..\Community.PowerToys.Run.Plugin.RandomPicker\Community.PowerToys.Run.Plugin.RandomPicker.csproj" />
16+
</ItemGroup>
17+
18+
</Project>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using Microsoft.VisualStudio.TestTools.UnitTesting;
2+
using System.Linq;
3+
using Wox.Plugin;
4+
5+
namespace Community.PowerToys.Run.Plugin.RandomPicker.UnitTests {
6+
[TestClass]
7+
public class MainTests {
8+
private Main main;
9+
10+
[TestInitialize]
11+
public void TestInitialize() {
12+
main = new Main();
13+
}
14+
15+
// [TestMethod]
16+
// public void Query_should_return_results()
17+
// {
18+
// var results = main.Query(new("search"));
19+
20+
// Assert.IsNotNull(results.First());
21+
// }
22+
23+
// [TestMethod]
24+
// public void LoadContextMenus_should_return_results()
25+
// {
26+
// var results = main.LoadContextMenus(new Result { ContextData = "search" });
27+
28+
// Assert.IsNotNull(results.First());
29+
// }
30+
}
31+
}

0 commit comments

Comments
 (0)