Exemplo n.º 1
0
        public void TestLineFeedVariableSubstitution()
        {
            var variable = new LineFeedVariable();
            var template = variable.ToString(null);

            var engine = new TemplateEngine(template);

            engine.AddVariable(variable);

            var str = engine.ToString();

            Console.WriteLine(string.Format("SUBSTITUTED STRING: '{0}'", str));

            Assert.AreEqual("\n", str);
        }
Exemplo n.º 2
0
        public void TestLineFeedVariableWithArgSubstitution()
        {
            var variable = new LineFeedVariable();
            int count    = 3;
            var template = variable.ToString(count.ToString());

            var engine = new TemplateEngine(template);

            engine.AddVariable(variable);

            var str = engine.ToString();

            Console.WriteLine(string.Format("SUBSTITUTED STRING: '{0}'", str));

            Assert.AreEqual(new string('\n', count), str);
        }