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

TestSeparatorInList2() private method

private TestSeparatorInList2 ( ) : void
return void
        public void TestSeparatorInList2()
        {
            TemplateGroup group = new TemplateGroup();
            group.DefineTemplate("test", "<names:{n | case <n>}; separator=\", \">", new string[] { "names" });
            Template st = group.GetInstanceOf("test");
            st.Add("names", "Ter");
            st.Add("names", new List<string>(new string[] { "Tom", "Sriram" }));
            string expected =
                "case Ter, case Tom, case Sriram";
            string result = st.Render();
            Assert.AreEqual(expected, result);
        }
TestCoreBasics