SubstituteTokensInString() public method

Substitutes the property tokens in the supplied string.
public SubstituteTokensInString ( DD.CBU.CaasDeploy.Library.Contracts.RuntimeContext runtimeContext, DD.CBU.CaasDeploy.Library.Contracts.TaskContext taskContext, string input ) : Task
runtimeContext DD.CBU.CaasDeploy.Library.Contracts.RuntimeContext The runtime context.
taskContext DD.CBU.CaasDeploy.Library.Contracts.TaskContext The task execution context.
input string The input string.
return Task
        public async Task Parameters_SubstituteTokensInString_NotFound()
        {
            var context = new TaskContext
            {
                Parameters = new Dictionary<string, string>()
                {
                    { "Param1", "Value1" }
                }
            };

            var macro = new ParametersMacro();
            var input = "Hello_$parameters['Param2']";
            await macro.SubstituteTokensInString(null, context, input);
        }
        public async Task Parameters_SubstituteTokensInString_Success()
        {
            var context = new TaskContext
            {
                Parameters = new Dictionary<string, string>()
                {
                    { "Param1", "Param2" },
                    { "Param2", "Param3" },
                    { "Param3", "Param4" }
                }
            };

            var macro = new ParametersMacro();
            var input = "Hello_$parameters[$parameters['Param1']]";
            var output = await macro.SubstituteTokensInString(null, context, input);

            Assert.AreEqual("Hello_Param3", output);
        }