Antlr4.Test.StringTemplate.TestRenderers.TestRendererWithFormatAndSeparator C# (CSharp) Méthode

TestRendererWithFormatAndSeparator() private méthode

private TestRendererWithFormatAndSeparator ( ) : void
Résultat void
        public void TestRendererWithFormatAndSeparator()
        {
            string template =
                    "The names: <names; separator=\" and \", format=\"upper\">";
            TemplateGroup group = new TemplateGroup();
            group.RegisterRenderer(typeof(string), new StringRenderer());
            Template st = new Template(group, template);
            st.Add("names", "ter");
            st.Add("names", "tom");
            st.Add("names", "sriram");
            string expecting = "The names: TER and TOM and SRIRAM";
            string result = st.Render();
            Assert.AreEqual(expecting, result);
        }