public void should_return_mapping_error_on_track_import_failed_event_for_remote_client_if_folder_does_not_exist()
        {
            _clientStatus.IsLocalhost = false;
            var importEvent = new TrackImportFailedEvent(null, null, true, _downloadItem);

            Subject.Check(importEvent).ShouldBeError(wikiFragment: "bad_remote_path_mapping");
        }
        public void should_return_download_client_error_on_track_import_failed_event_for_remote_client_if_path_invalid()
        {
            _clientStatus.IsLocalhost = true;
            _downloadItem.OutputPath  = new OsPath("an invalid path");
            var importEvent = new TrackImportFailedEvent(null, null, true, _downloadItem);

            Subject.Check(importEvent).ShouldBeError(wikiFragment: "bad_download_client_settings");
        }
        public void should_return_permissions_error_on_track_import_failed_event_if_folder_exists()
        {
            GivenFolderExists(_downloadItemPath);

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

            Subject.Check(importEvent).ShouldBeError(wikiFragment: "permissions_error");
        }
Beispiel #4
0
        public void should_return_docker_mapping_error_on_track_import_failed_event_inside_docker_if_folder_does_not_exist()
        {
            GivenDocker();

            clientStatus.IsLocalhost = false;
            var importEvent = new TrackImportFailedEvent(null, null, true, downloadItem);

            Subject.Check(importEvent).ShouldBeError(wikiFragment: "docker-bad-remote-path-mapping");
        }
        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 TrackImportFailedEvent(null, null, true, _downloadItem);

            Subject.Check(importEvent).ShouldBeOk();

            ExceptionVerification.ExpectedErrors(0);
        }
Beispiel #6
0
        public void should_return_permissions_error_on_track_import_failed_event_if_file_exists()
        {
            var localTrack = new LocalTrack {
                Path = Path.Combine(downloadItemPath, "file.mp3")
            };

            GivenFileExists(localTrack.Path);

            var importEvent = new TrackImportFailedEvent(new Exception(), localTrack, true, new DownloadClientItem());

            Subject.Check(importEvent).ShouldBeError(wikiFragment: "permissions-error");
        }
        public void should_return_permissions_error_on_track_import_failed_event_for_local_client_if_folder_does_not_exist()
        {
            var importEvent = new TrackImportFailedEvent(null, null, true, _downloadItem);

            Subject.Check(importEvent).ShouldBeError(wikiFragment: "permissions_error");
        }