コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }