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

CanReplaceMultipleTokens() private method

private CanReplaceMultipleTokens ( ) : void
return void
        public void CanReplaceMultipleTokens()
        {
            string inputText = "My first name is {%=firstname%}. My second name is {%=secondname%}.";

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

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

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