mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 14:28:46 +01:00
Enable nullable in Emby.Naming
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Emby.Naming.AudioBook;
|
||||
using Emby.Naming.AudioBook;
|
||||
using Xunit;
|
||||
|
||||
namespace Jellyfin.Naming.Tests.AudioBook
|
||||
@@ -8,22 +8,22 @@ namespace Jellyfin.Naming.Tests.AudioBook
|
||||
[Fact]
|
||||
public void CompareTo_Same_Success()
|
||||
{
|
||||
var info = new AudioBookFileInfo();
|
||||
var info = new AudioBookFileInfo(string.Empty, string.Empty);
|
||||
Assert.Equal(0, info.CompareTo(info));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CompareTo_Null_Success()
|
||||
{
|
||||
var info = new AudioBookFileInfo();
|
||||
var info = new AudioBookFileInfo(string.Empty, string.Empty);
|
||||
Assert.Equal(1, info.CompareTo(null));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CompareTo_Empty_Success()
|
||||
{
|
||||
var info1 = new AudioBookFileInfo();
|
||||
var info2 = new AudioBookFileInfo();
|
||||
var info1 = new AudioBookFileInfo(string.Empty, string.Empty);
|
||||
var info2 = new AudioBookFileInfo(string.Empty, string.Empty);
|
||||
Assert.Equal(0, info1.CompareTo(info2));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Emby.Naming.AudioBook;
|
||||
using Emby.Naming.Common;
|
||||
@@ -14,30 +14,24 @@ namespace Jellyfin.Naming.Tests.AudioBook
|
||||
{
|
||||
yield return new object[]
|
||||
{
|
||||
new AudioBookFileInfo()
|
||||
{
|
||||
Path = @"/server/AudioBooks/Larry Potter/Larry Potter.mp3",
|
||||
Container = "mp3",
|
||||
}
|
||||
new AudioBookFileInfo(
|
||||
@"/server/AudioBooks/Larry Potter/Larry Potter.mp3",
|
||||
"mp3")
|
||||
};
|
||||
yield return new object[]
|
||||
{
|
||||
new AudioBookFileInfo()
|
||||
{
|
||||
Path = @"/server/AudioBooks/Berry Potter/Chapter 1 .ogg",
|
||||
Container = "ogg",
|
||||
ChapterNumber = 1
|
||||
}
|
||||
new AudioBookFileInfo(
|
||||
@"/server/AudioBooks/Berry Potter/Chapter 1 .ogg",
|
||||
"ogg",
|
||||
chapterNumber: 1)
|
||||
};
|
||||
yield return new object[]
|
||||
{
|
||||
new AudioBookFileInfo()
|
||||
{
|
||||
Path = @"/server/AudioBooks/Nerry Potter/Part 3 - Chapter 2.mp3",
|
||||
Container = "mp3",
|
||||
ChapterNumber = 2,
|
||||
PartNumber = 3
|
||||
}
|
||||
new AudioBookFileInfo(
|
||||
@"/server/AudioBooks/Nerry Potter/Part 3 - Chapter 2.mp3",
|
||||
"mp3",
|
||||
chapterNumber: 2,
|
||||
partNumber: 3)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user