示例#1
0
        public void Setup()
        {
            _osHelper     = Substitute.For <IOsHelper>();
            _uacAssistant = Substitute.For <IUacAssistant>();
            var applicationNameProvider = new ApplicationNameProvider(EditionName);

            _interactionRequest = new UnitTestInteractionRequest();
            _storeLicenseForAllUsersWindowViewModel = new StoreLicenseForAllUsersWindowViewModel(applicationNameProvider, _osHelper, _uacAssistant, _interactionRequest, new DesignTimeTranslationUpdater());
            var interaction = new StoreLicenseForAllUsersInteraction("", "");

            _interactionHelper = new InteractionHelper <StoreLicenseForAllUsersInteraction>(_storeLicenseForAllUsersWindowViewModel, interaction);
        }
        public void Setup()
        {
            _osHelper     = Substitute.For <IOsHelper>();
            _uacAssistant = Substitute.For <IUacAssistant>();
            var applicationNameProvider = new ApplicationNameProvider(ProductName);

            _interactionInvoker = Substitute.For <IInteractionInvoker>();
            _storeLicenseForAllUsersWindowViewModel = new StoreLicenseForAllUsersWindowViewModel(applicationNameProvider, _osHelper, _uacAssistant, _interactionInvoker, new StoreLicenseForAllUsersWindowTranslation());
            var interaction = new StoreLicenseForAllUsersInteraction("", "");

            _interactionHelper = new InteractionHelper <StoreLicenseForAllUsersInteraction>(_storeLicenseForAllUsersWindowViewModel, interaction);
        }
        public void Setup()
        {
            _osHelper     = Substitute.For <IOsHelper>();
            _uacAssistant = Substitute.For <IUacAssistant>();
            var applicationNameProvider = new ApplicationNameProvider(ProductName);

            _interactionInvoker = Substitute.For <IInteractionInvoker>();
            var translator = Substitute.For <ITranslator>();

            translator.GetTranslation("StoreLicenseForAllUsersWindowViewModel", "StoreForAllUsersSuccessful").Returns(SuccessfulText);
            translator.GetTranslation("StoreLicenseForAllUsersWindowViewModel", "StoreForAllUsersFailed").Returns(FailedText);
            _storeLicenseForAllUsersWindowViewModel = new StoreLicenseForAllUsersWindowViewModel(applicationNameProvider, _osHelper, _uacAssistant, _interactionInvoker, translator);
            var interaction = new StoreLicenseForAllUsersInteraction();

            _interactionHelper = new InteractionHelper <StoreLicenseForAllUsersInteraction>(_storeLicenseForAllUsersWindowViewModel, interaction);
        }
示例#4
0
        private void StoreLicenseForAllUsersQuery(Activation activation)
        {
            var interaction = new StoreLicenseForAllUsersInteraction(activation.LSA, activation.Key);

            _interactionInvoker.Invoke(interaction);
        }
示例#5
0
 private async Task StoreLicenseForAllUsersQuery(Activation activation)
 {
     var interaction = new StoreLicenseForAllUsersInteraction(activation.LSA, activation.Key);
     await _interactionRequest.RaiseAsync(interaction);
 }
示例#6
0
        private void StoreLicenseForAllUsersQuery()
        {
            var interaction = new StoreLicenseForAllUsersInteraction();

            _interactionInvoker.Invoke(interaction);
        }
        private void StoreLicenseForAllUsersQuery(Activation activation)
        {
            var interaction = new StoreLicenseForAllUsersInteraction(activation.LSA, activation.Key);

            _interactionRequest.Raise(interaction);
        }