Adding a test without Movie CollectionThe in it

This commit is contained in:
Erik Frantz 2025-11-30 22:37:30 -06:00
parent 1bb4922e7e
commit c6159414ec

View file

@ -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);
}
}