Fix Jellyfin.Networking.Tests (#10055)

pull/10060/head
Bond-009 10 months ago committed by GitHub
parent 148c86ee0d
commit d3c7af0d5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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>

@ -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? _);

Loading…
Cancel
Save