Skip to content

Commit

Permalink
imp - Updated theme unit test
Browse files Browse the repository at this point in the history
---

The theme unit test now no longer has to handle special cases related to naming.

---

Type: imp
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Apr 29, 2024
1 parent 1524e0a commit 902f7e5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
15 changes: 2 additions & 13 deletions private/Nitrocid.Tests/ConsoleBase/ThemeInfoInitializationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,10 @@ public void TestInitializeThemeInfoFromResources()
public void TestGetThemeInfoFromAllResources()
{
var installedThemes = ThemeTools.GetInstalledThemes();
foreach (string ResourceName in ThemeTools.GetInstalledThemes().Keys)
foreach (string themeName in ThemeTools.GetInstalledThemes().Keys)
{
// Special naming cases
string ThemeName = ResourceName.Replace(" ", "_");
switch (ResourceName)
{
case "3Y-Diamond":
{
ThemeName = "_3Y_Diamond";
break;
}
}

// Create instance
var ThemeInfoInstance = installedThemes[ThemeName];
var ThemeInfoInstance = installedThemes[themeName];

// Check for null
ThemeInfoInstance.ThemeColors.ShouldNotBeNull();
Expand Down
9 changes: 9 additions & 0 deletions private/Nitrocid.Tests/Nitrocid.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,13 @@
<Target Name="CopyAddon" AfterTargets="Compile">
<Copy SourceFiles="@(AddonsFolders)" DestinationFiles="@(AddonsFolders->'KSTest\$(TargetFramework)\Addons\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>

<Target Name="WipeBuild" AfterTargets="Clean">
<ItemGroup>
<BuildDirs Include="KSTest\**\*" />
</ItemGroup>
<Message Importance="high" Text="N: Removing whole KSTest directory..." />
<Delete Files="@(BuildDirs)" />
<RemoveDir Directories="KSTest\" />
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<!-- ScreensaverPacks addon General Information -->
<PropertyGroup>
Expand Down

0 comments on commit 902f7e5

Please sign in to comment.