public void GetNewNotifications_ServiceReturnsNotifications_ReturnNotificationViewModelList() { var notifications = new[] { Notification.AppointmentCreated(new Appointment()) }; _mockService .Setup(m => m.GetNewNotifications(_userId)) .Returns(notifications); var results = _controller.GetNewNotifications(); results.Should().AllBeOfType(typeof(NotificationViewModel)); results.Count().Should().Be(1); }
public async void GetNewNotifications_HappyPath_ShouldReturnOkObject() { _mockRepository.Setup(g => g.GetNewNotifications(_userId, true)).ReturnsAsync(new List <Notification>()); var result = await _controller.GetNewNotifications(); result.Should().BeOfType <OkObjectResult>(); }