public void ShouldCallDeleteOnItemNotificationRepository() { // arrange ItemNotification itemNotification = new ItemNotification(); // act itemNotificationController.DeleteItemNotification(itemNotification); // assert mockItemNotificationRepository.Verify(x => x.Delete(itemNotification), Times.Once); }
private void ClickDeleteNotificationBtn(object sender, RoutedEventArgs e) { try { itemNotificationController.DeleteItemNotification(SelectedItemNotification); SetUpNotificationControls(null, false); MessageBoxResult result = MessageBox.Show("Notification deleted successfully", "Confirmation", MessageBoxButton.OK, MessageBoxImage.Information); } catch (Exception ex) { excpetionHandler.HandleException(ex); } }