mirror of
https://github.com/Radarr/Radarr
synced 2025-12-23 16:56:36 +01:00
Adding a test without Movie CollectionThe in it
This commit is contained in:
parent
1bb4922e7e
commit
c6159414ec
1 changed files with 4 additions and 1 deletions
|
|
@ -36,6 +36,7 @@ public void should_use_movieFolderFormat_to_build_folder_name(string movieTitle,
|
|||
|
||||
[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)")]
|
||||
[TestCase("A Decade of Changes", "The First Year", 1980, "{Movie CollectionThe}/{Movie TitleThe} ({Release Year})", "Decade of Changes, A", "First Year, The (1980)")]
|
||||
[TestCase(null, "Just a Movie", 1999, "{Movie Title} ({Release Year})", null, "Just a Movie (1999)")]
|
||||
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;
|
||||
|
|
@ -51,7 +52,9 @@ public void should_use_movieFolderFormat_and_CollectionFormat_to_build_folder_na
|
|||
};
|
||||
|
||||
var result = Subject.GetMovieFolder(movie);
|
||||
var expected = Path.Combine(expectedCollection, expectedTitle);
|
||||
var expected = !string.IsNullOrWhiteSpace(expectedCollection)
|
||||
? Path.Combine(expectedCollection, expectedTitle)
|
||||
: expectedTitle;
|
||||
result.Should().Be(expected);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue