|
|
|
@ -14,6 +14,14 @@ namespace Jellyfin.Server.Implementations.Tests.Library
|
|
|
|
|
[InlineData("Superman: Red Son [imdbid1=tt11111111][imdbid=tt10985510]", "imdbid", "tt10985510")]
|
|
|
|
|
[InlineData("Superman: Red Son [tmdbid=618355][imdbid=tt10985510]", "imdbid", "tt10985510")]
|
|
|
|
|
[InlineData("Superman: Red Son [tmdbid=618355][imdbid=tt10985510]", "tmdbid", "618355")]
|
|
|
|
|
[InlineData("[tmdbid=618355]", "tmdbid", "618355")]
|
|
|
|
|
[InlineData("tmdbid=618355][tmdbid=618355]", "tmdbid", "618355")]
|
|
|
|
|
[InlineData("[tmdbid=618355]tmdbid=618355]", "tmdbid", "618355")]
|
|
|
|
|
[InlineData("tmdbid=618355]", "tmdbid", null)]
|
|
|
|
|
[InlineData("[tmdbid=618355", "tmdbid", null)]
|
|
|
|
|
[InlineData("tmdbid=618355", "tmdbid", null)]
|
|
|
|
|
[InlineData("tmdbid=", "tmdbid", null)]
|
|
|
|
|
[InlineData("tmdbid", "tmdbid", null)]
|
|
|
|
|
public void GetAttributeValue_ValidArgs_Correct(string input, string attribute, string? expectedResult)
|
|
|
|
|
{
|
|
|
|
|
Assert.Equal(expectedResult, PathExtensions.GetAttributeValue(input, attribute));
|
|
|
|
|