//NOTE: we set the newline property on the code generator so that the whole files has matching newlines, // in order to match the newlines in the verbatim code blocks void Generate(string input, string expectedOutput, string newline) { DummyHost host = new DummyHost(); string className = "GeneratedTextTransformation4f504ca0"; string code = GenerateCode(host, input, className, newline); Assert.AreEqual(0, host.Errors.Count); Assert.AreEqual(expectedOutput, TemplatingEngineHelper.StripHeader(code, newline)); }
string Preprocess(string input) { DummyHost host = new DummyHost(); string className = "PreprocessedTemplate"; string classNamespace = "Templating"; string language = null; string[] references = null; TemplatingEngine engine = new TemplatingEngine(); string output = engine.PreprocessTemplate(input, host, className, classNamespace, out language, out references); output = output.Replace("\r\n", "\n"); return(TemplatingEngineHelper.StripHeader(output, "\n")); }