コード例 #1
0
 public void HistoryPresenter_DeleteWorkUnitClick_NoSelection_Test()
 {
     // Arrange
     _messageBoxView.Expect(x => x.ShowInformation(null, String.Empty, String.Empty)).IgnoreArguments();
     // Act
     _presenter = CreatePresenter();
     _presenter.DeleteWorkUnitClick();
     // Assert
     _messageBoxView.VerifyAllExpectations();
 }
コード例 #2
0
        public void HistoryPresenter_DeleteWorkUnitClick_Test()
        {
            // Arrange
            _model.HistoryBindingSource.Add(new HistoryEntry {
                ID = 1
            });

            _messageBoxView.Expect(x => x.AskYesNoQuestion(null, String.Empty, String.Empty)).IgnoreArguments().Return(DialogResult.Yes);
            _database.Expect(x => x.Delete(null)).IgnoreArguments().Return(1);
            // Act
            _presenter = CreatePresenter();
            _presenter.DeleteWorkUnitClick();
            // Assert
            _messageBoxView.VerifyAllExpectations();
            _database.VerifyAllExpectations();
        }
コード例 #3
0
        public void DeleteWorkUnitClickTest()
        {
            // Arrange
             _model.HistoryBindingSource.Add(new HistoryEntry { ID = 1 });

             _messageBoxView.Expect(x => x.AskYesNoQuestion(null, String.Empty, String.Empty)).IgnoreArguments().Return(DialogResult.Yes);
             _database.Expect(x => x.Delete(null)).IgnoreArguments().Return(1);
             _database.Expect(x => x.Fetch(null, HistoryProductionView.BonusDownloadTime)).IgnoreArguments().Return(new List<HistoryEntry>());
             // Act
             _presenter = CreatePresenter();
             _presenter.DeleteWorkUnitClick();
             // Assert
             _messageBoxView.VerifyAllExpectations();
             _database.VerifyAllExpectations();
        }
コード例 #4
0
 public void DeleteWorkUnitClickNoSelectionTest()
 {
     // Arrange
      _messageBoxView.Expect(x => x.ShowInformation(null, String.Empty, String.Empty)).IgnoreArguments();
      // Act
      _presenter = CreatePresenter();
      _presenter.DeleteWorkUnitClick();
      // Assert
      _messageBoxView.VerifyAllExpectations();
 }