public void Test_StringManipulator_RemoveTwoStringsInsideSection() { StringManipulator m = new StringManipulator(); m.Append("hello cruel world"); m.Remove("l"); Assert.AreEqual("heo crue word", m.ToString()); }
public void Test_StringManipulator_RemoveWholeFirstSection() { StringManipulator m = new StringManipulator(); m.Append("hello "); m.Append("world"); m.Remove("hello "); Assert.AreEqual("world", m.ToString()); }
public void Test_StringManipulator_RemoveSingleStringAcrossTwoSections() { StringManipulator m = new StringManipulator(); m.Append("hello cr"); m.Append("uel world"); m.Remove("cruel"); Assert.AreEqual("hello world", m.ToString()); }
public void Test_StringManipulator_RemoveSingleStringAcrossThreeSections() { StringManipulator m = new StringManipulator(); m.Append("hello cr"); m.Append("u"); m.Append("el world"); m.Remove("cruel"); Assert.AreEqual("hello world", m.ToString()); Assert.AreEqual("hello world".Length, m.Length, "The Lengths should be the same too"); }