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