Antlr4.Test.StringTemplate.TestCoreBasics.TestAttrIsList C# (CSharp) Метод

TestAttrIsList() приватный Метод

private TestAttrIsList ( ) : void
Результат void
        public void TestAttrIsList()
        {
            string template = "hi <name>!";
            Template st = new Template(template);
            List<string> names = new List<string>() { "Ter", "Tom" };
            st.Add("name", names);
            st.Add("name", "Sumana"); // shouldn't alter my version of names list!
            string expected =
                "hi TerTomSumana!";  // Template sees 3 names
            string result = st.Render();
            Assert.AreEqual(expected, result);

            Assert.AreEqual(2, names.Count); // my names list is still just 2
        }
TestCoreBasics