Beispiel #1
0
 public PdfToolsLicensingStartUpCondition(IPdfToolsLicensing pdfToolsLicensing, ITranslationFactory translationFactory, IOsHelper osHelper, IAssemblyHelper assemblyHelper)
 {
     _pdfToolsLicensing = pdfToolsLicensing;
     _osHelper          = osHelper;
     _assemblyHelper    = assemblyHelper;
     _translation       = translationFactory.CreateTranslation <ProgramTranslation>();
 }
 public TerminalServerNotAllowedCondition(ITerminalServerDetection terminalServerDetection, ProgramTranslation translation,
                                          IInteractionInvoker interactionInvoker, IProcessStarter processStarter, ApplicationNameProvider applicationNameProvider)
 {
     _terminalServerDetection = terminalServerDetection;
     _translation             = translation;
     _interactionInvoker      = interactionInvoker;
     _processStarter          = processStarter;
     _applicationNameProvider = applicationNameProvider;
 }
 public LicenseCondition(ITranslationFactory translationFactory, ILicenseChecker licenseChecker, IInteractionInvoker interactionInvoker, IVersionHelper versionHelper, ApplicationNameProvider applicationNameProvider, IGpoSettings gpoSettings)
 {
     _translation             = translationFactory.CreateTranslation <ProgramTranslation>();
     _licenseChecker          = licenseChecker;
     _interactionInvoker      = interactionInvoker;
     _versionHelper           = versionHelper;
     _applicationNameProvider = applicationNameProvider;
     _gpoSettings             = gpoSettings;
 }
 public TerminalServerNotAllowedCondition(ITerminalServerDetection terminalServerDetection, ITranslationFactory translationFactory,
                                          IInteractionInvoker interactionInvoker, IWebLinkLauncher webLinkLauncher, ApplicationNameProvider applicationNameProvider)
 {
     _terminalServerDetection = terminalServerDetection;
     _translation             = translationFactory.CreateTranslation <ProgramTranslation>();
     _interactionInvoker      = interactionInvoker;
     _webLinkLauncher         = webLinkLauncher;
     _applicationNameProvider = applicationNameProvider;
 }
Beispiel #5
0
 public LicenseCondition(ISettingsManager settingsManager, ProgramTranslation translation, ILicenseChecker licenseChecker, IInteractionInvoker interactionInvoker, IVersionHelper versionHelper, ApplicationNameProvider applicationNameProvider)
 {
     _settingsManager         = settingsManager;
     _translation             = translation;
     _licenseChecker          = licenseChecker;
     _interactionInvoker      = interactionInvoker;
     _versionHelper           = versionHelper;
     _applicationNameProvider = applicationNameProvider;
 }
Beispiel #6
0
        public void Setup()
        {
            _savedActivation = new Activation(acceptExpiredActivation: false);
            _licenseChecker  = Substitute.For <ILicenseChecker>();
            _licenseChecker.GetSavedActivation().Returns(x => _savedActivation.SomeNotNull(LicenseError.NoActivation));
            _interactionInvoker = Substitute.For <IInteractionInvoker>();
            _gpoSettings        = Substitute.For <IGpoSettings>();
            _translation        = new ProgramTranslation();

            _editionWithVersionNumber = _applicationName + " " + _versionWithTreeDigits;
        }
        public void SetUp()
        {
            _assemblyPath      = @"X:\Some\path";
            _pdfToolsLicensing = Substitute.For <IPdfToolsLicensing>();
            var assemblyHelper = Substitute.For <IAssemblyHelper>();

            assemblyHelper.GetAssemblyDirectory().Returns(_assemblyPath);
            _osHelper         = Substitute.For <IOsHelper>();
            _translation      = new ProgramTranslation();
            _startUpCondition = new PdfToolsLicensingStartUpCondition(_pdfToolsLicensing, new TranslationFactory(), _osHelper, assemblyHelper);
        }
        public void WhenOnTerminalServer_ShowsMoreInfoInteraction()
        {
            var terminalServerCondition = BuildTerminalServerCondition();
            var translation             = new ProgramTranslation();

            _terminalServerDetection.IsTerminalServer().Returns(true);

            terminalServerCondition.Check();

            _interactionInvoker.Received().Invoke(Arg.Any <MessageInteraction>());
            var interaction = (MessageInteraction)_interactionInvoker.ReceivedCalls().First().GetArguments()[0];

            Assert.AreEqual(translation.UsePDFCreatorTerminalServer, interaction.Text);
            Assert.AreEqual(MessageOptions.MoreInfoCancel, interaction.Buttons);
        }
Beispiel #9
0
 public void SetUp()
 {
     _pdfToolsLicensing = Substitute.For <IPdfToolsLicensing>();
     _translation       = new ProgramTranslation();
     _startUpCondition  = new PdfToolsLicensingStartUpCondition(_pdfToolsLicensing, _translation);
 }
Beispiel #10
0
 public TrialStartupCondition(ITranslationFactory translationFactory, IDateTimeProvider dateTimeProvider, ViewCustomization viewCustomization)
 {
     _dateTimeProvider  = dateTimeProvider;
     _viewCustomization = viewCustomization;
     _translation       = translationFactory.CreateTranslation <ProgramTranslation>();
 }
 public PdfToolsLicensingStartUpCondition(IPdfToolsLicensing pdfToolsLicensing, ProgramTranslation translation)
 {
     _pdfToolsLicensing = pdfToolsLicensing;
     _translation       = translation;
 }