Beispiel #1
0
 public void OkClickedErrorTest()
 {
     // Arrange
     _messageBoxView.Expect(x => x.ShowError(_settingsView, String.Empty, String.Empty)).IgnoreArguments();
     // Act
     _presenter = CreatePresenter();
     _presenter.SettingsModel = new LegacyClientSettingsModel();
     _presenter.OkClicked();
     // Assert
     _messageBoxView.VerifyAllExpectations();
 }
Beispiel #2
0
 public void OkClickedTest()
 {
     // Arrange
     _settingsView.Expect(x => x.DialogResult = DialogResult.OK);
     _settingsView.Expect(x => x.Close());
     // Act
     _presenter = CreatePresenter();
     _presenter.SettingsModel = CreateValidModel();
     _presenter.OkClicked();
     // Assert
     _settingsView.VerifyAllExpectations();
 }
Beispiel #3
0
 public void OkClickedPathErrorNotOkTest()
 {
     // Arrange
     _messageBoxView.Expect(x => x.AskYesNoQuestion(_settingsView, String.Empty, String.Empty)).IgnoreArguments().Return(DialogResult.No);
     // Act
     _presenter = CreatePresenter();
     _presenter.SettingsModel      = CreateValidModel();
     _presenter.SettingsModel.Path = "[";
     _presenter.OkClicked();
     // Assert
     _messageBoxView.VerifyAllExpectations();
 }
 public void OkClickedTest()
 {
     // Arrange
      _settingsView.Expect(x => x.DialogResult = DialogResult.OK);
      _settingsView.Expect(x => x.Close());
      // Act
      _presenter = CreatePresenter();
      _presenter.SettingsModel = CreateValidModel();
      _presenter.OkClicked();
      // Assert
      _settingsView.VerifyAllExpectations();
 }
 public void OkClickedPathErrorOkTest()
 {
     // Arrange
      _messageBoxView.Expect(x => x.AskYesNoQuestion(_settingsView, String.Empty, String.Empty)).IgnoreArguments().Return(DialogResult.Yes);
      _settingsView.Expect(x => x.DialogResult = DialogResult.OK);
      _settingsView.Expect(x => x.Close());
      // Act
      _presenter = CreatePresenter();
      _presenter.SettingsModel = CreateValidModel();
      _presenter.SettingsModel.Path = "[";
      _presenter.OkClicked();
      // Assert
      _messageBoxView.VerifyAllExpectations();
      _settingsView.VerifyAllExpectations();
 }
 public void OkClickedErrorTest()
 {
     // Arrange
      _messageBoxView.Expect(x => x.ShowError(_settingsView, String.Empty, String.Empty)).IgnoreArguments();
      // Act
      _presenter = CreatePresenter();
      _presenter.SettingsModel = new LegacyClientSettingsModel();
      _presenter.OkClicked();
      // Assert
      _messageBoxView.VerifyAllExpectations();
 }