public void UploadWizardIsOpenedWhenRequested()
 {
     _uploadWizardPolicy = UploadWizardPolicy.OpenUploadWizardOnFinish;
     _sut = Open();
     UserControlTestUtils.Click(_sut.ButtonOk);
     Mock.Get(_actionExecutor).Verify(a => a.ExecuteActionGuarded <UploadWizardAction>(), Times.Once);
 }
 public void NothingIsSavedOnAbort()
 {
     _sut = Open();
     Mock.Get(_util).Verify(u => u.GetSettings());
     UserControlTestUtils.Click(_sut.ButtonAbort);
     Mock.Get(_util).Verify(u => u.StoreSettings(It.IsAny <UserProfileSettings>()), Times.Never);
 }
        public void ShouldNotSaveSettingsOnCloseButton()
        {
            var sut = Open();

            UserControlTestUtils.Click(sut.CloseButton);

            _mockSettingsStore.Verify(settingStore => settingStore.SetSettings(It.IsAny <AnonymizationSettings>()), Times.Never);
        }
        public void ShouldSaveSettingsOnOkButton()
        {
            var sut = Open();

            UserControlTestUtils.Click(sut.OkButton);

            _mockSettingsStore.Verify(settingStore => settingStore.SetSettings(It.IsAny <AnonymizationSettings>()));
        }
示例#5
0
        public void ShouldNotExecuteActionOnAbort()
        {
            SetConfirmationAnswerTo(false);

            UserControlTestUtils.Click(_sut.ResetButton);

            VerifyActionExecuted(Times.Never);
        }
示例#6
0
        public void ShouldExecuteActionOnResetClick()
        {
            SetConfirmationAnswerTo(true);

            UserControlTestUtils.Click(_sut.ResetButton);

            VerifyActionExecuted(Times.Once);
        }
        public void ShouldResetFeedbackSettingsOnClick()
        {
            SetConfirmationAnswerTo(true);

            UserControlTestUtils.Click(_sut.ResetFeedbackSettingsButton);

            VerifyActionExecuted(Times.Once);
        }
        public void ProfileIsSavedOnFinish()
        {
            _sut = Open();
            _sut.UserSettingsGrid.ProjectsCoursesCheckBox.Toggle();
            UserControlTestUtils.Click(_sut.ButtonOk);

            Assert.True(_settings.ProjectsCourses);
            Mock.Get(_util).Verify(u => u.StoreSettings(_settings), Times.Once);
        }
示例#9
0
        public void Binding_ProfileIdCanBeGeneratedOnClick()
        {
            var sut = Open();

            UserControlTestUtils.Click(sut.RefreshProfileIdButton);

            var expected = _rndGuid;

            Assert.AreEqual(expected, sut.ProfileIdTextBox.Text);
            Assert.AreEqual(expected, _userProfileSettings.ProfileId);
        }