Skip to content

Commit ca5a7eb

Browse files
committed
Added test for longer replacement
1 parent c9f77c6 commit ca5a7eb

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/LinkDotNet.StringBuilder.UnitTests/ValueStringBuilder.Replace.Tests.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void ShouldReplaceAllText()
5858
}
5959

6060
[Fact]
61-
public void ShouldReplacePart()
61+
public void ShouldReplacePartThatIsShorter()
6262
{
6363
using var builder = new ValueStringBuilder("Hello World");
6464

@@ -67,6 +67,16 @@ public void ShouldReplacePart()
6767
builder.ToString().Should().Be("Ha World");
6868
}
6969

70+
[Fact]
71+
public void ShouldReplacePartThatIsLonger()
72+
{
73+
using var builder = new ValueStringBuilder("Hello World");
74+
75+
builder.Replace("Hello", "Hallöchen");
76+
77+
builder.ToString().Should().Be("Hallöchen World");
78+
}
79+
7080
[Theory]
7181
[InlineData("", "word")]
7282
[InlineData("word", "")]

0 commit comments

Comments
 (0)