コード例 #1
0
        public void ShowWarning_ShouldCall_Modals_Show()
        {
            var dialogs = new ProtonVPN.Modals.Dialogs.Dialogs(_modals, _warningViewModel, _questionViewModel);

            dialogs.ShowWarning("");

            _modals.Received(1).Show <WarningModalViewModel>();
        }
コード例 #2
0
        public void ShowQuestion_ShouldSet_QuestionModalViewModel_Message()
        {
            const string message = "Message test text";
            var          dialogs = new ProtonVPN.Modals.Dialogs.Dialogs(_modals, _warningViewModel, _questionViewModel);

            dialogs.ShowQuestion(message);

            _questionViewModel.Message.Should().Be(message);
        }
コード例 #3
0
        public void ShowQuestion_Override_ShouldSet_QuestionModalViewModel_SecondaryButtonText()
        {
            const string secondaryText = "Secondary button text";

            _settings.SecondaryButtonText.Returns(secondaryText);

            var dialogs = new ProtonVPN.Modals.Dialogs.Dialogs(_modals, _warningViewModel, _questionViewModel);

            dialogs.ShowQuestion(_settings);

            _questionViewModel.SecondaryButtonText.Should().Be(secondaryText);
        }