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(); }
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(); }
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(); }
public void DeleteWorkUnitClickNoSelectionTest() { // Arrange _messageBoxView.Expect(x => x.ShowInformation(null, String.Empty, String.Empty)).IgnoreArguments(); // Act _presenter = CreatePresenter(); _presenter.DeleteWorkUnitClick(); // Assert _messageBoxView.VerifyAllExpectations(); }