You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1004 B
36 lines
1004 B
4 years ago
|
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.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);
|
||
|
}
|
||
|
}
|
||
|
}
|