public async Task Add_Notification_by_userid_and_response_ok_Not_Found() { using (var server = CreateServer()) { var notificationEventModel = new NotificationEventModel(); var content = new StringContent(JsonConvert.SerializeObject(notificationEventModel), Encoding.UTF8, "application/json"); var response = await server.CreateClient() .PostAsync(HttPActionRoute.AddUserNotification(), content); Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); } }
public async Task Add_Notification_by_userid_and_response_ok_status_code() { using (var server = CreateServer()) { var notificationEventModel = new NotificationEventModel { Type = EventType.AppointmentCancelled.ToString(), UserId = new Guid(userId), Data = new NotificationData { AppointmentDateTime = "28/01/2020", FirstName = "Test", OrganisationName = "Integration", Reason = "Robustness" } }; var content = new StringContent(JsonConvert.SerializeObject(notificationEventModel), Encoding.UTF8, "application/json"); var response = await server.CreateClient() .PostAsync(HttPActionRoute.AddUserNotification(), content); response.EnsureSuccessStatusCode(); } }