Exemplo n.º 1
0
        public void Render_StringVariableWithXmlEncodingOption_RendersUnencodedString()
        {
            var mergeValues = new LavaDataDictionary {
                { "UnencodedString", "Ted & Cindy" }
            };
            var template       = @"Unencoded String: {{ UnencodedString }}";
            var expectedOutput = @"Unencoded String: Ted & Cindy";

            var parameters = new LavaRenderParameters
            {
                ShouldEncodeStringsAsXml = false,
                Context = LavaRenderContext.FromMergeValues(mergeValues)
            };

            TestHelper.AssertTemplateOutput(expectedOutput, template, parameters);
        }
Exemplo n.º 2
0
        /// <summary>
        /// For each of the currently enabled Lava Engines, process the specified input template and verify against the expected output.
        /// </summary>
        /// <param name="expectedOutput"></param>
        /// <param name="inputTemplate"></param>
        public void AssertTemplateOutput(string expectedOutput, string inputTemplate, LavaDataDictionary mergeValues = null, bool ignoreWhitespace = false)
        {
            var parameters = LavaRenderParameters.WithContext(LavaRenderContext.FromMergeValues(mergeValues));

            AssertTemplateOutput(expectedOutput, inputTemplate, parameters, ignoreWhitespace);
        }