-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a dummy unit test to detect the game category
- Loading branch information
1 parent
67fb6b3
commit 7f85190
Showing
5 changed files
with
61 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net7.0-windows10.0.22000.0</TargetFramework> <!-- Windows 11 --> | ||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <!-- Windows 10 version 2004 (May 2020 Update) --> | ||
<PlatformTarget>x64</PlatformTarget> | ||
<Nullable>enable</Nullable> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" /> | ||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.7" /> | ||
<PackageReference Include="MSTest.TestFramework" Version="2.2.7" /> | ||
<PackageReference Include="coverlet.collector" Version="3.1.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\src\FacepunchCommitsMonitor.csproj" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace FacepunchCommitsMonitor.Tests; | ||
|
||
[TestClass] | ||
public class MonitorTests | ||
{ | ||
[TestMethod] | ||
public void SelectGameCategoryTest() | ||
{ | ||
var gmod = Monitor.SelectGameCategory("GarrysMod2"); | ||
var rust = Monitor.SelectGameCategory("Rustify"); | ||
var sbox = Monitor.SelectGameCategory("SboxUnreal"); | ||
|
||
Assert.AreEqual("Garry's Mod", gmod); | ||
Assert.AreEqual("Rust", rust); | ||
Assert.AreEqual("S&Box", sbox); | ||
} | ||
} |