From ea67a295b2cc118389ffc00ee6057df007c2e0ce Mon Sep 17 00:00:00 2001 From: Rudey Date: Tue, 12 May 2020 22:32:05 +0200 Subject: [PATCH] Test CSS classes using both Bootstrap and MediaLinks --- src/Markdig.Tests/TestMediaLinks.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/Markdig.Tests/TestMediaLinks.cs b/src/Markdig.Tests/TestMediaLinks.cs index 96fcf7d5..27ba3426 100644 --- a/src/Markdig.Tests/TestMediaLinks.cs +++ b/src/Markdig.Tests/TestMediaLinks.cs @@ -15,6 +15,14 @@ namespace Markdig.Tests .Build(); } + private MarkdownPipeline GetPipelineWithBootstrap(MediaOptions options = null) + { + return new MarkdownPipelineBuilder() + .UseBootstrap() + .UseMediaLinks(options) + .Build(); + } + [Test] [TestCase("![static mp4](https://sample.com/video.mp4)", "

\n")] [TestCase("![static mp4](//sample.com/video.mp4)", "

\n")] @@ -83,5 +91,14 @@ namespace Markdig.Tests })); Assert.AreEqual(html, expected); } + + [Test] + [TestCase("![static mp4](//sample.com/video.mp4)", "

\n")] + [TestCase(@"![youtube.com](https://www.youtube.com/watch?v=mswPy5bt3TQ)", "

\n")] + public void TestWithBootstrap(string markdown, string expected) + { + string html = Markdown.ToHtml(markdown, GetPipelineWithBootstrap()); + Assert.AreEqual(html, expected); + } } }