public async Task Add_user_Notification_success() { //Arrange var model = new NotificationEventModel { Data = new NotificationData { AppointmentDateTime = "23/01/2020", FirstName = "Romio", OrganisationName = "Little Runners", Reason = "Healthy" }, Type = "AppointmentCancelled", UserId = Guid.NewGuid() }; //Act var catalogContext = new NotificationsDbContext(_dbOptions); var accessServ = new NotificationsAccess(catalogContext); var NotificationServ = new NotificationsService(accessServ); var testController = new NotificationsController(NotificationServ); var actionResult = await testController.AddUserNotification(model).ConfigureAwait(false); //Assert Assert.IsType <OkObjectResult>(actionResult); var result = Assert.IsAssignableFrom <NotificationModel>(((OkObjectResult)actionResult).Value); Assert.Contains("Healthy", result.Message); }