public void ShouldCallSaveOnItemNotificationRepositoryForNewItemNotification() { // arrange ItemNotification itemNotification = new ItemNotification(); // act itemNotificationController.SaveItemNotification(itemNotification); // assert mockItemNotificationRepository.Verify(x => x.Save(itemNotification), Times.Once); }
private void ClickSaveNotificationBtn(object sender, RoutedEventArgs e) { try { itemNotificationController.SaveItemNotification(CreateNewItemNotification()); MessageBoxResult result = MessageBox.Show("Notification saved successfully", "Confirmation", MessageBoxButton.OK, MessageBoxImage.Information); } catch (Exception ex) { excpetionHandler.HandleException(ex); } }