public async Task Render_Template_Returns_Correct_Content() { // Setup string apiKey = ConfigurationManager.AppSettings["APIKey"]; string templateName = ConfigurationManager.AppSettings["TemplateExample"]; // Exercise var api = new MandrillApi(apiKey); var templateContent = new TemplateContent { Content = "Test", Name = "model1" }; RenderedTemplate result = await api.Render(new RenderTemplateRequest(templateName) { TemplateContent = new List <TemplateContent> { templateContent } }); string expected = "<span>Test</span>"; // Verify Assert.AreEqual(expected, result.Html); }
public void Render_Template_Returns_Correct_Content() { // Setup var apiKey = ConfigurationManager.AppSettings["APIKey"]; var templateName = ConfigurationManager.AppSettings["TemplateExample"]; // Exercise var api = new MandrillApi(apiKey); var templateContent = new TemplateContent { content = "Test", name = "model1" }; var result = api.Render(templateName, new List<TemplateContent>{templateContent}, null); string expected = "<!DOCTYPE html>\n<span>Test</span>"; // Verify Assert.AreEqual(expected, result.html); }
public void Render_Template_Returns_Correct_Content() { // Setup var apiKey = ConfigurationManager.AppSettings["APIKey"]; var templateName = ConfigurationManager.AppSettings["TemplateExample"]; // Exercise var api = new MandrillApi(apiKey); var templateContent = new TemplateContent { content = "Test", name = "model1" }; var result = api.Render(templateName, new List <TemplateContent> { templateContent }, null); string expected = "<!DOCTYPE html>\n<span>Test</span>"; // Verify Assert.AreEqual(expected, result.html); }
public async Task Render_Template_Returns_Correct_Content() { // Setup string apiKey = ConfigurationManager.AppSettings["APIKey"]; string templateName = ConfigurationManager.AppSettings["TemplateExample"]; // Exercise var api = new MandrillApi(apiKey); var templateContent = new TemplateContent { Content = "Test", Name = "model1" }; RenderedTemplate result = await api.Render(new RenderTemplateRequest(templateName) { TemplateContent = new List<TemplateContent> {templateContent} }); string expected = "<span>Test</span>"; // Verify Assert.AreEqual(expected, result.Html); }