public async Task TestCreateTemplateVersionWithLocaleWithMinimumParametersTextAsync() { // Make the API call Trace.WriteLine(String.Format("POST /templates/{0}/locales/{1}/versions", DEFAULT_TEMPLATE_ID, DEFAULT_LOCALE)); var templateVersionName = "New Template Version" + SendwithusClientTest.TimeStampAndRandomNumber(); var templateSubject = "New Version!"; var updatedTemplateVersion = new TemplateVersion(templateVersionName, templateSubject); updatedTemplateVersion.text = "some text"; try { var templateVersion = await Template.CreateTemplateVersion(DEFAULT_TEMPLATE_ID, DEFAULT_LOCALE, updatedTemplateVersion); // Validate the response SendwithusClientTest.ValidateResponse(templateVersion); } catch (AggregateException exception) { Assert.Fail(exception.ToString()); } }
public async Task TestCreateTemplateVersionWithMinimumParametersHtmlAsync() { // Make the API call Trace.WriteLine(String.Format("POST /templates/{0}/versions", DEFAULT_TEMPLATE_ID)); var templateVersionName = "New Template Version" + SendwithusClientTest.TimeStampAndRandomNumber(); var templateSubject = "New Version!"; var updatedTemplateVersion = new TemplateVersion(templateVersionName, templateSubject); updatedTemplateVersion.html = "<html><head></head><body><h1>NEW TEMPLATE VERSION</h1></body></html>"; try { var templateVersion = await Template.CreateTemplateVersion(DEFAULT_TEMPLATE_ID, updatedTemplateVersion); // Validate the response SendwithusClientTest.ValidateResponse(templateVersion); } catch (AggregateException exception) { Assert.Fail(exception.ToString()); } }