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

TestRepeatedMapWithNullValueAndNullOption() private method

private TestRepeatedMapWithNullValueAndNullOption ( ) : void
return void
        public void TestRepeatedMapWithNullValueAndNullOption()
        {
            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(); null={x}>!", new string[] { "name" });
            Template st = group.GetInstanceOf("test");
            st.Add("name", "Ter");
            st.Add("name", null);
            st.Add("name", "Sumana");
            string expected =
                "hi ([Ter])x([Sumana])!";
            string result = st.Render();
            Assert.AreEqual(expected, result);
        }
TestCoreBasics