/// <summary> /// Update a notification endpoint. /// </summary> /// <param name="endpointId">ID of notification endpoint</param> /// <param name="notificationEndpointUpdate">update to apply</param> /// <returns>An updated notification endpoint</returns> public async Task <NotificationEndpoint> UpdateEndpointAsync(string endpointId, NotificationEndpointUpdate notificationEndpointUpdate) { Arguments.CheckNonEmptyString(endpointId, nameof(endpointId)); Arguments.CheckNotNull(notificationEndpointUpdate, nameof(notificationEndpointUpdate)); return(await _service.PatchNotificationEndpointsIDAsync(endpointId, notificationEndpointUpdate)); }
public void UpdateEndpointNotExists() { var update = new NotificationEndpointUpdate("not exists name", "not exists description", status: NotificationEndpointUpdate.StatusEnum.Active); var ioe = Assert.ThrowsAsync <HttpException>(async() => await _notificationEndpointsApi .UpdateEndpointAsync("020f755c3c082000", update)); Assert.AreEqual("notification endpoint not found for key \"020f755c3c082000\"", ioe.Message); }