mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 02:18:54 -07:00
37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
using Emby.Naming.Common;
|
|
using Xunit;
|
|
|
|
namespace Jellyfin.Naming.Tests.Common
|
|
{
|
|
public class NamingOptionsTest
|
|
{
|
|
[Fact]
|
|
public void TestNamingOptionsCompile()
|
|
{
|
|
var options = new NamingOptions();
|
|
|
|
Assert.NotEmpty(options.VideoFileStackingRegexes);
|
|
Assert.NotEmpty(options.CleanDateTimeRegexes);
|
|
Assert.NotEmpty(options.CleanStringRegexes);
|
|
Assert.NotEmpty(options.EpisodeWithoutSeasonRegexes);
|
|
Assert.NotEmpty(options.EpisodeMultiPartRegexes);
|
|
}
|
|
|
|
[Fact]
|
|
public void TestNamingOptionsEpisodeExpressions()
|
|
{
|
|
var exp = new EpisodeExpression(string.Empty);
|
|
|
|
Assert.False(exp.IsOptimistic);
|
|
exp.IsOptimistic = true;
|
|
Assert.True(exp.IsOptimistic);
|
|
|
|
Assert.Equal(string.Empty, exp.Expression);
|
|
Assert.NotNull(exp.Regex);
|
|
exp.Expression = "test";
|
|
Assert.Equal("test", exp.Expression);
|
|
Assert.NotNull(exp.Regex);
|
|
}
|
|
}
|
|
}
|