public void Insert_DoesNotThrowsException_IfTwoFastStringBuildersContainsSameThing() { var a = new FastStringBuilder("test"); var b = new FastStringBuilder("test"); Assert.DoesNotThrow(() => a.Insert(0, b, 0, 1)); }
public void Insert_CanInsertPartOfAnotherFastStringBuilder(int position, int start, int length, string expected) { // Arrange var a = new FastStringBuilder("first"); var b = new FastStringBuilder("second"); // Act a.Insert(position, b, start, length); // Assert Assert.AreEqual(expected, a.ToString()); }
public void Insert_ThrowsException_IfYouPassSameFastStringBuilder() { var a = new FastStringBuilder("test"); Assert.Throws <InvalidOperationException>(() => a.Insert(0, a, 0, 1)); }