jellyfin/tests/Jellyfin.Naming.Tests/Common/NamingOptionsTest.cs
2023-02-17 15:00:06 +01:00

34 lines
876 B
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.CleanDateTimeRegexes);
Assert.NotEmpty(options.CleanStringRegexes);
}
[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);
}
}
}