f8b7c62f9e
Added Jellyfin.Database.Providers.Postgres project and integrated Npgsql packages for PostgreSQL support. Updated solution and test project references. Refactored code for clarity and performance, including improved string handling, log formatting, and plugin management. Enhanced .editorconfig rules and fixed minor test issues. Added publishing profiles and updated web server setup references. Cleaned up assembly info and cache files. Now able to successfully build solution
35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
// <copyright file="SeriesResolverTests.cs" company="PlaceholderCompany">
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
// </copyright>
|
|
|
|
namespace Jellyfin.Naming.Tests.TV
|
|
{
|
|
using Emby.Naming.Common;
|
|
using Emby.Naming.TV;
|
|
using Xunit;
|
|
|
|
public class SeriesResolverTests
|
|
{
|
|
private readonly NamingOptions _namingOptions = new NamingOptions();
|
|
|
|
[Theory]
|
|
[InlineData("The.Show.S01", "The Show")]
|
|
[InlineData("The.Show.S01.COMPLETE", "The Show")]
|
|
[InlineData("S.H.O.W.S01", "S.H.O.W")]
|
|
[InlineData("The.Show.P.I.S01", "The Show P.I")]
|
|
[InlineData("The_Show_Season_1", "The Show")]
|
|
[InlineData("/something/The_Show/Season 10", "The Show")]
|
|
[InlineData("The Show", "The Show")]
|
|
[InlineData("/some/path/The Show", "The Show")]
|
|
[InlineData("/some/path/The Show s02e10 720p hdtv", "The Show")]
|
|
[InlineData("/some/path/The Show s02e10 the episode 720p hdtv", "The Show")]
|
|
[InlineData("/some/path/1923 (2022)", "1923")]
|
|
public void SeriesResolverResolveTest(string path, string name)
|
|
{
|
|
var res = SeriesResolver.Resolve(_namingOptions, path);
|
|
|
|
Assert.Equal(name, res.Name);
|
|
}
|
|
}
|
|
}
|