public void WriteStandard_RendersStandardFlexiSectionBlock(FlexiSectionBlock dummyFlexiSectionBlock,
                                                                   FlexiSectionHeadingBlock dummyFlexiSectionHeadingBlock,
                                                                   string expectedResult)
        {
            // Arrange
            dummyFlexiSectionBlock.Add(dummyFlexiSectionHeadingBlock);
            var dummyStringWriter = new StringWriter();
            var dummyHtmlRenderer = new HtmlRenderer(dummyStringWriter); // Note that markdig changes dummyStringWriter.NewLine to '\n'
            FlexiSectionBlockRenderer testSubject = CreateFlexiSectionBlockRenderer();

            // Act
            testSubject.Write(dummyHtmlRenderer, dummyFlexiSectionBlock);
            string result = dummyStringWriter.ToString();

            // Assert
            Assert.Equal(expectedResult, result, ignoreLineEndingDifferences: true);
        }
        public void WriteStandard_RendersChildren()
        {
            // Arrange
            const string dummyChildContent         = "dummyChildText";
            var          dummyChildContainerInline = new ContainerInline();

            dummyChildContainerInline.AppendChild(new LiteralInline(dummyChildContent));
            var dummyChildBlock = new ParagraphBlock()
            {
                Inline = dummyChildContainerInline
            };
            FlexiSectionBlock dummyFlexiSectionBlock = CreateFlexiSectionBlock(level: 2); // Level must be specified or we'll get an out of range exception

            dummyFlexiSectionBlock.Add(CreateFlexiSectionHeadingBlock());
            dummyFlexiSectionBlock.Add(dummyChildBlock);
            var dummyStringWriter = new StringWriter();
            var dummyHtmlRenderer = new HtmlRenderer(dummyStringWriter); // Note that markdig changes dummyStringWriter.NewLine to '\n'
            FlexiSectionBlockRenderer testSubject = CreateFlexiSectionBlockRenderer();

            // Act
            testSubject.Write(dummyHtmlRenderer, dummyFlexiSectionBlock);
            string result = dummyStringWriter.ToString();

            // Assert
            Assert.Equal($@"<section class="" _level_2 _no-link-icon"">
<header class=""__header"">
<h2 class=""__heading""></h2>
<button class=""__link-button"" aria-label=""Copy link"">
</button>
</header>
<p>{dummyChildContent}</p>
</section>
",
                         result,
                         ignoreLineEndingDifferences: true);
        }