This is a short review.
"; - - // Act - var result = ReviewHelper.GetCharacters(body); - - // Assert - Assert.Equal("This is a short review.…", result); - } - - [Fact] - public void GetCharacters_WithMoreCharactersThanLimit_TruncatesText() - { - - var body = "" + new string('a', 200) + "
"; - - // Act - var result = ReviewHelper.GetCharacters(body); - - // Assert - Assert.Equal(new string('a', 175) + "…", result); - Assert.Equal(176, result.Length); // 175 characters + ellipsis - } - - [Fact] - public void GetCharacters_IgnoresScriptTags() - { - - const string body = "Visible text
"; - - // Act - var result = ReviewHelper.GetCharacters(body); - - // Assert - Assert.Equal("Visible text…", result); - Assert.DoesNotContain("hidden", result); - } - - [Fact] - public void GetCharacters_RemovesMarkdownSymbols() - { - - const string body = "This is **bold** and _italic_ text with [link](url).
"; - - // Act - var result = ReviewHelper.GetCharacters(body); - - // Assert - Assert.Equal("This is bold and italic text with link.…", result); - } - - [Fact] - public void GetCharacters_HandlesComplexMarkdownAndHtml() - { - - const string body = """ - -This is ~~strikethrough~~ and __underlined__ text
-~~~code block~~~
-+++highlighted+++
-img123(image.jpg)
-