public async Task WhenISendTheUserNotificationTemplateAPIARequestToUpdateAnExistingSmsNotificationTemplateWithoutAnETag(Table table) { IJsonSerializerSettingsProvider serializerSettingsProvider = this.serviceProvider.GetRequiredService <IJsonSerializerSettingsProvider>(); SmsTemplate notificationTemplate = DataSetupSteps.BuildSmsNotificationTemplateFrom(table.Rows[0]); string? requestJson = JsonConvert.SerializeObject(notificationTemplate, serializerSettingsProvider.Instance); var requestContent = new StringContent(requestJson, Encoding.UTF8, "application/json"); string transientTenantId = this.featureContext.GetTransientTenantId(); var uri = new Uri(FunctionsApiBindings.ManagementApiBaseUri, $"/{transientTenantId}/marain/usernotifications/templates"); await this.SendRequest(uri, HttpMethod.Put, requestContent, notificationTemplate.ETag).ConfigureAwait(false); }
public void GivenIHaveAUserNotificationCalled(string notificationName, Table table) { UserNotification notification = DataSetupSteps.BuildNotificationFrom(table.Rows[0], this.serializationSettingsProvider.Instance); this.scenarioContext.Set(notification, notificationName); }