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

CanReplaceToken() private méthode

private CanReplaceToken ( ) : void
Résultat void
        public void CanReplaceToken()
        {
            string inputText = "My name is {%=name%}";

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

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

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