From 4f434cad524110dc94a7bc905cf5df9c1dda2502 Mon Sep 17 00:00:00 2001 From: Aptivi Date: Wed, 11 Sep 2024 12:42:37 +0300 Subject: [PATCH] fix - Updated unit tests to fix MSTEST0018 --- We've fixed a unit test warning concerning mismatched data signatures as in: https://learn.microsoft.com/en-us/dotnet/core/testing/mstest-analyzers/mstest0018 --- Type: fix Breaking: False Doc Required: False Backport Required: False Part: 1/1 --- .../Drivers/DriverManagerTests.cs | 26 +++++++++---------- .../Network/NetworkActionTests.cs | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/private/Nitrocid.Tests/Drivers/DriverManagerTests.cs b/private/Nitrocid.Tests/Drivers/DriverManagerTests.cs index 94b502c894..5bfbb11040 100644 --- a/private/Nitrocid.Tests/Drivers/DriverManagerTests.cs +++ b/private/Nitrocid.Tests/Drivers/DriverManagerTests.cs @@ -40,7 +40,7 @@ namespace Nitrocid.Tests.Drivers public class DriverManagerTests { - private static IEnumerable ExpectedDriverNames => + public static IEnumerable ExpectedDriverNames => [ // ---------- Actual ---------- ---------- Expected ---------- [DriverTypes.Console, DriverHandler.CurrentConsoleDriver, "Default"], @@ -69,73 +69,73 @@ public class DriverManagerTests [DriverTypes.EncodingAsymmetric, DriverHandler.CurrentEncodingAsymmetricDriverLocal, "Default"], ]; - private static IEnumerable RegisteredConsoleDriver => + public static IEnumerable RegisteredConsoleDriver => [ // ---------- Provided ---------- [DriverTypes.Console, new MyCustomConsoleDriver()], ]; - private static IEnumerable RegisteredEncryptionDriver => + public static IEnumerable RegisteredEncryptionDriver => [ // ---------- Provided ---------- [DriverTypes.Encryption, new MyCustomEncryptionDriver()], ]; - private static IEnumerable RegisteredFilesystemDriver => + public static IEnumerable RegisteredFilesystemDriver => [ // ---------- Provided ---------- [DriverTypes.Filesystem, new MyCustomFilesystemDriver()], ]; - private static IEnumerable RegisteredNetworkDriver => + public static IEnumerable RegisteredNetworkDriver => [ // ---------- Provided ---------- [DriverTypes.Network, new MyCustomNetworkDriver()], ]; - private static IEnumerable RegisteredRNGDriver => + public static IEnumerable RegisteredRNGDriver => [ // ---------- Provided ---------- [DriverTypes.RNG, new MyCustomRNGDriver()], ]; - private static IEnumerable RegisteredRegexpDriver => + public static IEnumerable RegisteredRegexpDriver => [ // ---------- Provided ---------- [DriverTypes.Regexp, new MyCustomRegexpDriver()], ]; - private static IEnumerable RegisteredDebugLoggerDriver => + public static IEnumerable RegisteredDebugLoggerDriver => [ // ---------- Provided ---------- [DriverTypes.DebugLogger, new MyCustomDebugLoggerDriver()], ]; - private static IEnumerable RegisteredEncodingDriver => + public static IEnumerable RegisteredEncodingDriver => [ // ---------- Provided ---------- [DriverTypes.Encoding, new MyCustomEncodingDriver()], ]; - private static IEnumerable RegisteredHardwareProberDriver => + public static IEnumerable RegisteredHardwareProberDriver => [ // ---------- Provided ---------- [DriverTypes.HardwareProber, new MyCustomHardwareProberDriver()], ]; - private static IEnumerable RegisteredSortingDriver => + public static IEnumerable RegisteredSortingDriver => [ // ---------- Provided ---------- [DriverTypes.Sorting, new MyCustomSortingDriver()], ]; - private static IEnumerable RegisteredInputDriver => + public static IEnumerable RegisteredInputDriver => [ // ---------- Provided ---------- [DriverTypes.Input, new MyCustomInputDriver()], ]; - private static IEnumerable RegisteredEncodingAsymmetricDriver => + public static IEnumerable RegisteredEncodingAsymmetricDriver => [ // ---------- Provided ---------- [DriverTypes.EncodingAsymmetric, new MyCustomEncodingAsymmetricDriver()], diff --git a/private/Nitrocid.Tests/Network/NetworkActionTests.cs b/private/Nitrocid.Tests/Network/NetworkActionTests.cs index 679e591fb4..9fc3853601 100644 --- a/private/Nitrocid.Tests/Network/NetworkActionTests.cs +++ b/private/Nitrocid.Tests/Network/NetworkActionTests.cs @@ -33,7 +33,7 @@ namespace Nitrocid.Tests.Network public class NetworkActionTests { - private static IEnumerable<(string, string, NetworkConnectionType, object)> Connections => + public static IEnumerable<(string, string, NetworkConnectionType, object)> Connections => [ // ---------- Provided ---------- ("FTP client", "ftp.fabrikam.com", NetworkConnectionType.FTP, ConnectionThreads.ftpThread),