public void DualEpisodeFormatting() { // Creat the result. var result = new FileResult { Checked = true, Show = TestShows.First(), InputFile = Substitute.For <IFileInfo>() }; result.Episode = result.Show.Episodes.First(); result.Episodes = new List <Episode> { result.Episode, result.Show.Episodes[1] }; result.InputFile.Extension.Returns(".avi"); var fileResultManager = new FileResultManager(StorageProvider); // Format the string. var output = fileResultManager.FormatOutputPath(result, "{SName(.)}.S{SNum(2)}E{ENum(2)}.{EName(.)}"); Assert.AreEqual( "Alpha.Show.S01E01-02.Episode.One.(1-2)", output, "The output format does not match what it should be."); }
/// <summary> /// Sets up the tests in the fixture. /// </summary> public override void Setup() { base.Setup(); var dataProvider = Substitute.For <IDataProvider>(); var scanManager = Substitute.For <IScanManager>(); var fileResultManager = new FileResultManager(StorageProvider); fileManager = new FileManager(StorageProvider, dataProvider, scanManager, fileResultManager); }
public string TestOutputFormat(string format) { // Creat the result. var result = new FileResult { Checked = true, Show = TestShows.First(), InputFile = Substitute.For <IFileInfo>() }; result.Episode = result.Show.Episodes.First(); result.Episodes = new List <Episode> { result.Episode }; result.InputFile.Extension.Returns(".avi"); var fileResultManager = new FileResultManager(StorageProvider); // Format the string. return(fileResultManager.FormatOutputPath(result, format)); }