mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
more rss refactoring
This commit is contained in:
parent
d7732cab3b
commit
11e2b63b60
10 changed files with 49 additions and 146 deletions
|
@ -71,7 +71,7 @@ namespace NzbDrone.Core.Test
|
|||
//Currently can't verify this since the list of episodes are loaded
|
||||
//Dynamically by SubSonic
|
||||
//Assert.AreEqual(fakeEpisode, result.Episodes[0]);
|
||||
|
||||
|
||||
Assert.AreEqual(fakeEpisode.SeriesId, result.SeriesId);
|
||||
Assert.AreEqual(QualityTypes.BDRip, result.Quality);
|
||||
Assert.AreEqual(Parser.NormalizePath(fileName), result.Path);
|
||||
|
@ -163,34 +163,6 @@ namespace NzbDrone.Core.Test
|
|||
}
|
||||
|
||||
|
||||
[Test]
|
||||
[Row("Season {season}\\S{season:00}E{episode:00} - {title} - {quality}", "Season 6\\S06E08 - Lethal Inspection - hdtv")]
|
||||
[Row("Season {season}\\{series} - {season:##}{episode:00} - {title} - {quality}", "Season 6\\Futurama - 608 - Lethal Inspection - hdtv")]
|
||||
[Row("Season {season}\\{series} - {season:##}{episode:00} - {title}", "Season 6\\Futurama - 608 - Lethal Inspection")]
|
||||
public void test_file_path_generation(string patern, string path)
|
||||
{
|
||||
var fakeConfig = new Mock<IConfigProvider>();
|
||||
fakeConfig.Setup(c => c.EpisodeNameFormat).Returns(patern);
|
||||
|
||||
var kernel = new MockingKernel();
|
||||
kernel.Bind<IConfigProvider>().ToConstant(fakeConfig.Object);
|
||||
kernel.Bind<IMediaFileProvider>().To<MediaFileProvider>();
|
||||
|
||||
var fakeEpisode = new EpisodeModel
|
||||
{
|
||||
SeasonNumber = 6,
|
||||
EpisodeNumber = 8,
|
||||
EpisodeTitle = "Lethal Inspection",
|
||||
Quality = QualityTypes.HDTV,
|
||||
SeriesTitle = "Futurama"
|
||||
};
|
||||
|
||||
//Act
|
||||
var result = kernel.Get<IMediaFileProvider>().GenerateEpisodePath(fakeEpisode);
|
||||
|
||||
//Assert
|
||||
Assert.AreEqual(path.ToLowerInvariant(), result.ToLowerInvariant());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue