示例#1
0
        public void should_return_mapping_error_on_movie_import_failed_event_for_remote_client_if_folder_does_not_exist()
        {
            _clientStatus.IsLocalhost = false;
            var importEvent = new MovieImportFailedEvent(null, null, true, _downloadItem);

            Subject.Check(importEvent).ShouldBeError(wikiFragment: "bad-remote-path-mapping");
        }
示例#2
0
        public void should_return_download_client_error_on_movie_import_failed_event_for_remote_client_if_path_invalid()
        {
            _clientStatus.IsLocalhost = true;
            _downloadItem.OutputPath  = new OsPath("an invalid path");
            var importEvent = new MovieImportFailedEvent(null, null, true, _downloadItem);

            Subject.Check(importEvent).ShouldBeError(wikiFragment: "bad-download-client-settings");
        }
示例#3
0
        public void should_return_permissions_error_on_movie_import_failed_event_if_folder_exists()
        {
            GivenFolderExists(_downloadItemPath);

            var importEvent = new MovieImportFailedEvent(null, null, true, _downloadItem);

            Subject.Check(importEvent).ShouldBeError(wikiFragment: "permissions-error");
        }
示例#4
0
        public void should_return_ok_on_import_failed_event_if_client_throws_downloadclientexception(Exception ex)
        {
            _downloadClient.Setup(s => s.GetStatus())
            .Throws(ex);

            var importEvent = new MovieImportFailedEvent(null, null, true, _downloadItem);

            Subject.Check(importEvent).ShouldBeOk();

            ExceptionVerification.ExpectedErrors(0);
        }
示例#5
0
        public void should_return_permissions_error_on_movie_import_failed_event_if_file_exists()
        {
            var localMovie = new LocalMovie
            {
                Path = Path.Combine(_downloadItemPath, "file.mkv")
            };

            GivenFileExists(localMovie.Path);

            var importEvent = new MovieImportFailedEvent(new Exception(), localMovie, true, new DownloadClientItem());

            Subject.Check(importEvent).ShouldBeError(wikiFragment: "permissions-error");
        }
示例#6
0
        public void should_return_permissions_error_on_movie_import_failed_event_for_local_client_if_folder_does_not_exist()
        {
            var importEvent = new MovieImportFailedEvent(null, null, true, _downloadItem);

            Subject.Check(importEvent).ShouldBeError(wikiFragment: "permissions-error");
        }