diff --git a/Jellyfin.Api/Helpers/ClassMigrationHelper.cs b/Jellyfin.Api/Helpers/ClassMigrationHelper.cs index 7184d49d5b..a911a33241 100644 --- a/Jellyfin.Api/Helpers/ClassMigrationHelper.cs +++ b/Jellyfin.Api/Helpers/ClassMigrationHelper.cs @@ -1,7 +1,7 @@ using System; using System.Reflection; -namespace Jellyfin.Api.Migrations +namespace Jellyfin.Api.Helpers { /// /// A static class for copying matching properties from one object to another. diff --git a/tests/Jellyfin.Networking.Tests/NetworkTesting/UnitTesting.cs b/tests/Jellyfin.Networking.Tests/NetworkTesting/UnitTesting.cs index b5d59093fd..0bd442f0b6 100644 --- a/tests/Jellyfin.Networking.Tests/NetworkTesting/UnitTesting.cs +++ b/tests/Jellyfin.Networking.Tests/NetworkTesting/UnitTesting.cs @@ -8,13 +8,14 @@ using MediaBrowser.Common.Net; using Moq; using Microsoft.Extensions.Logging.Abstractions; using Xunit; +using System.Collections.ObjectModel; namespace Jellyfin.Networking.Tests { public class NetworkParseTests { /// - /// Trys to identify the string and return an object of that class. + /// Tries to identify the string and return an object of that class. /// /// String to parse. /// IPObject to return. @@ -121,7 +122,6 @@ namespace Jellyfin.Networking.Tests } [Theory] - // Src, IncIP6, incIP4, exIP6, ecIP4, net [InlineData("127.0.0.1#", "[]", "[]", @@ -168,10 +168,10 @@ namespace Jellyfin.Networking.Tests using var nm = new NetworkManager(GetMockConfig(conf), new NullLogger()); // Test included, IP6. - NetCollection nc = nm.CreateIPCollection(settings.Split(","), false); + Collection nc = nm.CreateIPCollection(settings.Split(","), false); Assert.True(string.Equals(nc?.AsString(), result1, System.StringComparison.OrdinalIgnoreCase)); - // Text excluded, non IP6. + // Test excluded, non IP6. nc = nm.CreateIPCollection(settings.Split(","), true); Assert.True(string.Equals(nc?.AsString(), result3, System.StringComparison.OrdinalIgnoreCase)); @@ -224,8 +224,8 @@ namespace Jellyfin.Networking.Tests using var nm = new NetworkManager(GetMockConfig(conf), new NullLogger()); - NetCollection nc1 = nm.CreateIPCollection(settings.Split(","), false); - NetCollection nc2 = nm.CreateIPCollection(compare.Split(","), false); + Collection nc1 = nm.CreateIPCollection(settings.Split(","), false); + Collection nc2 = nm.CreateIPCollection(compare.Split(","), false); Assert.True(nc1.Union(nc2).AsString() == result); } @@ -334,10 +334,10 @@ namespace Jellyfin.Networking.Tests using var nm = new NetworkManager(GetMockConfig(conf), new NullLogger()); // Test included, IP6. - NetCollection ncSource = nm.CreateIPCollection(source.Split(",")); - NetCollection ncDest = nm.CreateIPCollection(dest.Split(",")); - NetCollection ncResult = ncSource.Union(ncDest); - NetCollection resultCollection = nm.CreateIPCollection(result.Split(",")); + Collection ncSource = nm.CreateIPCollection(source.Split(",")); + Collection ncDest = nm.CreateIPCollection(dest.Split(",")); + Collection ncResult = ncSource.Union(ncDest); + Collection resultCollection = nm.CreateIPCollection(result.Split(",")); Assert.True(ncResult.Compare(resultCollection)); } @@ -401,7 +401,7 @@ namespace Jellyfin.Networking.Tests using var nm = new NetworkManager(GetMockConfig(conf), new NullLogger()); NetworkManager.MockNetworkSettings = string.Empty; - _ = nm.TryParseInterface(result, out NetCollection? resultObj); + _ = nm.TryParseInterface(result, out Collection? resultObj); if (resultObj != null) { @@ -468,7 +468,7 @@ namespace Jellyfin.Networking.Tests using var nm = new NetworkManager(GetMockConfig(conf), new NullLogger()); NetworkManager.MockNetworkSettings = string.Empty; - if (nm.TryParseInterface(result, out NetCollection? resultObj) && resultObj != null) + if (nm.TryParseInterface(result, out Collection? resultObj) && resultObj != null) { // Parse out IPAddresses so we can do a string comparison. (Ignore subnet masks). result = ((IPNetAddress)resultObj[0]).ToString(true);