Skip to content

Commit

Permalink
fix - Fixed unit test failures
Browse files Browse the repository at this point in the history
---

We've fixed unit test failures caused by the recent update of Terminaux.

---

Type: fix
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Feb 1, 2024
1 parent 721d154 commit cfcc406
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion private/Nitrocid.Tests/ConsoleBase/ColorQueryingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void TestGetRandomColor()
var type = (ColorType)Enum.Parse(typeof(ColorType), typeName);
Should.NotThrow(() => color = ColorTools.GetRandomColor(type));
type = color.PlainSequence.Contains(';') ?
ColorType.TrueColor : color.ColorEnum255 != (ConsoleColors)(-1) ?
ColorType.TrueColor : color.ColorId.ColorId >= 16 ?
ColorType._255Color : ColorType._16Color;
color.ShouldNotBeNull();
color.Type.ShouldBe(type);
Expand Down
24 changes: 12 additions & 12 deletions private/Nitrocid.Tests/Network/NetworkActionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ public void TestGetNetworkConnections(NetworkConnectionType type)
/// Tests getting network connections
/// </summary>
[TestMethod]
[DataRow(NetworkConnectionType.FTP, 0)]
[DataRow(NetworkConnectionType.HTTP, 1)]
[DataRow(NetworkConnectionType.Mail, 2)]
[DataRow(NetworkConnectionType.RSS, 3)]
[DataRow(NetworkConnectionType.SFTP, 4)]
[DataRow(NetworkConnectionType.SSH, 5)]
[DataRow(NetworkConnectionType.FTP, 1)]
[DataRow(NetworkConnectionType.HTTP, 3)]
[DataRow(NetworkConnectionType.Mail, 0)]
[DataRow(NetworkConnectionType.RSS, 2)]
[DataRow(NetworkConnectionType.SFTP, 5)]
[DataRow(NetworkConnectionType.SSH, 4)]
[Description("Action")]
public void TestGetConnectionIndex(NetworkConnectionType type, int expectedIdx)
{
Expand Down Expand Up @@ -153,12 +153,12 @@ public void TestGetConnectionIndexSpecific(NetworkConnectionType type)
/// Tests getting network connections
/// </summary>
[TestMethod]
[DataRow(NetworkConnectionType.FTP, 0)]
[DataRow(NetworkConnectionType.HTTP, 1)]
[DataRow(NetworkConnectionType.Mail, 2)]
[DataRow(NetworkConnectionType.RSS, 3)]
[DataRow(NetworkConnectionType.SFTP, 4)]
[DataRow(NetworkConnectionType.SSH, 5)]
[DataRow(NetworkConnectionType.FTP, 1)]
[DataRow(NetworkConnectionType.HTTP, 3)]
[DataRow(NetworkConnectionType.Mail, 0)]
[DataRow(NetworkConnectionType.RSS, 2)]
[DataRow(NetworkConnectionType.SFTP, 5)]
[DataRow(NetworkConnectionType.SSH, 4)]
[Description("Action")]
public void TestGetConnectionFromIndex(NetworkConnectionType type, int expectedIdx)
{
Expand Down
4 changes: 2 additions & 2 deletions private/Nitrocid.Tests/Shell/Prompts/PresetTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class PresetTests
public void TestSetPresetDry(string presetName, ShellType type, string expected)
{
PromptPresetManager.SetPreset(presetName, type);
string baseName = PromptPresetManager.GetCurrentPresetBaseFromShell(presetName).PresetName;
string baseName = PromptPresetManager.GetCurrentPresetBaseFromShell(type).PresetName;
baseName.ShouldBe(expected);
}

Expand All @@ -57,7 +57,7 @@ public void TestSetPresetDry(string presetName, ShellType type, string expected)
public void TestSetPresetDry(string presetName, string type, string expected)
{
PromptPresetManager.SetPreset(presetName, type);
string baseName = PromptPresetManager.GetCurrentPresetBaseFromShell(presetName).PresetName;
string baseName = PromptPresetManager.GetCurrentPresetBaseFromShell(type).PresetName;
baseName.ShouldBe(expected);
}

Expand Down

0 comments on commit cfcc406

Please sign in to comment.