Antlr4.Test.StringTemplate.TestCoreBasics.TestRepeatedMap C# (CSharp) Method

TestRepeatedMap() private method

private TestRepeatedMap ( ) : void
return void
        public void TestRepeatedMap()
        {
            TemplateGroup group = new TemplateGroup();
            group.DefineTemplate("a", "[<x>]", new string[] { "x" });
            group.DefineTemplate("b", "(<x>)", new string[] { "x" });
            group.DefineTemplate("test", "hi <name:a():b()>!", new string[] { "name" });
            Template st = group.GetInstanceOf("test");
            st.Add("name", "Ter");
            st.Add("name", "Tom");
            st.Add("name", "Sumana");
            string expected =
                "hi ([Ter])([Tom])([Sumana])!";
            string result = st.Render();
            Assert.AreEqual(expected, result);
        }
TestCoreBasics