public void SendNotification_ShouldFailWithNotWorkingApiCalls() { INotificationRepository notificationRepository = new NotificationRepository(failingApiCalls, apiConfig, logger); UploadableNotification notification = new UploadableNotification(); Boolean expected = false; Boolean actual = notificationRepository.SendNotification(notification); Assert.Equal(expected, actual); }
public IActionResult SendNotification(UploadableNotification notification) { if (ModelState.IsValid) { Boolean isNotificationSend = repository.SendNotification(notification); if (isNotificationSend) { ViewBag.IsNotificationAdded = true; return(View("Index", repository.GetAll())); } } ViewBag.IsNotificationAdded = false; return(View("Index", repository.GetAll())); }