Exemplo n.º 1
0
            private DynamicShortcodeDefinition GetShortcodeDefinitionFromShortcodeEntity(LavaShortcode shortcode)
            {
                if (shortcode == null)
                {
                    return(null);
                }

                var newShortcode = new DynamicShortcodeDefinition();

                newShortcode.Name           = shortcode.Name;
                newShortcode.TemplateMarkup = shortcode.Markup;

                var parameters = RockSerializableDictionary.FromUriEncodedString(shortcode.Parameters);

                newShortcode.Parameters = new Dictionary <string, string>(parameters.Dictionary);

                newShortcode.EnabledLavaCommands = shortcode.EnabledLavaCommands.SplitDelimitedValues(",", StringSplitOptions.RemoveEmptyEntries).ToList();

                if (shortcode.TagType == TagType.Block)
                {
                    newShortcode.ElementType = LavaShortcodeTypeSpecifier.Block;
                }
                else
                {
                    newShortcode.ElementType = LavaShortcodeTypeSpecifier.Inline;
                }

                return(newShortcode);
            }
Exemplo n.º 2
0
        public void ShortcodeBlock_RepeatedShortcodeBlock_ProducesExpectedOutput()
        {
            var shortcodeTemplate = @"
Font Name: {{ fontname }}
Font Size: {{ fontsize }}
Font Bold: {{ fontbold }}
";

            // Create a new test shortcode.
            var shortcode1 = new DynamicShortcodeDefinition();

            shortcode1.ElementType    = LavaShortcodeTypeSpecifier.Block;
            shortcode1.TemplateMarkup = shortcodeTemplate;
            shortcode1.Name           = "shortcodetest1";

            var shortcode2 = new DynamicShortcodeDefinition();

            shortcode2.ElementType    = LavaShortcodeTypeSpecifier.Block;
            shortcode2.TemplateMarkup = shortcodeTemplate;
            shortcode2.Name           = "shortcodetest2";

            var input = @"
{[ shortcodetest1 fontname:'Arial' fontsize:'14' fontbold:'true' ]}
{[ endshortcodetest1 ]}
";

            var expectedOutput = @"
Font Name: Arial
Font Size: 14
Font Bold: true
";

            expectedOutput = expectedOutput.Replace("``", @"""");

            TestHelper.ExecuteForActiveEngines((engine) =>
            {
                // The RockLiquid engine does not support dynamic shortcode definitions.
                if (engine.GetType() == typeof(RockLiquidEngine))
                {
                    return;
                }

                engine.RegisterShortcode(shortcode1.Name, (shortcodeName) => { return(shortcode1); });
                engine.RegisterShortcode(shortcode2.Name, (shortcodeName) => { return(shortcode2); });

                TestHelper.AssertTemplateOutput(engine, expectedOutput, input);

                var parallelOptions = new ParallelOptions {
                    MaxDegreeOfParallelism = 30
                };

                Parallel.For(0, 1000, parallelOptions, (x) => TestHelper.AssertTemplateOutput(engine, expectedOutput, input));
            });
        }
Exemplo n.º 3
0
        public void Shortcode_WithEnabledCommand_DoesNotEnableCommandForOuterScope()
        {
            var shortcodeTemplate = @"
{% execute %}
    return ""Shortcode!"";
{% endexecute %}
";

            // Create a new test shortcode with the "execute" command permission.
            var shortcodeDefinition = new DynamicShortcodeDefinition();

            shortcodeDefinition.ElementType         = LavaShortcodeTypeSpecifier.Inline;
            shortcodeDefinition.TemplateMarkup      = shortcodeTemplate;
            shortcodeDefinition.Name                = "shortcode_execute";
            shortcodeDefinition.EnabledLavaCommands = new List <string> {
                "execute"
            };

            var input = @"
Shortcode Output:
{[ shortcode_execute ]}
<br>
Main Output:
{% execute %}
    return ""Main!"";
{% endexecute %}
<br>
";

            var expectedOutput = @"
Shortcode Output: Shortcode!<br>
Main Output: The Lava command 'execute' is not configured for this template.<br>
";

            // Render the template with no enabled commands.
            // The shortcode should render correctly using the enabled commands defined by its definition,
            // but the main template should show a permission error.
            var options = new LavaTestRenderOptions {
                EnabledCommands = ""
            };

            TestHelper.ExecuteForActiveEngines((engine) =>
            {
                // RockLiquid uses a different mechanism for registering shortcodes that cannot be tested here.
                if (engine.GetType() == typeof(RockLiquidEngine))
                {
                    return;
                }

                engine.RegisterShortcode(shortcodeDefinition.Name, (shortcodeName) => { return(shortcodeDefinition); });

                TestHelper.AssertTemplateOutput(engine, expectedOutput, input, options);
            });
        }
Exemplo n.º 4
0
        public void ShortcodeBlock_RepeatedShortcodeBlock_ProducesExpectedOutput()
        {
            if (LavaService.RockLiquidIsEnabled)
            {
                System.Diagnostics.Debug.Print("This test is not implemented for the RockLiquid Lava Engine.");
                return;
            }

            var shortcodeTemplate = @"
Font Name: {{ fontname }}
Font Size: {{ fontsize }}
Font Bold: {{ fontbold }}
";

            // Create a new test shortcode.
            var shortcode1 = new DynamicShortcodeDefinition();

            shortcode1.ElementType    = LavaShortcodeTypeSpecifier.Block;
            shortcode1.TemplateMarkup = shortcodeTemplate;
            shortcode1.Name           = "shortcodetest1";

            var shortcode2 = new DynamicShortcodeDefinition();

            shortcode2.ElementType    = LavaShortcodeTypeSpecifier.Block;
            shortcode2.TemplateMarkup = shortcodeTemplate;
            shortcode2.Name           = "shortcodetest2";

            var input = @"
{[ shortcodetest1 fontname:'Arial' fontsize:'14' fontbold:'true' ]}
{[ endshortcodetest1 ]}
";

            var expectedOutput = @"
Font Name: Arial
Font Size: 14
Font Bold: true
";

            expectedOutput = expectedOutput.Replace("``", @"""");

            TestHelper.ExecuteForActiveEngines((engine) =>
            {
                engine.RegisterShortcode(shortcode1.Name, (shortcodeName) => { return(shortcode1); });
                engine.RegisterShortcode(shortcode2.Name, (shortcodeName) => { return(shortcode2); });

                TestHelper.AssertTemplateOutput(engine, expectedOutput, input);

                var parallelOptions = new ParallelOptions {
                    MaxDegreeOfParallelism = 30
                };

                Parallel.For(0, 1000, parallelOptions, (x) => TestHelper.AssertTemplateOutput(engine, expectedOutput, input));
            });
        }
Exemplo n.º 5
0
        public void Shortcode_WithUnspecifiedEnabledCommands_InheritsEnabledCommandsFromOuterScope()
        {
            var shortcodeTemplate = @"
{% execute %}
    return ""Shortcode!"";
{% endexecute %}
";

            // Create a new test shortcode with no enabled commands.
            var shortcodeDefinition = new DynamicShortcodeDefinition();

            shortcodeDefinition.ElementType         = LavaShortcodeTypeSpecifier.Inline;
            shortcodeDefinition.TemplateMarkup      = shortcodeTemplate;
            shortcodeDefinition.Name                = "shortcode_execute";
            shortcodeDefinition.EnabledLavaCommands = new List <string> {
                ""
            };

            var input = @"
Shortcode Output:
{[ shortcode_execute ]}
<br>
Main Output:
{% execute %}
    return ""Main!"";
{% endexecute %}
<br>
";

            var expectedOutput = @"
Shortcode Output: Shortcode!<br>
Main Output: Main!<br>
";

            // Render the template with the "execute" command enabled.
            // This permission setting should be inherited by the shortcode, allowing it to render the "execute" command.
            var options = new LavaTestRenderOptions {
                EnabledCommands = "execute"
            };

            TestHelper.ExecuteForActiveEngines((engine) =>
            {
                // RockLiquid uses a different mechanism for registering shortcodes that cannot be tested here.
                if (engine.GetType() == typeof(RockLiquidEngine))
                {
                    return;
                }

                engine.RegisterShortcode(shortcodeDefinition.Name, (shortcodeName) => { return(shortcodeDefinition); });

                TestHelper.AssertTemplateOutput(engine, expectedOutput, input, options);
            });
        }
Exemplo n.º 6
0
        public void Shortcode_WithMergeFieldAsParameter_CorrectlyResolvesParameters()
        {
            var shortcodeTemplate = @"
Font Name: {{ fontname }}
Font Size: {{ fontsize }}
Font Bold: {{ fontbold }}
";

            // Create a new test shortcode.
            var shortcodeDefinition = new DynamicShortcodeDefinition();

            shortcodeDefinition.ElementType    = LavaShortcodeTypeSpecifier.Block;
            shortcodeDefinition.TemplateMarkup = shortcodeTemplate;
            shortcodeDefinition.Name           = "shortcodetest";

            var input = @"
{[ shortcodetest fontname:'Arial' fontsize:'{{ fontsize }}' fontbold:'true' ]}
{[ endshortcodetest ]}
";

            var expectedOutput = @"
Font Name: Arial
Font Size: 99
Font Bold: true
";

            expectedOutput = expectedOutput.Replace("``", @"""");

            var context = new LavaDataDictionary()
            {
                { "fontsize", 99 }
            };

            var options = new LavaTestRenderOptions {
                MergeFields = context
            };

            TestHelper.ExecuteForActiveEngines((engine) =>
            {
                // RockLiquid uses a different mechanism for registering shortcodes that cannot be tested here.
                if (engine.GetType() == typeof(RockLiquidEngine))
                {
                    return;
                }

                engine.RegisterShortcode(shortcodeDefinition.Name, (shortcodeName) => { return(shortcodeDefinition); });

                TestHelper.AssertTemplateOutput(engine, expectedOutput, input, options);
            });
        }
Exemplo n.º 7
0
        public void Shortcode_ReferencingItemFromParentScope_CorrectlyResolvesItem()
        {
            var shortcodeTemplate = @"
ValueInShortcodeScope = {{ Value }}
";

            // Create a new test shortcode.
            var shortcodeDefinition = new DynamicShortcodeDefinition();

            shortcodeDefinition.ElementType    = LavaShortcodeTypeSpecifier.Inline;
            shortcodeDefinition.TemplateMarkup = shortcodeTemplate;
            shortcodeDefinition.Name           = "debug";

            var input = @"
ValueInOuterScope = {{ Value }}
{[ debug ]}
";

            var expectedOutput = @"
ValueInOuterScope = 99
ValueInShortcodeScope = 99
";

            expectedOutput = expectedOutput.Replace("``", @"""");

            var context = new LavaDataDictionary()
            {
                { "Value", 99 }
            };

            var options = new LavaTestRenderOptions {
                MergeFields = context
            };

            TestHelper.ExecuteForActiveEngines((engine) =>
            {
                // RockLiquid uses a different mechanism for registering shortcodes that cannot be tested here.
                if (engine.GetType() == typeof(RockLiquidEngine))
                {
                    return;
                }

                engine.RegisterShortcode(shortcodeDefinition.Name, (shortcodeName) => { return(shortcodeDefinition); });

                TestHelper.AssertTemplateOutput(engine, expectedOutput, input, options);
            });
        }
Exemplo n.º 8
0
        public void ShortcodeBlock_WithParameterVariableContainingQuotes_CanResolveParameters()
        {
            var shortcodeTemplate = @"
Parameter 1: {{ parameterstring }}
";

            // Create a new test shortcode.
            var shortcodeDefinition = new DynamicShortcodeDefinition();

            shortcodeDefinition.ElementType    = LavaShortcodeTypeSpecifier.Block;
            shortcodeDefinition.TemplateMarkup = shortcodeTemplate;
            shortcodeDefinition.Name           = "shortcodeparametertest";
            shortcodeDefinition.Parameters     = new Dictionary <string, string> {
                { "parameterstring", "(default)" }
            };

            var input = @"
{[ shortcodeparametertest parameterstring:parameterStringValue ]}
{[ endshortcodeparametertest ]}
";

            var expectedOutput = @"
Parameter 1: Testing 'single' quotes...
";

            var mergeFields = new Dictionary <string, object> {
                { "parameterStringValue", "Testing 'single' quotes..." }
            };

            TestHelper.ExecuteForActiveEngines((engine) =>
            {
                if (engine.GetType() == typeof(RockLiquidEngine))
                {
                    // Unfortunately, there is no way of testing dynamically-defined shortcodes with RockLiquid.
                    TestHelper.DebugWriteRenderResult(engine, "(Not Implemented)", "(Not Implemented)");
                    return;
                }

                engine.RegisterShortcode(shortcodeDefinition.Name, (shortcodeName) => { return(shortcodeDefinition); });

                var options = new LavaTestRenderOptions {
                    MergeFields = mergeFields
                };

                TestHelper.AssertTemplateOutput(engine, expectedOutput, input, options);
            });
        }
Exemplo n.º 9
0
        public void ShortcodeBlock_WithParameters_CanResolveParameters()
        {
            var shortcodeTemplate = @"
Font Name: {{ fontname }}
Font Size: {{ fontsize }}
Font Bold: {{ fontbold }}
";

            // Create a new test shortcode.
            var shortcodeDefinition = new DynamicShortcodeDefinition();

            shortcodeDefinition.ElementType    = LavaShortcodeTypeSpecifier.Block;
            shortcodeDefinition.TemplateMarkup = shortcodeTemplate;
            shortcodeDefinition.Name           = "shortcodetest";
            shortcodeDefinition.Parameters     = new Dictionary <string, string> {
                { "speed", "10" }
            };

            var input = @"
{[ shortcodetest fontname:'Arial' fontsize:'14' fontbold:'true' ]}
{[ endshortcodetest ]}
";

            var expectedOutput = @"
Font Name: Arial
Font Size: 14
Font Bold: true
";

            expectedOutput = expectedOutput.Replace("``", @"""");

            TestHelper.ExecuteForActiveEngines((engine) =>
            {
                if (engine.GetType() == typeof(RockLiquidEngine))
                {
                    TestHelper.DebugWriteRenderResult(engine, "(Not Implemented)", "(Not Implemented)");
                    return;
                }

                engine.RegisterShortcode(shortcodeDefinition.Name, (shortcodeName) => { return(shortcodeDefinition); });

                TestHelper.AssertTemplateOutput(engine, expectedOutput, input);
            });
        }
        private static void RegisterDynamicShortcodes(ILavaEngine engine)
        {
            // Register dynamic shortcodes with a factory method to ensure that the latest definition is retrieved from the global cache each time the shortcode is used.
            Func <string, DynamicShortcodeDefinition> shortCodeFactory = (shortcodeName) =>
            {
                var shortcodeDefinition = LavaShortcodeCache.All().Where(c => c.TagName == shortcodeName).FirstOrDefault();

                if (shortcodeDefinition == null)
                {
                    return(null);
                }

                var newShortcode = new DynamicShortcodeDefinition();

                newShortcode.Name           = shortcodeDefinition.Name;
                newShortcode.TemplateMarkup = shortcodeDefinition.Markup;

                var parameters = RockSerializableDictionary.FromUriEncodedString(shortcodeDefinition.Parameters);

                newShortcode.Parameters = new Dictionary <string, string>(parameters.Dictionary);

                newShortcode.EnabledLavaCommands = shortcodeDefinition.EnabledLavaCommands.SplitDelimitedValues(",", StringSplitOptions.RemoveEmptyEntries).ToList();

                if (shortcodeDefinition.TagType == TagType.Block)
                {
                    newShortcode.ElementType = LavaShortcodeTypeSpecifier.Block;
                }
                else
                {
                    newShortcode.ElementType = LavaShortcodeTypeSpecifier.Inline;
                }

                return(newShortcode);
            };

            var shortCodes = LavaShortcodeCache.All();

            foreach (var shortcode in shortCodes)
            {
                engine.RegisterShortcode(shortcode.TagName, shortCodeFactory);
            }
        }
Exemplo n.º 11
0
        public void ParallelExecution_ShortcodeWithParameters_ResolvesParameterCorrectly()
        {
            var shortcodeTemplate = @"
Font Name: {{ fontname }}
Font Size: {{ fontsize }}
Font Bold: {{ fontbold }}
";

            var input = @"
{[ shortcodetest fontname:'Arial' fontsize:'{{ fontsize }}' fontbold:'true' ]}
{[ endshortcodetest ]}
";

            var expectedOutput = @"
Font Name: Arial
Font Size: <?>
Font Bold: true
";

            // Create a new test shortcode.
            var shortcodeDefinition = new DynamicShortcodeDefinition();

            shortcodeDefinition.ElementType    = LavaShortcodeTypeSpecifier.Block;
            shortcodeDefinition.TemplateMarkup = shortcodeTemplate;
            shortcodeDefinition.Name           = "shortcodetest";
            shortcodeDefinition.Parameters     = new Dictionary <string, string> {
                { "fontname", "Arial" }, { "fontsize", "0" }, { "fontbold", "true" }
            };

            TestHelper.ExecuteForActiveEngines((engine) =>
            {
                if (engine.GetType() == typeof(RockLiquidEngine))
                {
                    TestHelper.DebugWriteRenderResult(engine, "(Ignored)", "(Ignored)");
                    return;
                }

                engine.RegisterShortcode(shortcodeDefinition.Name, (shortcodeName) => { return(shortcodeDefinition); });

                var parallelOptions = new ParallelOptions {
                    MaxDegreeOfParallelism = 100
                };

                Parallel.For(1, 1000, parallelOptions, (x) =>
                {
                    var context = new LavaDataDictionary()
                    {
                        { "fontsize", x },
                    };
                    context["fontsize"] = x;

                    var options = new LavaTestRenderOptions()
                    {
                        MergeFields = context, Wildcards = new List <string> {
                            "<?>"
                        }
                    };

                    TestHelper.AssertTemplateOutput(engine, expectedOutput, input, options);
                });
            });
        }
Exemplo n.º 12
0
        public void ParallelExecution_ShortcodeWithChildItems_EmitsCorrectHtml()
        {
            var shortcodeTemplate = @"
Parameter 1: {{ parameter1 }}
Parameter 2: {{ parameter2 }}
Items:
{%- for item in items -%}
{{ item.title }} - {{ item.content }}
{%- endfor -%}
";

            // Create a new test shortcode.
            var shortcodeDefinition = new DynamicShortcodeDefinition();

            shortcodeDefinition.ElementType    = LavaShortcodeTypeSpecifier.Block;
            shortcodeDefinition.TemplateMarkup = shortcodeTemplate;
            shortcodeDefinition.Name           = "shortcodetest";
            shortcodeDefinition.Parameters     = new Dictionary <string, string> {
                { "parameter1", "value1" }, { "parameter2", "value2" }
            };

            var input = @"
***
Iteration: {{ iteration }}
***
{[ shortcodetest ]}

    [[ item title:'Panel 1' ]]
        Panel 1 content.
    [[ enditem ]]
    
    [[ item title:'Panel 2' ]]
        Panel 2 content.
    [[ enditem ]]
    
    [[ item title:'Panel 3' ]]
        Panel 3 content.
    [[ enditem ]]

{[ endshortcodetest ]}
";

            var expectedOutput = @"
***
Iteration: <?>
***
Parameter 1: value1
Parameter 2: value2
Items:
Panel 1 - Panel 1 content.
Panel 2 - Panel 2 content.
Panel 3 - Panel 3 content.
";

            expectedOutput = expectedOutput.Replace("``", @"""");

            TestHelper.ExecuteForActiveEngines((engine) =>
            {
                if (engine.GetType() == typeof(RockLiquidEngine))
                {
                    TestHelper.DebugWriteRenderResult(engine, "(Ignored)", "(Ignored)");
                    return;
                }

                engine.RegisterShortcode(shortcodeDefinition.Name, (shortcodeName) => { return(shortcodeDefinition); });

                var parallelOptions = new ParallelOptions {
                    MaxDegreeOfParallelism = 10
                };

                Parallel.For(0, 1000, parallelOptions, (x) =>
                {
                    var context          = new LavaDataDictionary();
                    context["iteration"] = x;

                    var options = new LavaTestRenderOptions()
                    {
                        MergeFields = context, Wildcards = new List <string> {
                            "<?>"
                        }
                    };

                    TestHelper.AssertTemplateOutput(engine, expectedOutput, input, options);
                });
            });
        }
Exemplo n.º 13
0
 /// <summary>
 /// Register the specified shortcodes with the Lava Engine.
 /// </summary>
 /// <param name="engine"></param>
 public void RegisterShortcode(ILavaEngine engine, DynamicShortcodeDefinition shortcode)
 {
     engine.RegisterShortcode(shortcode.Name, (shortcodeName) => GetShortcodeDefinition(shortcodeName));
 }
Exemplo n.º 14
0
 public DynamicShortcodeBlock(DynamicShortcodeDefinition definition, ILavaEngine engine)
     : base(definition, engine)
 {
     //
 }
Exemplo n.º 15
0
        public void ShortcodeBlock_WithEntityCommandEnabledAndEmbeddedEntityCommand_EmitsCorrectHtml()
        {
            var shortcodeTemplate = @"
{% for item in items %}
<Item>
{{ item.title }} --- {{ item.content }}
</Item>
{% endfor %}
";

            // Create a new test shortcode.
            var shortcodeDefinition = new DynamicShortcodeDefinition();

            shortcodeDefinition.ElementType    = LavaShortcodeTypeSpecifier.Block;
            shortcodeDefinition.TemplateMarkup = shortcodeTemplate;
            shortcodeDefinition.Name           = "shortcodetest";
            shortcodeDefinition.Parameters     = new Dictionary <string, string> {
                { "title", "(unnamed)" }
            };
            shortcodeDefinition.EnabledLavaCommands = new List <string> {
                "RockEntity"
            };

            var input = @"
{[ shortcodetest ]}
    {% definedvalue where:'DefinedTypeId == 30' sort:'Order' %}
        {% for dvi in definedvalueItems %}
            [[ item title:'{{ dvi.Value }}' ]]
                Id: {{dvi.Id}} - Guid: {{ dvi.Guid }}
            [[ enditem ]]
        {% endfor %}
    {% enddefinedvalue %}
{[ endshortcodetest ]}
";

            var expectedOutput = @"
<Item>
Infant --- Id: 138 - Guid: c4550426-ed87-4cb0-957e-c6e0bc96080f
</Item>
<Item>
Crawling or Walking --- Id: 139 - Guid: f78d64d3-6ba1-4eca-a9ec-058fbdf8e586
</Item>
<Item>
Potty Trained --- Id: 141 - Guid: e6905502-4c23-4879-a60f-8c4ceb3ee2e9
</Item>
";

            expectedOutput = expectedOutput.Replace("``", @"""");

            TestHelper.ExecuteForActiveEngines((engine) =>
            {
                if (engine.GetType() == typeof(RockLiquidEngine))
                {
                    TestHelper.DebugWriteRenderResult(engine, "(Not Implemented)", "(Not Implemented)");
                    return;
                }

                engine.RegisterShortcode(shortcodeDefinition.Name, (shortcodeName) => { return(shortcodeDefinition); });

                TestHelper.AssertTemplateOutput(engine, expectedOutput, input);
            });
        }
Exemplo n.º 16
0
        public void ShortcodeBlock_WithChildItems_EmitsCorrectHtml()
        {
            var shortcodeTemplate = @"
Parameter 1: {{ parameter1 }}
Parameter 2: {{ parameter2 }}
Items:
{%- for item in items -%}
{{ item.title }} - {{ item.content }}
{%- endfor -%}
";

            // Create a new test shortcode.
            var shortcodeDefinition = new DynamicShortcodeDefinition();

            shortcodeDefinition.ElementType    = LavaShortcodeTypeSpecifier.Block;
            shortcodeDefinition.TemplateMarkup = shortcodeTemplate;
            shortcodeDefinition.Name           = "shortcodetest";
            shortcodeDefinition.Parameters     = new Dictionary <string, string> {
                { "parameter1", "value1" }, { "parameter2", "value2" }
            };

            var input = @"
{[ shortcodetest ]}

    [[ item title:'Panel 1' ]]
        Panel 1 content.
    [[ enditem ]]
    
    [[ item title:'Panel 2' ]]
        Panel 2 content.
    [[ enditem ]]
    
    [[ item title:'Panel 3' ]]
        Panel 3 content.
    [[ enditem ]]

{[ endshortcodetest ]}
";

            var expectedOutput = @"
Parameter 1: value1
Parameter 2: value2
Items:
Panel 1 - Panel 1 content.
Panel 2 - Panel 2 content.
Panel 3 - Panel 3 content.
";

            expectedOutput = expectedOutput.Replace("``", @"""");

            TestHelper.ExecuteForActiveEngines((engine) =>
            {
                // The RockLiquid engine does not support dynamic shortcode definitions.
                if (engine.GetType() == typeof(RockLiquidEngine))
                {
                    return;
                }

                engine.RegisterShortcode(shortcodeDefinition.Name, (shortcodeName) => { return(shortcodeDefinition); });

                TestHelper.AssertTemplateOutput(engine, expectedOutput, input);
            });
        }