Alpinely.TownCrier.Tests.TemplateParserTests.CanSupplyExtraneousProperties C# (CSharp) Méthode

CanSupplyExtraneousProperties() private méthode

private CanSupplyExtraneousProperties ( ) : void
Résultat 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"));
        }