public void Create_CheckVariables()
        {
            var model = build();

            _commandLocator.Received(1).GetCommand <QuickActionOpenWithPdfArchitectCommand>();
            _commandLocator.Received(1).GetCommand <QuickActionOpenWithDefaultCommand>();
            _commandLocator.Received(1).GetCommand <QuickActionOpenExplorerLocationCommand>();
            _commandLocator.Received(1).GetCommand <QuickActionOpenMailClientCommand>();
            Assert.AreEqual(OutputFormat.Pdf, model.OutputFormat);
            Assert.IsFalse(model.IsActive);
        }
Exemple #2
0
        public void SendValidPDFButNoViewerFound_CallExecute_TryCallQuickActionOpenWithPdfArchitectCommand()
        {
            var command = BuildCommand();
            var defaultViewerByOutputFormat = _settingsProvider.Settings.GetDefaultViewerByOutputFormat(OutputFormat.Pdf);

            defaultViewerByOutputFormat.IsActive = false;

            _fileAssoc.HasOpen(Arg.Any <string>()).Returns(false);

            var targetPath = _fileList.ElementAt(0);

            _defaultViewerAction.OpenOutputFile(targetPath).Returns(new ActionResult());
            var dummyCommand = Substitute.For <ICommand>();

            _commandLocator.GetCommand <QuickActionOpenWithPdfArchitectCommand>().Returns(dummyCommand);
            command.Execute(targetPath);

            _commandLocator.Received(1).GetCommand <QuickActionOpenWithPdfArchitectCommand>();
        }