mirror of
https://github.com/Radarr/Radarr
synced 2025-12-06 08:28:50 +01:00
Add in test for GetMovieFolderFixture
This commit is contained in:
parent
235699070e
commit
6d8b9fc112
1 changed files with 21 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using System.IO;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Movies;
|
||||
|
|
@ -32,5 +33,25 @@ public void should_use_movieFolderFormat_to_build_folder_name(string movieTitle,
|
|||
|
||||
Subject.GetMovieFolder(movie).Should().Be(expected);
|
||||
}
|
||||
|
||||
[TestCase("The Y-Women Collection", "The Y-Women 14", 2005, "{Movie CollectionThe}/{Movie TitleThe} ({Release Year})", "Y-Women Collection, The", "Y-Women 14, The (2005)")]
|
||||
public void should_use_movieFolderFormat_and_CollectionFormat_to_build_folder_name(string collectionTitle, string movieTitle, int year, string format, string expectedCollection, string expectedTitle)
|
||||
{
|
||||
_namingConfig.MovieFolderFormat = format;
|
||||
|
||||
var movie = new Movie
|
||||
{
|
||||
MovieMetadata = new MovieMetadata
|
||||
{
|
||||
CollectionTitle = collectionTitle,
|
||||
Title = movieTitle,
|
||||
Year = year,
|
||||
},
|
||||
};
|
||||
|
||||
var result = Subject.GetMovieFolder(movie);
|
||||
var expected = Path.Combine(expectedCollection, expectedTitle);
|
||||
result.Should().Be(expected);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue