jellyfin-server/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs
2020-04-20 10:18:12 +02:00

18 lines
602 B
C#

using Emby.Server.Implementations.Library;
using Xunit;
namespace Jellyfin.Server.Implementations.Tests.Library
{
public class PathExtensionsTests
{
[Theory]
[InlineData("Superman: Red Son [imdbid=tt10985510]", "imdbid", "tt10985510")]
[InlineData("Superman: Red Son - tt10985510", "imdbid", "tt10985510")]
[InlineData("Superman: Red Son", "imdbid", null)]
public void GetAttributeValueTest(string input, string attribute, string? result)
{
Assert.Equal(result, PathExtensions.GetAttributeValue(input, attribute));
}
}
}