Esempio n. 1
0
        public void ParameterExpand(
            string toExpand, string expected,
            string[] parametersString)
        {
            var    parameters = new Dictionary <TemplateGenerator.ParameterKey, string>();
            string processor, directive, name, value;

            for (int i = 0; i < parametersString.Length; ++i)
            {
                var success = TemplateGenerator.TryParseParameter(parametersString[i], out processor, out directive, out name, out value);
                Assert.True(success, $"Invalid test parameter input: {parametersString[i]}");
                parameters.Add(new TemplateGenerator.ParameterKey(processor, directive, name), value);
            }

            var actual = TemplateGenerator.ExpandParameters(toExpand, parameters);

            Assert.AreEqual(expected, actual);
        }