コード例 #1
0
        public void ShouldCallDeleteOnItemNotificationRepository()
        {
            // arrange
            ItemNotification itemNotification = new ItemNotification();

            // act
            itemNotificationController.DeleteItemNotification(itemNotification);

            // assert
            mockItemNotificationRepository.Verify(x => x.Delete(itemNotification), Times.Once);
        }
コード例 #2
0
 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);
     }
 }