public void ThrowsArgumentOutOfRangeExceptionForNegativeIncrementHeadersBy(int incrementHeadersBy)
            {
                var exception = Assert.Throws <ArgumentOutOfRangeException>(() => _markdownService.GetHtmlFromMarkdown("markdown file test", incrementHeadersBy));

                Assert.Equal(nameof(incrementHeadersBy), exception.ParamName);
                Assert.Contains("must be greater than or equal to 0", exception.Message);
            }
示例#2
0
 public void EncodesHtmlInMarkdown(string originalMd, string expectedHtml)
 {
     Assert.Equal(expectedHtml, StripNewLines(
                      _markdownService.GetHtmlFromMarkdown(originalMd).Content));
 }