mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 10:04:44 +01:00
@@ -0,0 +1,30 @@
|
||||
using Emby.Naming.AudioBook;
|
||||
using Xunit;
|
||||
|
||||
namespace Jellyfin.Naming.Tests.AudioBook
|
||||
{
|
||||
public class AudioBookFileInfoTests
|
||||
{
|
||||
[Fact]
|
||||
public void CompareTo_Same_Success()
|
||||
{
|
||||
var info = new AudioBookFileInfo();
|
||||
Assert.Equal(0, info.CompareTo(info));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CompareTo_Null_Success()
|
||||
{
|
||||
var info = new AudioBookFileInfo();
|
||||
Assert.Equal(1, info.CompareTo(null));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CompareTo_Empty_Success()
|
||||
{
|
||||
var info1 = new AudioBookFileInfo();
|
||||
var info2 = new AudioBookFileInfo();
|
||||
Assert.Equal(0, info1.CompareTo(info2));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,14 +44,14 @@ namespace Jellyfin.Naming.Tests.Video
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(ExtraType.BehindTheScenes, "behind the scenes" )]
|
||||
[InlineData(ExtraType.DeletedScene, "deleted scenes" )]
|
||||
[InlineData(ExtraType.Interview, "interviews" )]
|
||||
[InlineData(ExtraType.Scene, "scenes" )]
|
||||
[InlineData(ExtraType.Sample, "samples" )]
|
||||
[InlineData(ExtraType.Clip, "shorts" )]
|
||||
[InlineData(ExtraType.Clip, "featurettes" )]
|
||||
[InlineData(ExtraType.Unknown, "extras" )]
|
||||
[InlineData(ExtraType.BehindTheScenes, "behind the scenes")]
|
||||
[InlineData(ExtraType.DeletedScene, "deleted scenes")]
|
||||
[InlineData(ExtraType.Interview, "interviews")]
|
||||
[InlineData(ExtraType.Scene, "scenes")]
|
||||
[InlineData(ExtraType.Sample, "samples")]
|
||||
[InlineData(ExtraType.Clip, "shorts")]
|
||||
[InlineData(ExtraType.Clip, "featurettes")]
|
||||
[InlineData(ExtraType.Unknown, "extras")]
|
||||
public void TestDirectories(ExtraType type, string dirName)
|
||||
{
|
||||
Test(dirName + "/300.mp4", type, _videoOptions);
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace Jellyfin.Server.Implementations.Tests.Library
|
||||
[InlineData("Superman: Red Son [imdbid=tt10985510]", "imdbid", "tt10985510")]
|
||||
[InlineData("Superman: Red Son - tt10985510", "imdbid", "tt10985510")]
|
||||
[InlineData("Superman: Red Son", "imdbid", null)]
|
||||
[InlineData("Superman: Red Son", "something", null)]
|
||||
public void GetAttributeValue_ValidArgs_Correct(string input, string attribute, string? expectedResult)
|
||||
{
|
||||
Assert.Equal(expectedResult, PathExtensions.GetAttributeValue(input, attribute));
|
||||
|
||||
Reference in New Issue
Block a user