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(); }
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); }
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); }
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)); }