mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-25 22:36:59 -04:00
New: Series Folder format now configurable (used when adding series only)
This commit is contained in:
@@ -176,6 +176,7 @@
|
||||
<Compile Include="NotificationTests\Xbmc\Json\UpdateFixture.cs" />
|
||||
<Compile Include="NotificationTests\Xbmc\OnDownloadFixture.cs" />
|
||||
<Compile Include="OrganizerTests\BuildFilePathFixture.cs" />
|
||||
<Compile Include="OrganizerTests\GetSeriesFolderFixture.cs" />
|
||||
<Compile Include="ParserTests\ParsingServiceTests\GetEpisodesFixture.cs" />
|
||||
<Compile Include="ParserTests\ParsingServiceTests\GetSeriesFixture.cs" />
|
||||
<Compile Include="ParserTests\ParsingServiceTests\MapFixture.cs" />
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Organizer;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Test.OrganizerTests
|
||||
{
|
||||
[TestFixture]
|
||||
|
||||
public class GetSeriesFolderFixture : CoreTest<FileNameBuilder>
|
||||
{
|
||||
private NamingConfig namingConfig;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
namingConfig = new NamingConfig();
|
||||
|
||||
Mocker.GetMock<INamingConfigService>()
|
||||
.Setup(c => c.GetConfig()).Returns(namingConfig);
|
||||
}
|
||||
|
||||
[TestCase("30 Rock", "{Series Title}", "30 Rock")]
|
||||
[TestCase("30 Rock", "{Series.Title}", "30.Rock")]
|
||||
[TestCase("24/7 Road to the NHL Winter Classic", "{Series Title}", "24+7 Road to the NHL Winter Classic")]
|
||||
public void should_use_seriesFolderFormat_to_build_folder_name(string seriesTitle, string format, string expected)
|
||||
{
|
||||
namingConfig.SeriesFolderFormat = format;
|
||||
|
||||
Subject.GetSeriesFolder(seriesTitle).Should().Be(expected);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user