Пример #1
0
        public void RunJob_CallsCleanUp()
        {
            var jobRunner = BuildJobRunner();
            var job       = BuildJob();

            jobRunner.RunJob(job, _outputFileMover);

            _jobCleanUp.Received().DoCleanUp(job.JobTempFolder, job.JobInfo.SourceFiles, job.JobInfo.InfFile);
            _directoryHelper.Received().DeleteCreatedDirectories();
        }
Пример #2
0
        public void BrowseFileCommand_CallsDirectoryHelper()
        {
            var vm = BuildViewModel(saveDialogResult: false);

            vm.SetJob(BuildJob(_pdfProfile));
            MockSaveFileDialog(false);

            vm.BrowseFileCommand.Execute(null);

            _directoryHelper.Received(1).CreateDirectory(vm.OutputFolder);
        }
Пример #3
0
        public void GetFileName_WhenInteractionIsCalled_CallsDirectoryHelper()
        {
            var expectedDirectory = Path.GetDirectoryName(_someFilePath);

            HandleSaveFileInteraction(interaction => { interaction.Success = false; });
            var query = BuildFileNameQuery();

            var result = query.GetFileName(_someDirectory, _someFile, OutputFormat.Pdf);

            _directoryHelper.Received().CreateDirectory(expectedDirectory);
        }
Пример #4
0
        public void SingleFile_Calls_DirectoryHelper()
        {
            _autosaveOutputFileMover.MoveOutputFiles(_job);

            _directoryHelper.Received(1).CreateDirectory(Path.GetDirectoryName(_job.OutputFilenameTemplate));
        }
        public async Task SingleFile_Calls_DirectoryHelper()
        {
            await _autosaveOutputFileMover.MoveOutputFiles(_job);

            _directoryHelper.Received(1).CreateDirectory(Path.GetDirectoryName(_job.OutputFileTemplate));
        }