コード例 #1
0
        public void Given_CodeQuote_When_CodeAsParameter_Then_ReturnMarkdownCodeQuoteMarkup()
        {
            string expected  = "```some code```";
            var    codeQuote = new CodeQuote("some code");

            string actual = codeQuote.Create();

            Assert.Equal(expected, actual);
        }
コード例 #2
0
        public void Given_MarkdownBuilder_When_ElementCodeQuoteIsAdded_Then_AddedOnceWithTypeCodeQuote()
        {
            var expectedCount   = 1;
            var actualCount     = 0;
            var markdownBuilder = new MarkdownBuilder();
            var codeQoute       = new CodeQuote("some code");

            markdownBuilder.CodeQuote("some code");
            var elements = markdownBuilder.Elements;

            foreach (var e in elements)
            {
                actualCount++;
            }
            Assert.Equal(expectedCount, actualCount);
            Assert.Contains(elements, e => e.GetType() == codeQoute.GetType());
        }
コード例 #3
0
 public Header(int level, CodeQuote codeQuote) : this(level, codeQuote.Create())
 {
 }