private void MockSaveFileDialog(bool success) { _saveFileQuery = Substitute.For <IFileNameQuery>(); var outputFilenameResult = new OutputFilenameResult(_filepathFromSaveDialog, OutputFormat.Pdf); var queryResultOutputFilenameResult = new QueryResult <OutputFilenameResult>(success, outputFilenameResult); _saveFileQuery.GetFileName(Arg.Any <string>(), Arg.Any <string>(), Arg.Any <OutputFormat>()) .Returns(queryResultOutputFilenameResult); }
public void Setup() { _pdfProfile = new ConversionProfile { Name = "PDF Profile", OutputFormat = OutputFormat.Pdf, FileNameTemplate = "X:\\test.pdf" }; _saveFileQuery = Substitute.For <IFileNameQuery>(); var outputFilenameResult = new OutputFilenameResult(_filepathFromSaveDialog, OutputFormat.Jpeg); var queryResultOutputFilenameResult = new QueryResult <OutputFilenameResult>(true, outputFilenameResult); _saveFileQuery.GetFileName(Arg.Any <string>(), Arg.Any <string>(), Arg.Any <OutputFormat>()) .Returns(queryResultOutputFilenameResult); }