Alpinely.TownCrier.Tests.TemplateParserTests.CanSupplyExtraneousProperties C# (CSharp) Method

CanSupplyExtraneousProperties() private method

private CanSupplyExtraneousProperties ( ) : void
return void
        public void CanSupplyExtraneousProperties()
        {
            string inputText = "My name is {%=name%}";

            var values = new Dictionary<string, string>
                             {
                                 {"Name", "Bill Gates"},
                                 {"SecondName", "Gates"}
                             };

            var parser = new TemplateParser();
            string outputText = parser.ReplaceTokens(inputText, values);

            Assert.That(outputText, Is.EqualTo("My name is Bill Gates"));
        }