public void LoadTemplateTest() { try { testSubject.LoadTemplate(templatePath); // test } catch (Exception ex) { Assert.Fail(ex.Message); } }
public string RenderPage(XmlConfig config) { if (config.templatePath == null) { throw new ArgumentNullException("Missing xslt template path. Set XsltTemplatePath for ILayoutService in controller's constructor"); } StringWriter writer; xmlTransformer.LoadData(config.dataPath); xmlTransformer.LoadTemplate(config.templatePath); xmlTransformer.TransformTemplate(out writer); return(xmlTransformer.DecodeToString(writer)); }