public void DonateCommand_IsExecutable_StartsProcessWithDonateUrl()
        {
            var vm = BuildAboutWindowViewModel();

            Assert.IsTrue(vm.DonateCommand.IsExecutable);

            vm.DonateCommand.Execute(null);
            _process.Received().Start(Urls.DonateUrl);
        }
        public void FacebookCommand_IsExecutable_StartsProcessWithDonateUrl()
        {
            var vm = new WelcomeWindowViewModel(_processStarter, new ButtonDisplayOptions(false, false), _userGuideHelper, new WelcomeWindowTranslation());

            Assert.IsTrue(vm.FacebookCommand.IsExecutable);

            vm.FacebookCommand.Execute(null);
            _processStarter.Received().Start(Urls.Facebook);
        }
        public void CreateViewModel_CallLaunchPDFArchitectCommand_ProcessStarterIsCalledWithApplicationPath()
        {
            var viewModel = BuildArchitectViewModel();
            var appPath   = "TestPath";

            _pdfArchitectCheck.GetInstallationPath().Returns(appPath);

            viewModel.LaunchPdfArchitectCommand.Execute(null);

            _processStarter.Received().Start(Arg.Is(appPath));
        }
Exemplo n.º 4
0
        public void OpenOfflineActivationUrlCommandExecute_IsExecutable_CallsProcessStartWithOfflineActivationUrl()
        {
            Assert.IsTrue(_viewModel.OpenOfflineActivationUrlCommand.IsExecutable);

            _viewModel.OpenOfflineActivationUrlCommand.Execute(null);
            _process.Received().Start(Urls.OfflineActivationUrl);
        }
        public void ManageLicenseCommandExecute_StartsProcessWithLicenseServerUrl()
        {
            var viewModel = BuildViewModel();

            Assert.IsTrue(viewModel.ManageLicensesCommand.CanExecute(null));

            viewModel.ManageLicensesCommand.Execute(null);
            _process.Received().Start(Urls.LicenseServerUrl);
        }
        public void WhatsNewCommand_ShowsWhatsNew()
        {
            var updateUrl   = "http://update.local";
            var interaction = new UpdateAvailableInteraction(updateUrl, "");
            var viewModel   = BuildViewModel(interaction);

            viewModel.WhatsNewCommand.Execute(null);

            _processStarter.Received(1).Start(updateUrl);
        }
        public void OpenWithArchitect_StartsPDFArchitectProcessForEveryFileAndResturnsTrue()
        {
            var file = "file1";

            var result = _defaultViewerAction.OpenWithArchitect(file);

            Assert.IsTrue(result);
            _processStarter.Received().Start(ArchitectPath, "\"" + file + "\"");
        }
        public void WhenOnTerminalServer_MoreInfoButton_TriggersWebpage()
        {
            var terminalServerCondition = BuildTerminalServerCondition();

            _terminalServerDetection.IsTerminalServer().Returns(true);
            _interactionInvoker
            .When(x => x.Invoke(Arg.Any <MessageInteraction>()))
            .Do(x =>
            {
                x.Arg <MessageInteraction>().Response = MessageResponse.MoreInfo;
            });

            terminalServerCondition.Check();

            _process.Received().Start(Urls.PdfCreatorTerminalServerUrl);
        }
Exemplo n.º 9
0
        public void Execute_CommandIsNotInitializedTransmittedParmeterIsNotNull_OpensProcessStartWithTransmittedParameter()
        {
            _urlOpenCommand.Execute("Transmitted Parameter String");

            _processStarter.Received().Start("Transmitted Parameter String");
        }