Antlr4.Test.StringTemplate.TestCoreBasics.TestMapThenParallelMap C# (CSharp) 메소드

TestMapThenParallelMap() 개인적인 메소드

private TestMapThenParallelMap ( ) : void
리턴 void
        public void TestMapThenParallelMap()
        {
            TemplateGroup group = new TemplateGroup();
            group.DefineTemplate("bold", "[<x>]", new string[] { "x" });
            group.DefineTemplate("test", "hi <[names:bold()],phones:{n,p | <n>:<p>;}>", new string[] { "names", "phones" });
            Template st = group.GetInstanceOf("test");
            st.Add("names", "Ter");
            st.Add("names", "Tom");
            st.Add("names", "Sumana");
            st.Add("phones", "x5001");
            st.Add("phones", "x5002");
            string expected =
                "hi [Ter]:x5001;[Tom]:x5002;[Sumana]:;";
            string result = st.Render();
            Assert.AreEqual(expected, result);
        }
TestCoreBasics