mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-24 02:02:29 -04:00
* a * acceleration * addition * altogether * api clients * artist * associated * bandwidth * cannot * capabilities * case-insensitive * case-sensitive * configuration * delimiter * dependent * diacritics * directors * enable * explicitly * filters * finish * have * hierarchy * implicit * include * information * into * its * keepalive * localization * macos * manual * matching * metadata * nonexistent * options * overridden * parsed * parser * playback * preferring * processes * processing * provider * ratings * retrieval * running * segments * separate * should * station * subdirectories * superseded * supported * system * than * the * throws * transpose * valid * was link: forum or chat rooms Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
32 lines
1021 B
C#
32 lines
1021 B
C#
using Emby.Naming.TV;
|
|
using MediaBrowser.Model.Entities;
|
|
using Xunit;
|
|
|
|
namespace Jellyfin.Naming.Tests.TV;
|
|
|
|
public class TvParserHelpersTest
|
|
{
|
|
[Theory]
|
|
[InlineData("Ended", SeriesStatus.Ended)]
|
|
[InlineData("Cancelled", SeriesStatus.Ended)]
|
|
[InlineData("Continuing", SeriesStatus.Continuing)]
|
|
[InlineData("Returning", SeriesStatus.Continuing)]
|
|
[InlineData("Returning Series", SeriesStatus.Continuing)]
|
|
[InlineData("Unreleased", SeriesStatus.Unreleased)]
|
|
public void SeriesStatusParserTest_Valid(string statusString, SeriesStatus? status)
|
|
{
|
|
var successful = TvParserHelpers.TryParseSeriesStatus(statusString, out var parsed);
|
|
Assert.True(successful);
|
|
Assert.Equal(status, parsed);
|
|
}
|
|
|
|
[Theory]
|
|
[InlineData("XXX")]
|
|
public void SeriesStatusParserTest_InValid(string statusString)
|
|
{
|
|
var successful = TvParserHelpers.TryParseSeriesStatus(statusString, out var parsed);
|
|
Assert.False(successful);
|
|
Assert.Null(parsed);
|
|
}
|
|
}
|