af1152b001
Refactored all C# test files to use explicit namespace declarations and moved all using directives inside the namespace block for consistency. Updated assembly info and cache files to reflect the new build. Adjusted MvcTestingAppManifest.json to use fully qualified assembly names. No functional changes; all updates are related to code style, organization, and project metadata.
39 lines
1.7 KiB
C#
39 lines
1.7 KiB
C#
// <copyright file="EpisodeNumberWithoutSeasonTests.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 EpisodeNumberWithoutSeasonTests
|
|
{
|
|
private readonly EpisodeResolver _resolver = new EpisodeResolver(new NamingOptions());
|
|
|
|
[Theory]
|
|
[InlineData(8, "The Simpsons/The Simpsons.S25E08.Steal this episode.mp4")]
|
|
[InlineData(2, "The Simpsons/The Simpsons - 02 - Ep Name.avi")]
|
|
[InlineData(2, "The Simpsons/02.avi")]
|
|
[InlineData(2, "The Simpsons/02 - Ep Name.avi")]
|
|
[InlineData(2, "The Simpsons/02-Ep Name.avi")]
|
|
[InlineData(2, "The Simpsons/02.EpName.avi")]
|
|
[InlineData(2, "The Simpsons/The Simpsons - 02.avi")]
|
|
[InlineData(2, "The Simpsons/The Simpsons - 02 Ep Name.avi")]
|
|
[InlineData(7, "GJ Club (2013)/GJ Club - 07.mkv")]
|
|
[InlineData(17, "Case Closed (1996-2007)/Case Closed - 317.mkv")]
|
|
// TODO: [InlineData(2, @"The Simpsons/The Simpsons 5 - 02 - Ep Name.avi")]
|
|
// TODO: [InlineData(2, @"The Simpsons/The Simpsons 5 - 02 Ep Name.avi")]
|
|
// TODO: [InlineData(7, @"Seinfeld/Seinfeld 0807 The Checks.avi")]
|
|
// This is not supported anymore after removing the episode number 365+ hack from EpisodePathParser
|
|
// TODO: [InlineData(13, @"Case Closed (1996-2007)/Case Closed - 13.mkv")]
|
|
public void GetEpisodeNumberFromFileTest(int episodeNumber, string path)
|
|
{
|
|
var result = _resolver.Resolve(path, false);
|
|
|
|
Assert.Equal(episodeNumber, result?.EpisodeNumber);
|
|
}
|
|
}
|
|
}
|