浏览代码

Fix Jellyfin.Networking.Tests (#10055)

Bond-009 1 年之前
父节点
当前提交
d3c7af0d5c

+ 1 - 6
tests/Jellyfin.Networking.Tests/Jellyfin.Networking.Tests.csproj

@@ -18,12 +18,7 @@
   </ItemGroup>
 
   <ItemGroup>
-    <ProjectReference Include="../../Emby.Server.Implementations/Emby.Server.Implementations.csproj" />
-    <ProjectReference Include="../../MediaBrowser.Common/MediaBrowser.Common.csproj" />
+    <ProjectReference Include="../../Jellyfin.Networking/Jellyfin.Networking.csproj" />
   </ItemGroup>
 
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
-    <DefineConstants>DEBUG</DefineConstants>
-  </PropertyGroup>
-
 </Project>

+ 3 - 3
tests/Jellyfin.Networking.Tests/NetworkParseTests.cs

@@ -97,7 +97,7 @@ namespace Jellyfin.Networking.Tests
         /// Checks if IPv4 address is within a defined subnet.
         /// </summary>
         /// <param name="netMask">Network mask.</param>
-        /// <param name="IPAddress">IP Address.</param>
+        /// <param name="ipAddress">IP Address.</param>
         [Theory]
         [InlineData("192.168.5.85/24", "192.168.5.1")]
         [InlineData("192.168.5.85/24", "192.168.5.254")]
@@ -211,7 +211,7 @@ namespace Jellyfin.Networking.Tests
 
             if (nm.TryParseInterface(result, out var resultObj))
             {
-                result = resultObj.First().Address.ToString();
+                result = resultObj[0].Address.ToString();
                 var intf = nm.GetBindAddress(source, out _);
 
                 Assert.Equal(intf, result);
@@ -270,7 +270,7 @@ namespace Jellyfin.Networking.Tests
             if (nm.TryParseInterface(result, out IReadOnlyList<IPData>? resultObj) && resultObj is not null)
             {
                 // Parse out IPAddresses so we can do a string comparison (ignore subnet masks).
-                result = resultObj.First().Address.ToString();
+                result = resultObj[0].Address.ToString();
             }
 
             var intf = nm.GetBindAddress(source, out int? _);