public void when_no_file_are_imported_and_folder_size_isnt_small_enought_folder_should_be_tagged_unknown()
        {
            //Setup
            WithStrictMocker();
            WithOldWrite();
            var droppedFolder = new DirectoryInfo(@"C:\Test\Unsorted TV\The Office - Season 01");

            var taggedFolder = PostDownloadProvider.GetTaggedFolderName(droppedFolder, PostDownloadStatusType.Unknown);

            var fakeSeries = Builder <Series> .CreateNew()
                             .With(s => s.Title = "The Office")
                             .Build();

            var fakeEpisodeFiles = Builder <EpisodeFile> .CreateListOfSize(2)
                                   .All()
                                   .With(f => f.SeriesId = fakeSeries.SeriesId)
                                   .Build().ToList();

            //Act
            Mocker.GetMock <SeriesProvider>().Setup(s => s.FindSeries("office")).Returns(fakeSeries);
            Mocker.GetMock <DiskProvider>().Setup(s => s.MoveDirectory(droppedFolder.FullName, taggedFolder));
            Mocker.GetMock <DiskProvider>().Setup(s => s.GetDirectorySize(droppedFolder.FullName)).Returns(Constants.IgnoreFileSize + 10.Megabytes());
            Mocker.GetMock <DiskScanProvider>().Setup(s => s.Scan(fakeSeries, droppedFolder.FullName)).Returns(fakeEpisodeFiles);
            Mocker.GetMock <DiskScanProvider>().Setup(s => s.MoveEpisodeFile(It.IsAny <EpisodeFile>(), true)).Returns(new EpisodeFile());

            Mocker.Resolve <PostDownloadProvider>().ProcessDownload(droppedFolder);

            //Assert
            Mocker.VerifyAllMocks();
            ExceptionVerification.ExpectedWarns(1);
        }
 public void GetFolderNameWithStatus_should_throw_if_status_is_not_an_error(PostDownloadStatusType status)
 {
     PostDownloadProvider.GetTaggedFolderName(new DirectoryInfo(TempFolder), status);
 }
 public void GetFolderNameWithStatus_should_return_a_string_with_the_error_removing_existing_error(string currentName, string excpectedName, PostDownloadStatusType status)
 {
     PostDownloadProvider.GetTaggedFolderName(new DirectoryInfo(currentName), status).Should().Be(
         excpectedName);
 }