コード例 #1
0
        public string ReturnCorrectRepresentation_WithNoProperties(string value, Tag tag)
        {
            var parsedTag = ParsedTag.Create(TagInfo.Create(tag, TagPosition.None, 0)); // works bad with header tag

            parsedTag.Value = value;
            return(parsedTag.GetCurrentRepresentation());
        }
コード例 #2
0
        public void ReturnCorrectHyperlinkRepresentation()
        {
            var parsedTag = ParsedTag.Create(new HyperlinkTagInfo(new TagType(TagPosition.None, 0)));

            parsedTag.Value = "some_text";
            parsedTag.AddProperty("href", "ya.ru");
            var expectedResult = "<a href=\"ya.ru\">some_text</a>";

            var actualResult = parsedTag.GetCurrentRepresentation();

            actualResult.Should().Be(expectedResult);
        }
コード例 #3
0
 private void PushTag(TagInfo tagInfo)
 {
     tagsStack.Push(tagInfo.TagType);
     parsedTags.Push(ParsedTag.Create(tagInfo));
     renderedParts.Push(new StringBuilder());
 }