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()); }
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); }
private void PushTag(TagInfo tagInfo) { tagsStack.Push(tagInfo.TagType); parsedTags.Push(ParsedTag.Create(tagInfo)); renderedParts.Push(new StringBuilder()); }