public async Task ProcessAsync_ParentAlreadyHasAction_ThrowsInvalidOperationException()
        {
            // Arrange
            var summaryListContext = new SummaryListContext();

            var rowContext = new SummaryListRowContext();

            rowContext.AddAction(new HtmlGeneration.SummaryListRowAction()
            {
                Content = new HtmlString("Action")
            });

            var context = new TagHelperContext(
                tagName: "govuk-summary-list-row-actions",
                allAttributes: new TagHelperAttributeList(),
                items: new Dictionary <object, object>()
            {
                { typeof(SummaryListContext), summaryListContext },
                { typeof(SummaryListRowContext), rowContext }
            },
                uniqueId: "test");

            var output = new TagHelperOutput(
                "govuk-summary-list-row-actions",
                attributes: new TagHelperAttributeList()
            {
                { "class", "additional-class" }
            },
                getChildContentAsync: (useCachedResult, encoder) =>
            {
                var tagHelperContent = new DefaultTagHelperContent();
                return(Task.FromResult <TagHelperContent>(tagHelperContent));
            });

            var tagHelper = new SummaryListRowActionsTagHelper();

            // Act
            var ex = await Record.ExceptionAsync(() => tagHelper.ProcessAsync(context, output));

            // Assert
            Assert.IsType <InvalidOperationException>(ex);
            Assert.Equal("<govuk-summary-list-row-actions> must be specified before <govuk-summary-list-row-action>.", ex.Message);
        }