mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
Added NamingOptions tests
This commit is contained in:
parent
aef1fe62c2
commit
c96aa0551d
36
tests/Jellyfin.Naming.Tests/Common/NamingOptionsTest.cs
Normal file
36
tests/Jellyfin.Naming.Tests/Common/NamingOptionsTest.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user