Skip to content

Commit

Permalink
fix - Fixed test failures to fix some bugs
Browse files Browse the repository at this point in the history
---

We've fixed some bugs by fixing test failures that came in the way.

---

Type: fix
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Aug 23, 2024
1 parent 8d90fa7 commit 25ca9f8
Show file tree
Hide file tree
Showing 14 changed files with 60 additions and 755 deletions.
4 changes: 2 additions & 2 deletions KSTests/Console/ColorInitializationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void TestInitializeColorInstanceFrom255Colors()
ColorInstance.RGB.R.ShouldBe(0);
ColorInstance.RGB.G.ShouldBe(0);
ColorInstance.RGB.B.ShouldBe(135);
ColorInstance.Brightness.ShouldBe(ColorBrightness.Light);
ColorInstance.Brightness.ShouldBe(ColorBrightness.Dark);
ColorInstance.Hex.ShouldBe("#000087");
}

Expand Down Expand Up @@ -82,7 +82,7 @@ public void TestInitializeColorInstanceFromTrueColor()
ColorInstance.RGB.R.ShouldBe(94);
ColorInstance.RGB.G.ShouldBe(0);
ColorInstance.RGB.B.ShouldBe(63);
ColorInstance.Brightness.ShouldBe(ColorBrightness.Light);
ColorInstance.Brightness.ShouldBe(ColorBrightness.Dark);
ColorInstance.Hex.ShouldBe("#5E003F");
}

Expand Down
4 changes: 2 additions & 2 deletions KSTests/Console/ColorQueryingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public bool TestTryParseColorFromHex(string TargetHex)
/// Tests trying to parse the color from color numbers
/// </summary>
[TestCase(26, ExpectedResult = true)]
[TestCase(260, ExpectedResult = false)]
[TestCase(260, ExpectedResult = true)]
[TestCase(-26, ExpectedResult = false)]
[Description("Querying")]
public bool TestTryParseColorFromColorNum(int TargetColorNum)
Expand Down Expand Up @@ -113,4 +113,4 @@ public void TestConvertFromRGBNumbersToHex()
}

}
}
}
21 changes: 2 additions & 19 deletions KSTests/Console/ThemeInfoInitializationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,8 @@ public void TestInitializeThemeInfoFromAllResources()
{
foreach (string ResourceName in ThemeTools.Themes.Keys)
{

// Special naming cases
string ThemeName = ResourceName.Replace("-", "_").Replace(" ", "_");
switch (ResourceName ?? "")
{
case "Default":
{
ThemeName = "_Default";
break;
}
case "3Y-Diamond":
{
ThemeName = "_3Y_Diamond";
break;
}
}

// Create instance
var ThemeInfoInstance = new ThemeInfo(ThemeName);
var ThemeInfoInstance = new ThemeInfo(ResourceName);

// Check for null
ThemeInfoInstance.ThemeBackgroundColor.ShouldNotBeNull();
Expand Down Expand Up @@ -202,4 +185,4 @@ public void TestInitializeThemeInfoFromFile()
}

}
}
}
Loading

0 comments on commit 25ca9f8

Please sign in to comment.